| /developtools/smartperf_host/ide/src/trace/component/trace/sheet/hiperf/ |
| D | TabPerfSampleList.ts | 75 for (let sample of samples) { 76 let process = this.processMap.get(sample.pid); 77 sample.processName = 79 `Process(${sample.pid})` : 80 `${process!.processName || 'Process'}(${sample.pid})`; 81 sample.threadName = 82 sample.threadName === null || sample.threadName === undefined ? 83 `Thread(${sample.tid})` : 84 `${sample.threadName}(${sample.tid})`; 85 sample.coreName = `CPU ${sample.core}`; [all …]
|
| /developtools/smartperf_host/ide/src/trace/database/logic-worker/ |
| D | ProcedureLogicWorkerJsCpuProfiler.ts | 107 const sample = this.samples[id]; constant 108 if (!sample || sample.type === undefined) { 111 let sampleTotalTime = sample.dur; 114 if (sample.startTime > rightNs || sample.endTime < leftNs) { 118 const startTime = sample.startTime < leftNs ? leftNs : sample.startTime; 119 const endTime = sample.endTime > rightNs ? rightNs : sample.endTime; 123 if (!samplesIdsArr.includes(sample)) { 124 samplesIdsArr.push(sample); 125 let typeDur = typeMap.get(sample.type); 127 typeMap.set(sample.type, typeDur + sampleTotalTime); [all …]
|
| D | ProcedureLogicWorkerPerf.ts | 516 sample: PerfCountSample, 533 … PerfCallChainMerageData.merageCallChainSample(child, callChainDataList[index], sample, isEnd); 540 PerfCallChainMerageData.merageCallChainSample(node, callChainDataList[index], sample, isEnd); 546 … if (node! && !isEnd) this.mergeChildrenByIndex(node, callChainDataList, index, sample, isTopDown); 562 …recursionPerfChargeInitTree(sample: PerfCallChainMerageData, symbolName: string, isSymbol: boolean… 563 …if ((isSymbol && sample.symbolName === symbolName) || (!isSymbol && sample.libName === symbolName)… 564 (this.splitMapData[symbolName] = this.splitMapData[symbolName] || []).push(sample); 565 sample.isStore++; 567 if (sample.initChildren.length > 0) { 568 sample.initChildren.forEach((child: PerfCallChainMerageData): void => { [all …]
|
| D | ProcedureLogicWorkerNativeNemory.ts | 639 for (const sample of samples) { constant 640 const count = this.isStatistic ? sample.count : 1; constant 641 …const analysisSample = new AnalysisSample(sample.id, sample.heapSize, count, sample.eventType, sam… 643 this.setStatisticSubType(analysisSample, sample); 646 if (sample.subTypeId) { 647 subType = this.dataCache.dataDict.get(sample.subTypeId); 649 analysisSample.endTs = sample.endTs; 650 analysisSample.addr = sample.addr; 651 analysisSample.tid = sample.tid; 652 analysisSample.threadName = sample.threadName; [all …]
|
| D | ProcedureLogicWorkerFileSystem.ts | 566 for (let sample of samplesList) { 567 let analysisSample = new FileAnalysisSample(sample); 568 let callChainList = this.dataCache.eBpfCallChainsMap.get(sample.callChainId) || []; 763 samples.forEach((sample: FileSample): void => { 764 totalCount += sample.dur; 765 let callChains = this.createThreadAndType(sample); 772 …currentTreeMapData[callChains[topIndex].symbolsId + '' + callChains[topIndex].pathId + sample.pid]; 775 …urrentTreeMapData[callChains[topIndex].symbolsId + '' + callChains[topIndex].pathId + sample.pid] = 779 FileMerageBean.merageCallChainSample(root, callChains[topIndex], sample, false); 780 this.merageChildrenByIndex(root, callChains, topIndex, sample, isTopDown); [all …]
|
| /developtools/hiperf/src/ |
| D | subcommand_report.cpp | 189 void SubCommandReport::BroadcastSample(std::unique_ptr<PerfRecordSample> &sample) in BroadcastSample() argument 194 sample->data_.id = config.ids_[0]; in BroadcastSample() 195 ProcessSample(sample); in BroadcastSample() 199 void SubCommandReport::ProcessSample(std::unique_ptr<PerfRecordSample> &sample) in ProcessSample() argument 201 sample->DumpLog(__FUNCTION__); in ProcessSample() 203 reportJsonFile_->UpdateReportSample(sample->data_.id, sample->data_.pid, sample->data_.tid, in ProcessSample() 204 sample->data_.period); in ProcessSample() 205 reportJsonFile_->UpdateReportCallStack(sample->data_.id, sample->data_.pid, in ProcessSample() 206 sample->data_.tid, sample->data_.period, in ProcessSample() 207 sample->callFrames_); in ProcessSample() [all …]
|
| D | report.cpp | 34 void Report::AddReportItem(const PerfRecordSample &sample, bool includeCallStack) in AddReportItem() argument 36 size_t configIndex = GetConfigIndex(sample.data_.id); in AddReportItem() 39 configIndex, sample.data_.id); in AddReportItem() 40 VirtualThread &thread = virtualRuntime_.GetThread(sample.data_.pid, sample.data_.tid); in AddReportItem() 41 HLOG_ASSERT(sample.callFrames_.size() > 0); in AddReportItem() 42 if (sample.callFrames_.size() > 0) { in AddReportItem() 46 auto frameIt = sample.callFrames_.rbegin(); in AddReportItem() 48 sample.data_.pid, sample.data_.tid, thread.name_, frameIt->filePath_, in AddReportItem() 49 frameIt->symbolName_, frameIt->vaddrInFile_, sample.data_.period); in AddReportItem() 54 for (frameIt = sample.callFrames_.rbegin(); frameIt != sample.callFrames_.rend(); in AddReportItem() [all …]
|
| D | report_protobuf_file.cpp | 122 CallStackSample *sample = record.mutable_sample(); in ProcessSampleRecord() local 123 sample->set_time(recordSample.data_.time); in ProcessSampleRecord() 124 sample->set_tid(recordSample.data_.tid); in ProcessSampleRecord() 126 auto callframe = sample->add_callstackframe(); in ProcessSampleRecord() 134 sample->set_event_count(recordSample.data_.period); in ProcessSampleRecord() 135 sample->set_config_name_id(configIndex); in ProcessSampleRecord() 384 return Dump(record.sample(), INDENT_ONE_LEVEL); in Dump()
|
| D | subcommand_record.cpp | 1609 PerfRecordSample *sample = static_cast<PerfRecordSample *>(record.get()); in CollectionSymbol() local 1611 CollectSymbol(sample); in CollectionSymbol() 1613 virtualRuntime_.SymbolicRecord(*sample); in CollectionSymbol() 1621 void SubCommandRecord::CollectSymbol(PerfRecordSample *sample) in CollectSymbol() argument 1623 perf_callchain_context context = sample->inKernel() ? PERF_CONTEXT_KERNEL in CollectSymbol() 1627 if (sample->data_.nr == 0) { in CollectSymbol() 1628 server_pid = sample->GetServerPidof(0); in CollectSymbol() 1630 kernelThreadSymbolsHits_[server_pid].insert(sample->data_.ip); in CollectSymbol() 1632 kernelSymbolsHits_.insert(sample->data_.ip); in CollectSymbol() 1634 userSymbolsHits_[sample->data_.pid].insert(sample->data_.ip); in CollectSymbol() [all …]
|
| D | subcommand_dump.cpp | 427 void SubCommandDump::DumpCallChain(int indent, std::unique_ptr<PerfRecordSample> &sample) in DumpCallChain() argument 429 PrintIndent(indent, "\n callchain: %zu\n", sample->callFrames_.size()); in DumpCallChain() 430 if (sample->callFrames_.size() > 0) { in DumpCallChain() 432 for (auto frameIt = sample->callFrames_.begin(); frameIt != sample->callFrames_.end(); in DumpCallChain() 434 PrintIndent(indent, "%02zd:%s\n", std::distance(frameIt, sample->callFrames_.end()), in DumpCallChain() 461 std::unique_ptr<PerfRecordSample> sample( in DumpDataPortion() local 463 DumpCallChain(indent, sample); in DumpDataPortion()
|
| /developtools/smartperf_host/ide/src/trace/database/data-trafic/hiperf/ |
| D | HiperfCallChartReceiver.ts | 258 sampleList.map((sample) => { 263 perfSample.callchainId = sample.callchainId; 264 perfSample.threadId = sample.threadId; 265 perfSample.id = sample.id; 266 perfSample.cpuId = sample.cpuId; 267 perfSample.startTime = sample.startTs; 268 perfSample.endTime = sample.startTs + sample.dur; 269 perfSample.totalTime = sample.dur; 270 perfSample.eventCount = sample.eventCount; 280 for (let sample of samples) { [all …]
|
| /developtools/smartperf_host/ide/src/trace/database/data-trafic/ |
| D | ArkTsReceiver.ts | 141 let sample = data.cpuProfilerData || symbol; 142 const stackTopSymbol = dataCache.jsSymbolMap.get(sample.functionId); 145 sample.type = SampleType.OTHER; 150 sample.stack = getFullCallChainOfNode(stackTopSymbol); 153 createNewChartFrame(sample, combineSample); 156 … if (isSymbolEqual(sample.stack[0], lastCallChart) && lastCallChart.endTime === sample.startTime) { 157 combineCallChain(lastCallChart, sample); 160 createNewChartFrame(sample, combineSample); 189 function createNewChartFrame(sample: JsCpuProfilerSample, combineSample: Array<JsCpuProfilerChartFr… 191 for (const [idx, symbol] of sample.stack!.entries()) { [all …]
|
| /developtools/smartperf_host/trace_streamer/src/parser/htrace_pbreader_parser/ |
| D | htrace_js_cpu_profiler_parser.cpp | 95 uint32_t& sample) in DataProcessing() argument 103 …(void)traceDataCache_->GetJsCpuProfilerSampleData()->AppendNewData(sample, startNewTime, endNewTim… in DataProcessing() 116 uint32_t sample = std::numeric_limits<uint32_t>::max(); in ParseSampleData() local 136 if (sample != std::numeric_limits<uint32_t>::max() && sample != jMessage.at("samples")[i]) { in ParseSampleData() 139 DataProcessing(jMessage, sampleEndTime, startTime, dur, sample); in ParseSampleData() 140 sample = jMessage.at("samples")[i]; in ParseSampleData() 141 } else if (sample == std::numeric_limits<uint32_t>::max()) { in ParseSampleData() 142 sample = jMessage.at("samples")[0]; in ParseSampleData() 153 return sample; in ParseSampleData() 172 … uint32_t sample = ParseSampleData(jMessage, sampleEndTime, startTime, startTimeSnap, endTimeSnap); in ParseJsCpuProfiler() local [all …]
|
| /developtools/hiperf/test/unittest/common/native/ |
| D | report_protobuf_file_test.cpp | 295 PerfRecordSample sample(false, 1, 2, 100, 200u); variable 296 sample.callFrames_.emplace_back(0x1, 0x1234, "first_user_func", "user_symbol"); 297 sample.callFrames_.emplace_back(0x2, 0x1234, "first_user2_func", "user_symbol2"); 298 sample.callFrames_.emplace_back(0x3, 0x1234, "second_user2_func", "user_symbol2"); 300 sample.callFrames_.at(0).symbolFileIndex_ = 0; 301 sample.callFrames_.at(1).symbolFileIndex_ = 1; 302 sample.callFrames_.at(2).symbolFileIndex_ = 1; 303 sample.callFrames_.at(0).symbolIndex_ = 0; 304 sample.callFrames_.at(1).symbolIndex_ = 0; 305 sample.callFrames_.at(2).symbolIndex_ = 1; [all …]
|
| D | report_test.cpp | 716 PerfRecordSample sample(false, 0, 0, 1); variable 717 sample.callFrames_.emplace_back(0x1, 0x1234, "frame1", "dummy"); 718 sample.callFrames_.emplace_back(0x2, 0x1234, "frame2", "dummy"); 719 sample.callFrames_.emplace_back(0x3, 0x1234, "frame3", "dummy"); 720 sample.callFrames_.emplace_back(0x3, 0x1234, "frame4", "dummy"); 728 report_->AddReportItem(sample, false); 732 report_->AddReportItem(sample, true); 757 report_->AddReportItem(sample, false); 775 PerfRecordSampleMock sample(false, 0, 0, 1); variable 776 sample.data_.bnr = 3; [all …]
|
| D | virtual_runtime_test.cpp | 377 PerfRecordSample sample(data.data(), attr); variable 378 sample.DumpLog("UnwindFromRecord"); 379 ASSERT_EQ(sample.data_.stack_size, TEST_DWARF_RECORD_STACK_SIZE); 382 runtime_->UnwindFromRecord(sample); 383 ASSERT_LE(TEST_RECORD_CALLSTACK_IP_FUNC.size(), sample.callFrames_.size()); 385 EXPECT_EQ(TEST_RECORD_CALLSTACK_IP_FUNC[i].first, sample.callFrames_[i].vaddrInFile_); 387 sample.callFrames_[i].symbolName_.data());
|
| /developtools/ace_ets2bundle/ |
| D | README_zh.md | 45 上述命令编译了compiler目录下的`sample`工程,编译结果在`sample\build`目录。 83 **Note**: 如果`projectName`未指定,默认编译`sample`工程,编译结果在`sample\build`目录。
|
| D | README.md | 44 The `sample` project will be compiled. The output is in the `sample/build` directory. 82 **Note**: If `projectName` is not specified, the `sample` project will be compiled. In the project …
|
| D | .gitignore | 6 compiler/sample/build/
|
| /developtools/ace_js2bundle/ |
| D | README_zh.md | 10 * sample: 工程样例 43 以编译`sample\rich`工程为例,进入到ace-loader目录 48 上述命令编译了ace-loader目录下的`sample\rich`工程,编译结果在`sample\rich\build`目录。 267 以`sample\rich`工程为例,例如在`sample\rich\pages`目录创建一个`bar`页面,需要在项目的`manifest.json`文件的`pages`新增一行,如下所示: 280 $ npm run rich # 编译sample\rich工程 281 $ npm run lite # 编译sample\lite工程 282 $ npm run card # 编译sample\card工程 284 **Note**: 编译结果在`sample\[rich|lite|card]\build`目录。
|
| /developtools/smartperf_host/trace_streamer/src/parser/hiperf_parser/ |
| D | perf_data_parser.cpp | 592 std::unique_ptr<PerfRecordSample> sample(static_cast<PerfRecordSample*>(record.release())); in RecordCallBack() local 593 uint32_t callChainId = UpdateCallChainUnCompressed(sample); in RecordCallBack() 594 UpdatePerfSampleData(callChainId, sample); in RecordCallBack() 611 …nt32_t PerfDataParser::UpdateCallChainUnCompressed(const std::unique_ptr<PerfRecordSample>& sample) in UpdateCallChainUnCompressed() argument 614 for (auto& callFrame : sample->callFrames_) { in UpdateCallChainUnCompressed() 618 auto pid = sample->data_.pid; in UpdateCallChainUnCompressed() 626 for (auto frame = sample->callFrames_.rbegin(); frame != sample->callFrames_.rend(); ++frame) { in UpdateCallChainUnCompressed() 638 …rfDataParser::UpdatePerfSampleData(uint32_t callChainId, std::unique_ptr<PerfRecordSample>& sample) in UpdatePerfSampleData() argument 643 newTimeStamp = sample->data_.time; in UpdatePerfSampleData() 646 …eamFilters_->clockFilter_->ToPrimaryTraceTime(perfToTSClockType_.at(clockId_), sample->data_.time); in UpdatePerfSampleData() [all …]
|
| /developtools/hiperf/proto/ |
| D | report_sample.proto | 18 // message Record(sample) 20 // message Record(sample) 23 // message Record(sample) 88 CallStackSample sample = 1; field
|
| /developtools/ace_js2bundle/ace-loader/ |
| D | README.md | 9 ## Build built-in sample for Rich devices under the ace-loader dir. 13 ## Build built-in sample for Lite devices under the ace-loader dir.
|
| /developtools/ace_ets2bundle/compiler/ |
| D | README.md | 36 The `sample` project will be compiled. The output is in the `sample/build` directory. 81 **Note**: If `projectName` is empty, compile the `sample` project by default. In the project root d…
|
| /developtools/smartperf_host/ide/test/trace/database/logic-worker/ |
| D | ProcedureLogicWorkerFileSystem.test.ts | 337 let sample = { variable 342 expect(FileMerageBean.merageCallChainSample(currentNode, callChain, sample, isEnd)); 361 let sample = { variable 368 expect(handlerMap.createThreadAndType(sample)).toBeTruthy(); 381 let sample = {}; variable 384 …expect(handlerMap.merageChildrenByIndex(currentNode, callChainDataList, index, sample, isTopDown))…
|