Re: [rvm-research] Question about Jikes -- RVMThread Termination
Robin Garner <[email protected]> Mon, 5 Mar 2018 12:52:23 +1100
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
> Only on last thread, everything is gone (Heap, FDs ... etc). What I would do is add a shutdown hook that iterates over all the running threads and dumps their performance data before the VM is dismantled. cheers On 04/03/18 15:32, Khaled Z Mahmoud wrote: > Hi, > > You are right the description of the problem. > > I meant to mention “terminate” instead of “suspend”. > > What I was trying to do is to add performance monintoring for each > thread. Like number of cache misses ... etc. I am still new to Jikes. > So I though I could start counting at the start of the thread and stop > counting on termination. > > Only on last thread, everything is gone (Heap, FDs ... etc). > > > On Mar 1, 2018, at 10:57 PM, Robin Garner <[email protected] > <mailto:[email protected]>> wrote: > >> Hi Khaled, >> >> I'm not entirely sure I follow what you're doing, but if I understand >> correctly, you've instrumented the suspend() method to execute some >> code just before (after) it blocks (?), and this is working just fine >> until VM shutdown ? >> >> Then when the VM is shutting down, you want to catch the suspension >> of the last thread, and do some kind of post-processing ? And this >> is where it's failing ? >> >> This isn't an area where I have much experience, but I wouldn't >> expect all threads to terminate in a nice clean way. Have you tried >> a standard shutdown hook ? >> Runtime.getRuntime().addShutdownHook(thread) >> or alternatively instrumenting VM.shutdown() or the sysExit syscall. >> >> >> I would imagine that many threads terminate abruptly as part of the >> OS cleanup on exit, in which case, you couldn't make any assumptions >> about the state of the (Java or Malloc) heap. >> >> Hope I'm not too far from the mark :) >> >> cheers >> >> >> On Wed, Feb 21, 2018 at 9:09 AM, Khaled Z Mahmoud >> <[email protected] <mailto:[email protected]>> wrote: >> >> Hi, >> >> In RVMThread, I inserted code in the suspend method to call a C >> function. >> However, it seems that, at the point when "the last RVMThread" >> suspend is called, any allocated heap area is removed at that time. >> >> Any attempt to access Heap Area fro C through pointers results in >> an ugly exception. >> Any ideas ? >> >> >> >> -- >> Regards, >> Khaled Mahmoud >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org <http://Slashdot.org>! >> http://sdm.link/slashdot >> _______________________________________________ >> Jikesrvm-researchers mailing list >> [email protected] >> <mailto:[email protected]> >> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers >> <https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org <http://Slashdot.org>! >> http://sdm.link/slashdot >> _______________________________________________ >> Jikesrvm-researchers mailing list >> [email protected] >> <mailto:[email protected]> >> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Jikesrvm-researchers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jikesrvm-researchers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers