I have a node.js server that periodically spikes to 100% CPU usage in 
production. I would like to be able to send it a signal which causes a 
stack trace, to see where the problem is. So I want to build a custom 
version of node that listens for a signal and calls v8 to print the current 
stack. It looks like the function I need is
v8::internal::Isolate::Current()->PrintStack(stdout);

My c++ skills are pretty rusty, however if I understand correctly, because 
this is in the internal namespace I'm not able to access it:

../src/node.cc:3767:21: error: incomplete type 'v8::internal::Isolate' 
named in nested name specifier

      v8::internal::Isolate::Current()->PrintStack(stdout);

      ~~~~~~~~~~~~~~^~~~~~~~~

../deps/v8/include/v8.h:130:7: note: forward declaration of 
'v8::internal::Isolate'

class Isolate;

      ^

1 error generated.

Is there some other way to cause v8 to print a stack trace?
Thanks,
Dirk

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to