nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.46k stars 29.54k forks source link

node --log-all script.js doesn't create a log file #37036

Closed conartist6 closed 2 years ago

conartist6 commented 3 years ago

I'm trying to use the new indicium analyzer, but I'm having trouble figuring out how to get node to spit out the correct data.

I assume I should be able to use --log-all and that v8 will then write information about internal events (optimizations, deopts, ICs, etc) to v8.log. This is what the descriptions of these flags indicates when I run node --v8-options. If I pass an option not supported by node or v8 I get an error, so the flags I pass are being received. But still node --log-all ./my-script.js does not generate any v8.log file.

Specifying a full absolute path with the --logfile flag does not seem to help. There are no perms issues.

Any suggestions?

RaisinTen commented 3 years ago

You may take a look at this:

DEFINE_IMPLICATION(log_all, log_api)
DEFINE_IMPLICATION(log_all, log_code)
DEFINE_IMPLICATION(log_all, log_suspect)
DEFINE_IMPLICATION(log_all, log_handles)
DEFINE_IMPLICATION(log_all, log_internal_timer_events)
DEFINE_IMPLICATION(log_all, log_function_events)

According to it:

node --log-all script.js

is supposed to behave like this:

node --log-api --log-code --log-suspect --log-handles --log-internal-timer-events --log-function-events script.js

This does produce a log file for me.

However, this says:

// --log-all
// Log all events to the file, default is off.  This is the same as combining
// --log-api, --log-code, and --log-regexp.

But --log-regexp is not an option yet.

RaisinTen commented 3 years ago

cc @nodejs/v8

targos commented 2 years ago

If this is still an issue, it should be reported at https://bugs.chromium.org/p/v8/issues/entry