I installed node.js(0.9.4) via nvm, which according to changelog has systemtap support.
I installed systemtap on my Fedora linux distro.
$ sudo yum install systemtap
I used this gist from Ben Noordhuis.
$ stap -l 'process("node")'
$ sudo stap gc.stp -c 'node test.js' semantic error: while resolving probe point: identifier 'process' at gc.stp:7:7 source: probe process("node").mark("gc__start") ^ semantic error: no match semantic error: while resolving probe point: identifier 'process' at :12:7 source: probe process("node").mark("gc__done")
I have no experience at all with systemtap, but like to toy with it? What is possible with it? Can I see how much memory is consumed by code(http://stackoverflow.com/questions/13126808/whats-the-node-js-memory-breakdown)?
Update to answer comment.
$ readelf -n node readelf: Error: 'node': No such file $ which node ~/nvm/v0.9.4/bin/node $ readelf -n ~/nvm/v0.9.4/bin/node Notes at offset 0x0000021c with length 0x00000020: Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) OS: Linux, ABI: 2.6.32 Notes at offset 0x0000023c with length 0x00000024: Owner Data size Description GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) Build ID: 294da933883eaeaf7e848073dc3db6bff6762fb4 $ uname -a [alfred@alfred81-AMILO-Pi-2515 gc-stap]$ uname -a Linux alfred81-AMILO-Pi-2515.lan 3.6.3-1.fc17.x86_64 #1 SMP Mon Oct 22 15:32:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ stap -V Systemtap translator/driver (version 2.0/0.154, rpm 2.0-1.fc17) Copyright (C) 2005-2012 Red Hat, Inc. and others This is free software; see the source for copying conditions. enabled features: AVAHI LIBRPM LIBSQLITE3 NSS TR1_UNORDERED_MAP NLS
Your copy of node appears to be compiled without sys/sdt.h markers. If they were compiled in,
readelf -n would show something like ...
stapsdt 0x00000040 NT_STAPSDT (SystemTap probe descriptors) Provider: stap Name: stap_system__spawn Location: 0x000000000012e1b0, Base: 0x00000000001cb886, Semaphore: 0x0000000000000000 Arguments: -4@%ebx -4@%eax
Perhaps it was configured with --without-dtrace.
There is currently no discussion for this recipe.
This recipe can be found in it's original form on Stack Over Flow.