Reputation: 33
I add flag “--print-opt-code” to V8 engine, then v8 could print the compiled code to stdout. And now I what to print these information to specific files, then which function should I modify? Thank you very much~~
Upvotes: 0
Views: 421
Reputation: 40581
Try this: --redirect-code-traces-to=<filename>
;-)
Generally speaking: follow the FLAG_print_opt_code
through the source and see what it does.
Depending on where you run V8 (in d8? in Chrome? in node.js?), it might be easiest to just use shell redirection: .../d8 test.js --print-opt-code > output.txt
Upvotes: 1