Re: Thread dump on nekoVM
Thomas Fétiveau <thomas.fetiveau.tech <at> googlemail.com>
2012-03-20 17:43:43 GMT
Hi neko list, hi Nicolas,
I come back to this question because I really need to implement
a thread dump mechanism for a nekoVM applications.
The concerned application runs two ThreadRemotingServer objects
at the same time and I need to know what is happening in all
threads at a t instant.
No issue to get the statcktraces of all the threads of the both
ThreadRemotingServer objects. However, I want to dump the
threads when these remoting servers seem to hang so I cannot
send the thread dump instructions through haxe remoting. A
solution could be to trigger the thread dumps when receiving a
system event on the nekoVM.
My question is thus : how can I catch system events in my
haxe/neko code to trigger a function of my application ?
(By system events, I mean what we send with the "kill" shell
instruction on Linux, which is not only used to kill a process,
depending on which signal we send... Such a mecanism would be
similar to what most JVMs propose to take thread dumps)
Thanks in advance !
Thomas Fétiveau
Développeur Indépendant
Mobile : +33 623 110 922
Tél : +33 297 667 674
web :
http://www.tofee.fr/
skype : thomas.fetiveau.tech
Le 04/01/2012 18:24, Nicolas Cannasse a écrit :
Le
04/01/2012 17:13, Thomas Fétiveau a écrit :
Hi,
I would like to know how to take thread dumps on the nekoVM (I'm
running
it on Linux).
Is there any web page summing up all diagnosis and
troubleshooting
tools/procedures for nekoVm applications ?
There are not many tools for debugging in Neko so far.
If you have a neko.vm.Thread running, you can get it's current
callstack by doing the following :
untyped haxe.Stack.makeStack(neko.Lib.load("std", "thread_stack",
1)(t.handle));
Best,
Nicolas
--
--
Neko : One VM to run them all
(http://nekovm.org)