mapbox/flamebearer

Issue when processing the V8 log file for flamebearer. Look like the log file is not in JSON format. Please help

thuyvu45 opened this issue · 2 comments

USC02VH18LHV2R:UI sd158rp$ node --prof-process --preprocess -j isolate-0x102801e00-v8.log | flamebearer
evalmachine.:2770
printErr(str);
^

ReferenceError: printErr is not defined
at TickProcessor.printError (evalmachine.:2770:3)
at TickProcessor.LogReader.processLog_ (evalmachine.:2522:12)
at TickProcessor.LogReader.processLogLine (evalmachine.:2405:10)
at TickProcessor.processLogFile (evalmachine.:2798:10)
at evalmachine.:3980:15
at internal/v8_prof_processor.js:41:28
at NativeModule.compile (bootstrap_node.js:613:7)
at Function.NativeModule.require (bootstrap_node.js:558:18)
at startup (bootstrap_node.js:150:20)
at bootstrap_node.js:625:3
Invalid input; expected a V8 log in JSON format. Produce one with:
node --prof-process --preprocess isolate*.log

I got the same error when upgraded NodeJs from 8.x to 10.15.3 version.
The *-v8.log file doesn't have quotes for strings.

For example from nodejs10.15:

v8-version,6,8,275,32,-node.51,0
shared-library,/usr/local/bin/node,0x55adc09b9000,0x55adc1e9b000,0
shared-library,/usr/lib/libgcc_s.so.1,0x7f68beada000,0x7f68beae9000,0

and from nodejs8.x:

v8-version,6,1,534,48,0
shared-library,"/usr/local/bin/node",0x55ac1f1fd000,0x55ac20ec7000,0
shared-library,"/usr/lib/libgcc_s.so.1",0x7f785f69f000,0x7f785f8af000,0

I resolved my issue.
So my error was because I tried to run node --prof-process --preprocess -j from-nodejs-10.15.x.log | flamebearer command on a laptop that has NodeJs with 8.6 version.