Skip to content

Instantly share code, notes, and snippets.

@davepacheco
Created July 28, 2015 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davepacheco/fe9d22c4113a65d8936c to your computer and use it in GitHub Desktop.
Save davepacheco/fe9d22c4113a65d8936c to your computer and use it in GitHub Desktop.
$ uname -v
joyent_20150428T081540Z
$ node -v
v0.10.40
$ file $(which node)
/home/dap/node-v0.10.40-sunos-x64/bin/node: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped
$ node
> process.arch
'x64'
$ cat gcore-loop2.js
// hack for line number information
new Error().stack;
function main()
{
func1();
}
function func1()
{
func2();
}
function func2()
{
for (;;)
;
console.log(arguments);
}
main();
$ node gcore-loop2.js &
[1] 34782
$ dtrace -n 'profile-97/pid == 34782/{ jstack(80, 8192); exit(0); }'
dtrace: description 'profile-97' matched 1 probe
CPU ID FUNCTION:NAME
10 44906 :profile-97
func2 at /home/dap/node-testing/test-programs/gcore-loop2.js line 23
func1 at /home/dap/node-testing/test-programs/gcore-loop2.js line 23
main at /home/dap/node-testing/test-programs/gcore-loop2.js line 23
(anon) as (anon) at /home/dap/node-testing/test-programs/gcore-loop2.js line 1
<< internal >>
(anon) as Module._compile at module.js line 540
(anon) as Module._extensions..js at module.js line 540
(anon) as Module.load at module.js line 540
(anon) as Module._load at module.js line 540
(anon) as Module.runMain at module.js line 540
startup at node.js line 468
(anon) as (anon) at node.js line 468
<< internal >>
<< entry >>
node`_ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0xf7
node`_ZN2v88internal9Execution4CallENS0_6HandleINS0_6ObjectEEES4_iPS4_Pbb+0xc8
node`_ZN2v88Function4CallENS_6HandleINS_6ObjectEEEiPNS1_INS_5ValueEEE+0x14a
node`_ZN4node4LoadEN2v86HandleINS0_6ObjectEEE+0xf5
node`_ZN4node5StartEiPPc+0x163
node`_start+0x6c
$ uname -v
joyent_20150428T081540Z
$ node -v
v0.12.7
$ node
> process.arch
'x64'
$ node gcore-loop2.js &
[1] 35396
$ dtrace -n 'profile-97/pid == 35396/{ jstack(80, 8192); exit(0); }'
dtrace: description 'profile-97' matched 1 probe
CPU ID FUNCTION:NAME
7 44906 :profile-97
func2 at /home/dap/node-testing/test-programs/gcore-loop2.js line 23
func1 at /home/dap/node-testing/test-programs/gcore-loop2.js line 23
main at /home/dap/node-testing/test-programs/gcore-loop2.js line 23
(anon) as (anon) at /home/dap/node-testing/test-programs/gcore-loop2.js line 1
<< internal >>
(anon) as Module._compile at module.js line 543
(anon) as Module._extensions..js at module.js line 543
(anon) as Module.load at module.js line 543
(anon) as Module._load at module.js line 543
(anon) as Module.runMain at module.js line 543
startup at node.js line 408
(anon) as (anon) at node.js line 408
<< internal >>
<< entry >>
node`_ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_+0x11e
node`_ZN2v88internal9Execution4CallEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_iPS6_b+0xb3
node`_ZN2v88Function4CallENS_6HandleINS_5ValueEEEiPS3_+0xc2
node`_ZN4node15LoadEnvironmentEPNS_11EnvironmentE+0x1fe
node`_ZN4node5StartEiPPc+0x157
node`_start+0x6c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment