Re: [rvm-research] Interrupting JikesRVM thread periodically

Robin Garner <[email protected]> Fri, 16 Mar 2018 17:59:52 +1100
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
Yes, the opt compiler uses this kind of mechanism to do some of its 
sampling.  Look at RVMThread#yieldpoint(...) and TimerThread.

It's complicated, and I haven't used it myself.  The complication is 
that Java threads must only be interrupted at GC safe points, so any 
timer interrupt needs to tell the thread to take the next yieldpoint, 
and wait for the thread to arrive at the yieldpoint.

You should also look at the org.jikesrvm.adaptive.measurements package 
and see how the AOS system does this kind of thing.

cheers


On 16/03/18 12:45, Khaled Z Mahmoud wrote:
> Hi,
>
> Is there is a way in JikesRVM to interrupt a thread periodically ?
> For example, I want to interrupt a running thread every 2 milliseconds 
> and let it  execute a specific function ?
>
> Thanks
>
> -- 
> Regards,
> Khaled Mahmoud
>
>
> ------------------------------------------------------------------------------
> 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