Re: [rvm-research] Implementing my custom instrumentation
Robin Garner <[email protected]> Mon, 2 Jul 2018 12:38:36 +1000
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
On 01/07/18 11:10, Khaled Z Mahmoud wrote: > Hi, > > I have been looking at the opt package. The API has an IR class that > represents a compiled method. > This class enables iterating through all instructions of the method > and also enables inserting new instructions as well. I can for example > insert a method call. > > The questions are : > > * I want to perform instrumentation on call classes and methods, at > the baseline compiler. Can I still access the same API ? > No. The compilers are different codebases. The baseline compiler translates bytecode directly into machine instructions, and has no IR as such. > > * My instrumentation logic will also depend if the current > instruction is a yieldpoint. So, yieldpoint instrumentation should > be already done. > > Any ideas or suggestions on that ? If your instrumentation is amenable, you could try inserting it into the bytecode. There are libraries (i've used asm in the past) that make it pretty easy to do this kind of bytecode rewriting. Once the bytecode is instrumented, both compilers will generate code for it. cheers, Robin > > > > -- > 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