diff --git a/packages/SwingSet/src/controller/startNodeSubprocess.js b/packages/SwingSet/src/controller/startNodeSubprocess.js index a392b94944d..72ff6095fdb 100644 --- a/packages/SwingSet/src/controller/startNodeSubprocess.js +++ b/packages/SwingSet/src/controller/startNodeSubprocess.js @@ -13,6 +13,12 @@ export function makeStartSubprocessWorkerNode( ).pathname; const args = nodeOptions ? [...nodeOptions] : []; if (profileVats.includes(vatID)) { + // Enable profiling with a 1 microsecond sampling interval, + // saving results to a file in the working directory + // with a portable name derived from the vat name + // and in particular replacing any colons with dashes. + // cf. ../kernel/vat-loader/manager-subprocess-node.js + // https://github.com/Agoric/agoric-sdk/blob/18d561f1b95755e58ca691b26938fc249618018d/packages/SwingSet/src/kernel/vat-loader/manager-subprocess-node.js#L32-L34 args.push('--cpu-prof'); args.push('--cpu-prof-interval'); args.push('1');