|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Compiler ran out of memory during compilation of ...Hi,
I am trying to insert my instrumentation code in the *ExpandRuntimeService* phase at each read/write access points, such as get/putstatic and get/putfield. However, I always get "Compiler ran out of memory during compilation of <some method>" error while I am using either BaseAdaptive/FullAdaptiveMarkSweep configuration. I tried to use -X:opt:print_all_ir=true and -X:gc:verbose=true, then found out that it would trigger GC at ExpandRuntimeService phase of each hot method and throw such error message. More specifically, Instruction writeInst = Call.create3( CALL, null, IRTools.AC(method.getOffset()), MethodOperand.STATIC(method), PutField.getRef(inst).copy(), actionCode, IRTools.IC(ref.getId()) ); writeInst.bcIndex = RUNTIME_SERVICES_BCI; writeInst.position = inst.position; inst.insertBefore(writeInst); next = writeInst.prevInstructionInCodeOrder(); According to this code, it seems that Call.creat3, .copy() and IC() will create new objects when it is called. Then GC is triggered. I just follow the way read/write barriers do. I am wondering whether there is anybody who also encountered such issue before. How to handle this problem? Thanks in advanced. Regards, Xinwei |
|
|
[rvm-research] Where is the age information stored in JikesRVMDear all,
As indicated in paul's survey, to implement advancement policies in copying GC, we need to create an "age" information in header field. Could anyone be kind to tell me where this information is stored in RVM? Thanks. -- Regards, Liangliang ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jikesrvm-researchers mailing list Jikesrvm-researchers@... https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers |
|
|
Re: [rvm-research] Compiler ran out of memory during compilation of ...Hi Xinwei,
I think your code is getting stuck in an infinite loop adding unlimited instructions. Specifically, your code adds writeInst before inst, then it sets next to the instruction before writeInst. Thus the ExpandRuntimeServices will next process the instruction before writeInst, then writeInst, and then inst again -- which will result in another writeInst getting added and the process repeating, hence the OOM error. Perhaps the easiest way to deal with the problem is to set next to the instruction after writeInst (which I guess is the same as leaving next unchanged?). The reason you might want to set next to a previous instruction is to make sure ExpandRuntimeServices processes new instructions that have been inserted -- but ExpandRuntimeServices doesn't do any processing for Call instructions. Things get more complicated if you inline the call; one easy way to deal with that is to store all the inserted calls in a set until the ExpandRuntimeServices loop is done, then finally inline all the calls in the set. The existing barrier insertion code doesn't run into this problem because it *replaces* the existing instruction, so it doesn't encounter it again and again. Cheers, Mike On Tue, 20 Oct 2009, Xinwei Xie wrote: > > Hi, > I am trying to insert my instrumentation code in the *ExpandRuntimeService* > phase at each read/write access points, such as get/putstatic and > get/putfield. However, I always get "Compiler ran out of memory during > compilation of <some method>" error while I am using either > BaseAdaptive/FullAdaptiveMarkSweep configuration. > I tried to use -X:opt:print_all_ir=true and -X:gc:verbose=true, then found > out that it would trigger GC at ExpandRuntimeService phase of each hot > method and throw such error message. More specifically, > > Instruction writeInst = > Call.create3( > CALL, > null, > IRTools.AC(method.getOffset()), > MethodOperand.STATIC(method), > PutField.getRef(inst).copy(), > actionCode, > IRTools.IC(ref.getId()) > ); > writeInst.bcIndex = RUNTIME_SERVICES_BCI; > writeInst.position = inst.position; > inst.insertBefore(writeInst); > next = writeInst.prevInstructionInCodeOrder(); > > According to this code, it seems that Call.creat3, .copy() and IC() will > create new objects when it is called. Then GC is triggered. I just follow > the way read/write barriers do. > I am wondering whether there is anybody who also encountered such issue > before. How to handle this problem? > > Thanks in advanced. > > Regards, > Xinwei > -- > View this message in context: http://www.nabble.com/Compiler-ran-out-of-memory-during-compilation-of-...-tp25971415p25971415.html > Sent from the jikesrvm-researchers mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Jikesrvm-researchers mailing list > Jikesrvm-researchers@... > https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jikesrvm-researchers mailing list Jikesrvm-researchers@... https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers |
|
|
Re: [rvm-research] Where is the age information stored in JikesRVM> As indicated in paul's survey, to implement advancement policies in
> copying GC, we need to create an "age" information in header field. > Could anyone be kind to tell me where this information is stored in RVM? It's not there by default, AFAIK. It you want a collector to do that, you would need to design an age field into the header, etc. It's possible, but I think a lot of us have generally felt that we might as well have more generations rather than paw over the same object multiple times before promoting it. Maybe some of the MMTK folk can wiegh in on this question? Best wishes -- Eliot Moss ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jikesrvm-researchers mailing list Jikesrvm-researchers@... https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers |
|
|
Re: [rvm-research] Where is the age information stored in JikesRVMOn 21 Oct 2009, at 15:41, Eliot Moss wrote:
Also not that you don't have to encode age by putting it in the header. You can also encode it by address (which can allow fractional ages). As for putting it in the header, MiscHeader.java is the place to look Richard
Richard Jones | Reader in Computer Systems | University of Kent Computing Laboratory, University of Kent, Canterbury, Kent CT2 7NF, UK T +44 1227 827943 | F +44 1227 762811 | W http://www.cs.kent.ac.uk/~rej/ ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jikesrvm-researchers mailing list Jikesrvm-researchers@... https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers |
|
|
Re: [rvm-research] Where is the age information stored in JikesRVMThanks very much.
Regards, Liangliang Tong Quoting Richard Jones <R.E.Jones@...>: > > On 21 Oct 2009, at 15:41, Eliot Moss wrote: > >>> As indicated in paul's survey, to implement advancement policies in >>> copying GC, we need to create an "age" information in header field. >>> Could anyone be kind to tell me where this information is stored in RVM? >> >> It's not there by default, AFAIK. It you want a collector to do that, >> you would need to design an age field into the header, etc. It's >> possible, but I think a lot of us have generally felt that we might >> as well have more generations rather than paw over the same object >> multiple times before promoting it. > > Although this is exactly what HotSpot does as far as I recall. > > Also not that you don't have to encode age by putting it in the > header. You can also encode it by address (which can allow > fractional ages). > > As for putting it in the header, MiscHeader.java is the place to look > > Richard > >> >> Maybe some of the MMTK folk can wiegh in on this question? >> >> Best wishes -- Eliot Moss >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> Jikesrvm-researchers mailing list >> Jikesrvm-researchers@... >> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers > > Richard Jones | Reader in Computer Systems | University of Kent > Computing Laboratory, University of Kent, Canterbury, Kent CT2 7NF, UK > T +44 1227 827943 | F +44 1227 762811 | W http://www.cs.kent.ac.uk/~rej/ > > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jikesrvm-researchers mailing list Jikesrvm-researchers@... https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers |
|
|
Re: [rvm-research] Compiler ran out of memory during compilation of ...Hi Michael,
Thanks for your hints. I did make such silly mistake. You are right, we need to set next to be unchanged so that it can continue process the *next* instruction. cheers, Xinwei
|
| Free embeddable forum powered by Nabble | Forum Help |