diff --git a/ide/src/trace/component/SpRecordTrace.ts b/ide/src/trace/component/SpRecordTrace.ts index 053f5b47442f9eee33ca32a9a00f8aac5cf25721..e6af1aee975699864d18aeb8a170c5954f50c43a 100644 --- a/ide/src/trace/component/SpRecordTrace.ts +++ b/ide/src/trace/component/SpRecordTrace.ts @@ -2176,17 +2176,33 @@ export class SpRecordTrace extends BaseElement { processName = appProcess; } } - let nativeConfig: NativeHookConfig = { - saveFile: false, - fileName: '', - filterSize: this.spAllocations!.filter, - smbPages: this.spAllocations!.shared, - maxStackDepth: this.spAllocations!.unwind, - processName: processName, - stringCompressed: true, - fpUnwind: this.spAllocations!.fp_unwind, - blocked: true, - }; + let nativeConfig: NativeHookConfig; + if (this.spAllocations!.expandPids.length === 1) { + nativeConfig = { + pid: this.spAllocations!.expandPids[0], + saveFile: false, + fileName: '', + filterSize: this.spAllocations!.filter, + smbPages: this.spAllocations!.shared, + maxStackDepth: this.spAllocations!.unwind, + processName: processName, + stringCompressed: true, + fpUnwind: this.spAllocations!.fp_unwind, + blocked: true, + }; + } else { + nativeConfig = { + saveFile: false, + fileName: '', + filterSize: this.spAllocations!.filter, + smbPages: this.spAllocations!.shared, + maxStackDepth: this.spAllocations!.unwind, + processName: processName, + stringCompressed: true, + fpUnwind: this.spAllocations!.fp_unwind, + blocked: true, + }; + } let maxProcessSize = 4; if (SpRecordTrace.selectVersion !== undefined && SpRecordTrace.selectVersion !== '3.2') { nativeConfig.callframeCompress = true;