Merge pull request #112777 from microsoft/alex/prof-v8-extensions

Add `--prof-v8-extensions` flag
This commit is contained in:
Alexandru Dima 2020-12-18 16:57:32 +01:00 committed by GitHub
commit 2df64d27dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View file

@ -28,6 +28,7 @@ export interface NativeParsedArgs {
'prof-startup'?: boolean;
'prof-startup-prefix'?: string;
'prof-append-timers'?: string;
'prof-v8-extensions'?: boolean;
verbose?: boolean;
trace?: boolean;
'trace-category-filter'?: string;

View file

@ -66,6 +66,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
'prof-startup': { type: 'boolean', cat: 't', description: localize('prof-startup', "Run CPU profiler during startup") },
'prof-append-timers': { type: 'string' },
'prof-startup-prefix': { type: 'string' },
'prof-v8-extensions': { type: 'boolean' },
'disable-extensions': { type: 'boolean', deprecates: 'disableExtensions', cat: 't', description: localize('disableExtensions', "Disable all installed extensions.") },
'disable-extension': { type: 'string[]', cat: 't', args: 'extension-id', description: localize('disableExtension', "Disable an extension.") },
'sync': { type: 'string', cat: 't', description: localize('turn sync', "Turn sync on or off"), args: ['on', 'off'] },

View file

@ -202,6 +202,10 @@ export class LocalProcessExtensionHost implements IExtensionHost {
opts.execArgv = ['--inspect-port=0'];
}
if (this._environmentService.args['prof-v8-extensions']) {
opts.execArgv.unshift('--prof');
}
// On linux crash reporter needs to be started on child node processes explicitly
if (platform.isLinux) {
const crashReporterStartOptions: CrashReporterStartOptions = {