Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions replay.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ async function main() {
const nodeArgs = [
"--max-old-space-size=4096",
"--expose-gc",
"--stack-size=2048",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be wrong but I thought this was already the default for Node?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is 984kB and I think is half of that if you're on 32bit. On PowerShell, you can see by running the command:

node --v8-options | Select-String -Pattern "stack-size" -Context 0,1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>   --stack-size (default size of stack region v8 is allowed to use (in kBytes))
>         type: int  default: --stack-size=984

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I checked VS Code and it told me that was still the default:

  --stack-size (default size of stack region v8 is allowed to use (in kBytes))
        type: int  default: --stack-size=984

(Set $env:ELECTRON_RUN_AS_NODE=1 and then:

& "C:\Users\jabaile\AppData\Local\Programs\Microsoft VS Code\Code.exe" --v8-options | Select-String -Pattern "stack-size" -Context 0,1

>   --maglev-assert-stack-size (insert stack size checks before every IR node)
>         type: bool  default: --maglev-assert-stack-size
    --maglev-break-on-entry (insert an int3 on maglev entries)
>   --wasm-stack-switching-stack-size (default size of stacks for wasm stack-switching (in kB))
>         type: int  default: --wasm-stack-switching-stack-size=984
    --liftoff (enable Liftoff, the baseline compiler for WebAssembly)
>   --stack-size (default size of stack region v8 is allowed to use (in kBytes))
>         type: int  default: --stack-size=984
    --max-stack-trace-source-length (maximum length of function source code printed in a stack trace.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I don't know much about the ELECTRON_RUN_AS_NODE flag but seems like is avoiding running the electron environment. Could that be a difference?

Do you know of another method that caused the stack trace to be processed on VSCode better?

// "--require=E:/tsserver-stress/node_modules/pprof-it/dist/index.js",
];

Expand Down