): void {
let div = document.createElement('div');
div.textContent = cpuStatus.cpu + '';
div.style.textAlign = 'center';
div.style.fontWeight = 'normal';
- let smallCheckBox: LitCheckBox = new LitCheckBox();
- smallCheckBox.checked = cpuStatus.small;
- smallCheckBox.setAttribute('not-close', '');
- smallCheckBox.style.textAlign = 'center';
- smallCheckBox.style.marginLeft = 'auto';
- smallCheckBox.style.marginRight = 'auto';
+ let littleCheckBox: LitCheckBox = new LitCheckBox();
+ littleCheckBox.checked = cpuStatus.little;
+ littleCheckBox.setAttribute('not-close', '');
+ littleCheckBox.style.textAlign = 'center';
+ littleCheckBox.style.marginLeft = 'auto';
+ littleCheckBox.style.marginRight = 'auto';
let midCheckBox: LitCheckBox = new LitCheckBox();
midCheckBox.checked = cpuStatus.medium;
midCheckBox.setAttribute('not-close', '');
midCheckBox.style.textAlign = 'center';
midCheckBox.style.marginLeft = 'auto';
midCheckBox.style.marginRight = 'auto';
- let largeCheckBox: LitCheckBox = new LitCheckBox();
- largeCheckBox.checked = cpuStatus.large;
- largeCheckBox.setAttribute('not-close', '');
- largeCheckBox.style.marginLeft = 'auto';
- largeCheckBox.style.marginRight = 'auto';
- smallCheckBox.addEventListener('change', (e: unknown) => {
+ let bigCheckBox: LitCheckBox = new LitCheckBox();
+ bigCheckBox.checked = cpuStatus.big;
+ bigCheckBox.setAttribute('not-close', '');
+ bigCheckBox.style.marginLeft = 'auto';
+ bigCheckBox.style.marginRight = 'auto';
+ littleCheckBox.addEventListener('change', (e: unknown) => {
midCheckBox.checked = false;
- largeCheckBox.checked = false;
+ bigCheckBox.checked = false;
// @ts-ignore
- cpuStatus.small = e.detail.checked;
+ cpuStatus.little = e.detail.checked;
// @ts-ignore
- this.canUpdateCheckList(e.detail.checked, small, cpuStatus.cpu);
+ this.canUpdateCheckList(e.detail.checked, little, cpuStatus.cpu);
mid = mid.filter((it) => it !== cpuStatus.cpu);
- large = large.filter((it) => it !== cpuStatus.cpu);
+ big = big.filter((it) => it !== cpuStatus.cpu);
});
midCheckBox.addEventListener('change', (e: unknown) => {
- largeCheckBox.checked = false;
- smallCheckBox.checked = false;
+ bigCheckBox.checked = false;
+ littleCheckBox.checked = false;
// @ts-ignore
cpuStatus.medium = e.detail.checked;
// @ts-ignore
this.canUpdateCheckList(e.detail.checked, mid, cpuStatus.cpu);
- large = large.filter((it) => it !== cpuStatus.cpu);
- small = small.filter((it) => it !== cpuStatus.cpu);
+ big = big.filter((it) => it !== cpuStatus.cpu);
+ little = little.filter((it) => it !== cpuStatus.cpu);
});
- largeCheckBox.addEventListener('change', (e: unknown) => {
+ bigCheckBox.addEventListener('change', (e: unknown) => {
midCheckBox.checked = false;
- smallCheckBox.checked = false;
+ littleCheckBox.checked = false;
// @ts-ignore
- cpuStatus.large = e.detail.checked;
+ cpuStatus.big = e.detail.checked;
// @ts-ignore
- this.canUpdateCheckList(e.detail.checked, large, cpuStatus.cpu);
+ this.canUpdateCheckList(e.detail.checked, big, cpuStatus.cpu);
mid = mid.filter((it) => it !== cpuStatus.cpu);
- small = small.filter((it) => it !== cpuStatus.cpu);
+ little = little.filter((it) => it !== cpuStatus.cpu);
});
// @ts-ignore
- divEl!.append(...[div, smallCheckBox, midCheckBox, largeCheckBox]);
+ divEl!.append(...[div, littleCheckBox, midCheckBox, bigCheckBox]);
}
//判断checkList数组是否需要push数据或删除数据
diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts
index 02249b1ec86b5d3944b5319a2dcb6c0e05de1126..787aa7d7c5a36c684fa89c4e07f99fd713315485 100644
--- a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts
+++ b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.html.ts
@@ -66,8 +66,21 @@ export const TabPanePerfAnalysisHtml = `
width: 100%;
height: 20px;
}
+@keyframes textGrowth {
+ 0% {
+ font-size: 16px;
+ transform: scale(0.9);
+ }
+ 100% {
+ font-size: 18px;
+ transform: scale(1.0);
+ }
+}
#SO-err-tips{
color:red;
+ animation: textGrowth 2.0s ease-in-out infinite alternate;
+ will-change: transform, font-size;
+ transform: translateZ(0);
}
diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts
index c04d2ce9193ebb9aa8d80437fac8ecac9538ebf6..57993a75d892168db49a87d982efbe7aaad79e4b 100644
--- a/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts
+++ b/ide/src/trace/component/trace/sheet/hiperf/TabPanePerfAnalysis.ts
@@ -68,13 +68,21 @@ export class TabPanePerfAnalysis extends BaseElement {
private isComplete: boolean = true;
private currentSelectionParam: SelectionParam | undefined | null;
static tabLoadingList: Array = [];
+
private vaddrList: Array = [];
private selectedTabfileName: string = '';
private clickFuncVaddrList: Array = [];
private functionListener!: Function | undefined | null;
private currentSoName: string = '';
+ private currentProcessItem: unknown;
+ private currentThreadItem: unknown;
+ private currentLibrayItem: unknown;
set data(val: SelectionParam) {
+ if (val.isImportSo && this.currentLevel > 0) {
+ this.disableHomeRedirectAfterSoLoad(val);
+ return;
+ }
if (val === this.currentSelection) {
this.pidData.unshift(this.allProcessCount);
this.perfTableProcess!.recycleDataSource = this.pidData;
@@ -107,6 +115,66 @@ export class TabPanePerfAnalysis extends BaseElement {
}
}
+ private disableHomeRedirectAfterSoLoad(val: SelectionParam): void {
+ this.getDataByWorker(val, (results: unknown) => {
+ this.isComplete = true;
+ // @ts-ignore
+ this.processData = results;
+ // @ts-ignore
+ if (this.currentLevel === 3) {
+ this.reset(this.tableFunction!, true);
+ this.getHiperfFunction(this.currentLibrayItem);
+ let title = '';
+ if (this.processName.length > 0) {
+ title += `${this.processName} / `;
+ }
+ if (this.threadName.length > 0) {
+ title += `${this.threadName} / `;
+ }
+ if (this.currentSoName.length > 0) {
+ title += this.currentSoName;
+ }
+ this.titleEl!.textContent = title;
+ this.perfAnalysisPie?.hideTip();
+ this.selectedTabfileName = this.currentSoName;
+ } else if (this.currentLevel === 1) {
+ if (this.hideThreadCheckBox!.checked) {
+ this.hideThread(this.currentProcessItem);
+ } else {
+ this.reset(this.perfTableThread!, true);
+ this.getHiperfThread(this.currentProcessItem, val);
+ }
+ // @ts-ignore
+ this.titleEl!.textContent = this.currentProcessItem.tableName;
+ // @ts-ignore
+ this.processName = this.currentProcessItem.tableName;
+ this.perfAnalysisPie?.hideTip();
+ } else if (this.currentLevel === 2) {
+ this.reset(this.perfTableSo!, true);
+ this.getHiperfSo(this.currentThreadItem, val);
+ let pName = this.processName;
+ // @ts-ignore
+ if (this.processName.length > 0 && this.currentThreadItem.tableName.length > 0) {
+ pName = `${this.processName} / `;
+ }
+ // @ts-ignore
+ this.titleEl!.textContent = pName + this.currentThreadItem.tableName;
+ // @ts-ignore
+ this.threadName = this.currentThreadItem.tableName;
+ this.perfAnalysisPie?.hideTip();
+ }
+ const args = [
+ {
+ funcName: 'getVaddrToFile',
+ funcArgs: [val],
+ },
+ ];
+ procedurePool.submitWithName('logic0', 'perf-vaddr', args, undefined, (results: Array) => {
+ this.vaddrList = results;
+ });
+ });
+ }
+
private initPerfTableListener(): void {
for (let perfTable of this.tableArray!) {
let querySelector = perfTable.shadowRoot?.querySelector('.table');
@@ -407,6 +475,7 @@ export class TabPanePerfAnalysis extends BaseElement {
}
private perfProcessLevelClickEvent(it: unknown, val: SelectionParam): void {
+ this.currentProcessItem = it;
if (this.hideThreadCheckBox!.checked) {
this.hideThread(it);
this.showAssignLevel(this.perfTableSo!, this.perfTableProcess!, 1, this.soData);
@@ -478,6 +547,7 @@ export class TabPanePerfAnalysis extends BaseElement {
}
private perfThreadLevelClickEvent(it: unknown, val: SelectionParam): void {
+ this.currentThreadItem = it;
this.reset(this.perfTableSo!, true);
this.showAssignLevel(this.perfTableSo!, this.perfTableThread!, 2, this.soData);
this.getHiperfSo(it, val);
@@ -556,6 +626,7 @@ export class TabPanePerfAnalysis extends BaseElement {
}
private perfSoLevelClickEvent(it: unknown): void {
+ this.currentLibrayItem = it;
this.reset(this.tableFunction!, true);
this.showAssignLevel(this.tableFunction!, this.perfTableSo!, 3, this.functionData);
// @ts-ignore
@@ -623,7 +694,7 @@ export class TabPanePerfAnalysis extends BaseElement {
encodedData = textEncoder.encode(dataString);
WebSocketManager.getInstance()?.registerMessageListener(TypeConstants.DISASSEMBLY_TYPE, this.callback, () => { }, true);
WebSocketManager.getInstance()?.sendMessage(TypeConstants.DISASSEMBLY_TYPE, Constants.DISASSEMBLY_QUERY_ELF_CMD, encodedData);
- if (WebSocketManager.disaStatus !== 'ready') {
+ if (WebSocketManager.getInstance()!.status !== 'ready') {
// @ts-ignore
this.perfAnalysisHeadTips?.innerHTML = 'Request timed out.Install the extended service according to the help document.';
return;
diff --git a/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts b/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts
index f7b7de69d872931a13d766549d1f7a0499eb3cc4..83e8a071e94e44b625a02bcb14f76b9cdb2dc770 100644
--- a/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts
+++ b/ide/src/trace/component/trace/sheet/hiperf/TabPerfFuncAsm.html.ts
@@ -74,9 +74,9 @@ export const TabPerfFuncAsmHtml = `
-
-
-
+
+
+