Re: [rvm-research] IR class wrap around NormalMethod
"David P Grove" <[email protected]> Thu, 25 Mar 2021 08:24:29 -0500
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <OFBE6E4245.17AE2825-ON852586A3.00497689-852586A3.0049A726@notes.na.collabserv.com> |
--===============8613083557532142252== Content-type: multipart/alternative; Boundary="0__=0ABB0C30DFDAF0198f9e8a93df938690918c0ABB0C30DFDAF019" Content-Disposition: inline --0__=0ABB0C30DFDAF0198f9e8a93df938690918c0ABB0C30DFDAF019 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Kenan Liu via Jikesrvm-researchers <[email protected]> wrote on 03/24/2021 11:31:26 PM: > Hi, > > I have a few questions regarding the behavior after the > instrumentation inserted into the code as IR. > > When the user-defined methods inserted into the opt compiler. Let's > say, inserting the IR in the stage of hir2lir. Would the compiler > treat this IR/NormalMethod as the real method? To clarify it, does > this instrumentation=A0would introduce the real method invocations or > it would be inlined automatically? > If the IR instrumentation is treated as a method, is there any way > that I can explicitly inline it? > If the answers for both questions above are no. Is there any way > that I can add instrumentations without introducing extra method invocations? > Thanks, > Kenan Hi, Take a look at ExpandRuntimeServices.java ( https://github.com/JikesRVM/JikesRVM/blob/master/rvm/src/org/jikesrvm/compi= lers/opt/hir2lir/ExpandRuntimeServices.java ). This code is replacing HIR instructions like NEW with calls to runtime routines, then immediately inlining those calls. You should be able to do something similar to add your instrumentation. --dave --0__=0ABB0C30DFDAF0198f9e8a93df938690918c0ABB0C30DFDAF019 Content-Transfer-Encoding: quoted-printable Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline <html><body><p><tt><font size=3D"2">Kenan Liu via Jikesrvm-researchers <= [email protected]> wrote on 03/24/2021 11:31:26= PM:<br></font></tt><br><tt><font size=3D"2">> Hi,</font></tt><br><tt><f= ont size=3D"2">> <br>> I have a few questions regarding the behavior = after the <br>> instrumentation inserted into the code as IR.</font></tt= ><br><tt><font size=3D"2">> <br>> When the user-defined methods inser= ted into the opt compiler. Let's <br>> say, inserting the IR in the stag= e of hir2lir. Would the compiler <br>> treat this IR/NormalMethod as the= real method? To clarify it, does <br>> this instrumentation=A0would int= roduce the real method invocations or <br>> it would be inlined automati= cally?</font></tt><br><tt><font size=3D"2">> If the IR instrumentation i= s treated as a method, is there any way <br>> that I can explicitly inli= ne it?</font></tt><br><tt><font size=3D"2">> If the answers for both que= stions above are no. Is there any way <br>> that I can add instrumentati= ons without introducing extra method invocations?</font></tt><br><tt><font = size=3D"2">> Thanks,</font></tt><br><tt><font size=3D"2">> Kenan</fon= t></tt><br><br><br><tt><font size=3D"2">Hi,</font></tt><br><br><tt><font si= ze=3D"2"> Take a look at ExpandRuntimeServices.java (</font></tt><a = href=3D"https://github.com/JikesRVM/JikesRVM/blob/master/rvm/src/org/jikesr= vm/compilers/opt/hir2lir/ExpandRuntimeServices.java"><tt><font size=3D"2">h= ttps://github.com/JikesRVM/JikesRVM/blob/master/rvm/src/org/jikesrvm/compil= ers/opt/hir2lir/ExpandRuntimeServices.java</font></tt></a><tt><font size=3D= "2">). This code is replacing HIR instructions like NEW with calls to runti= me routines, then immediately inlining those calls. You should= be able to do something similar to add your instrumentation.</font></tt><b= r><br><tt><font size=3D"2">--dave</font></tt><br><BR> </body></html> --0__=0ABB0C30DFDAF0198f9e8a93df938690918c0ABB0C30DFDAF019-- --===============8613083557532142252== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8613083557532142252== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Jikesrvm-researchers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers --===============8613083557532142252==--