I'm trying to profile CPU utilization for my project using DTrace. I just followed the script
The problem is that it doesn't show the functions names. The stacks.out
file looks like that:
CPU ID FUNCTION:NAME
0 73700 :tick-60s
node`_ZN2v86Object3GetENS_6HandleINS_5ValueEEE+0x1
node`_ZN4node7TCPWrap12OnConnectionEP11uv_stream_si+0x14b
node`uv__server_io+0xbf
node`uv__io_poll+0x259
node`uv_run+0xda
node`_ZN4node5StartEiPPc+0x16d
node`main+0x1b
node`_start+0x83
1
node`_ZN4node6Buffer4FillERKN2v89ArgumentsE+0x22b
0x82474d1b
0x8241ee9c
0x8241e624
0x8241e30f
0x82426abd
0x82419e4e
0x82419948
0x82413fc3
0x8d20e501
0x82416f65
0x82413f98
0x8243e7d3
0x824186c0
0x8246e8cf
0x8d221899
0x8d21308a
node`_ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0x101
node`_ZN2v88internal9Execution4CallENS0_6HandleINS0_6ObjectEEES4_iPS4_Pbb+0xc9
node`_ZN2v88Function4CallENS_6HandleINS_6ObjectEEEiPNS1_INS_5ValueEEE+0x10b
node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8FunctionEEEiPNS1_INS0_5ValueEEE+0x4c
node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_6StringEEEiPNS1_INS0_5ValueEEE+0x66
node`_ZN4node10StreamWrap12OnReadCommonEP11uv_stream_si8uv_buf_t14uv_handle_type+0x14f
node`_ZN4node10StreamWrap6OnReadEP11uv_stream_si8uv_buf_t+0x2e
node`uv__read+0x281
node`uv__stream_io+0x131
node`uv__io_poll+0x259
node`uv_run+0xda
node`_ZN4node5StartEiPPc+0x16d
node`main+0x1b
node`_start+0x83
1
The flame graph shows hex (ie. "0x82474d1b") as functions calls and not the actual function name.
I'm using OmniOS (illumos based OS) vagrant box r151002 and did this (https://gist.github.com/dalssoft/5595688) to build node.js 32bits on OmniOS.
Any thoughts?
I had similar issues when writing my blog post about using openindiana and node.js together.
http://blog.nearform.com/blog/node-openindiana.html
I found being explicit with the cpu arch was the way to resolve it.
./configure --with-dtrace --dest-cpu=x64
Don't forget to demangle the c++ symbols too
c++filt < stacks.out > demangled.out