adopt latest v8-inspect-profiler, use own utils and just write file, https://github.com/microsoft/vscode/issues/111211

This commit is contained in:
Johannes Rieken 2022-01-04 09:35:16 +01:00
parent 1c68771543
commit 5a042ad34f
No known key found for this signature in database
GPG key ID: 96634B5AF12F8798
3 changed files with 11 additions and 10 deletions

View file

@ -78,7 +78,7 @@
"node-pty": "0.11.0-beta11",
"spdlog": "^0.13.0",
"tas-client-umd": "0.1.4",
"v8-inspect-profiler": "^0.0.22",
"v8-inspect-profiler": "^0.1.0",
"vscode-oniguruma": "1.6.1",
"vscode-proxy-agent": "^0.11.0",
"vscode-regexpp": "^3.1.0",
@ -228,4 +228,4 @@
"elliptic": "^6.5.3",
"nwmatcher": "^1.4.4"
}
}
}

View file

@ -23,6 +23,7 @@ import { createWaitMarkerFile } from 'vs/platform/environment/node/wait';
import product from 'vs/platform/product/common/product';
import { CancellationTokenSource } from 'vs/base/common/cancellation';
import { randomPath } from 'vs/base/common/extpath';
import { Utils } from 'vs/platform/profiling/common/profiling';
function shouldSpawnCliProcess(argv: NativeParsedArgs): boolean {
return !!argv['install-source']
@ -285,17 +286,17 @@ export async function main(argv: string[]): Promise<any> {
return;
}
let suffix = '';
let profile = await session.stop();
let result = await session.stop();
if (!process.env['VSCODE_DEV']) {
// when running from a not-development-build we remove
// absolute filenames because we don't want to reveal anything
// about users. We also append the `.txt` suffix to make it
// easier to attach these files to GH issues
profile = profiler.rewriteAbsolutePaths(profile, 'piiRemoved');
result.profile = Utils.rewriteAbsolutePaths(result.profile, 'piiRemoved');
suffix = '.txt';
}
await profiler.writeProfile(profile, `${filenamePrefix}.${name}.cpuprofile${suffix}`);
writeFileSync(`${filenamePrefix}.${name}.cpuprofile${suffix}`, JSON.stringify(result.profile, undefined, 4));
}
};
}

View file

@ -10231,10 +10231,10 @@ v8-compile-cache@^2.2.0:
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
v8-inspect-profiler@^0.0.22:
version "0.0.22"
resolved "https://registry.yarnpkg.com/v8-inspect-profiler/-/v8-inspect-profiler-0.0.22.tgz#34d3ba35a965c437ed28279d31cd42d7698a4002"
integrity sha512-r2p7UkbFlFopAWUVprbECP+EpdjuEKPFQLhqpnHx9KxeTTLVaHuGpUNHye53MtYMoJFl9nJiMyIM7J2yY+dTQg==
v8-inspect-profiler@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/v8-inspect-profiler/-/v8-inspect-profiler-0.1.0.tgz#0d3f80e2dc878f737c31ae7ff4c033425a33a724"
integrity sha512-K7RyY4p59+rIPvgcTN/Oo7VU9cJ68LOl+dz8RCh/M4VwbZ9yS3Ci+qajbMDojW207anNn7CehkLvqpSIrNT9oA==
dependencies:
chrome-remote-interface "0.28.2"
@ -10426,7 +10426,7 @@ vscode-regexpp@^3.1.0:
resolved "https://registry.yarnpkg.com/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz#42d059b6fffe99bd42939c0d013f632f0cad823f"
integrity sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg==
vscode-ripgrep@^1.13.2:
vscode-ripgrep@^1.12.1, vscode-ripgrep@^1.13.2:
version "1.13.2"
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.13.2.tgz#8ccebc33f14d54442c4b11962aead163c55b506e"
integrity sha512-RlK9U87EokgHfiOjDQ38ipQQX936gWOcWPQaJpYf+kAkz1PQ1pK2n7nhiscdOmLu6XGjTs7pWFJ/ckonpN7twQ==