Skip to content

Commit

Permalink
chore(SwingSet): Explain how profileVats affects node CLI options
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Feb 21, 2025
1 parent 7186681 commit 2fe59d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/SwingSet/src/controller/startNodeSubprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 2fe59d6

Please sign in to comment.