Reputation: 1984
I want a command-line way to evaluate low-level contributors to lower performance-per-watt of Node.js applications. Namely, L1, L2, and prefetch cache misses of JIT-generated native code, as well as the JIT/GC/interpteter of the JavaScript runtime itself.
JavaScriptCore, v8, and ChakraCore all supply commandline REPLs for running benchmarks. What profiler(s) can I run on Intel-, AMD-, and ARMv6-based hardware to gather these statistics with reasonable accuracy? I'd prefer to have a way to do this across at least two operating systems: Windows, Mac, and/or Linux.
Upvotes: 2
Views: 1466
Reputation: 1221
You can use Valgrind. Quoting their FAQ, "Valgrind can handle dynamically generated code, so long as none of the generated code is later overwritten by other generated code".
It is also supported on various platforms including X86/Linux, X86/Darwin etc
Upvotes: 1
Reputation: 40501
V8 and the Linux perf
tool support each other, see the documentation. If you have a very recent system (IIRC kernel >= 4.4 and perf >= 4.10), you can skip the steps for compiling your own kernel and perf
.
Upvotes: 3