JIT stops compiling after a while (java 7)

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Aug 16 15:41:36 PDT 2013


Thank you, Martin, for the log file.

I see now why you have a problem with your test. Most of your 
compilations are OSR ('%') and we don't do flushing those because they 
are special and rare normally:

   38723 4869 % Runnable_4552::run @ 4 (31 bytes)
   38734 4870 % Runnable_4546::run @ 4 (31 bytes)

Note, OSR is OnStackReplacement compilation when method has very hot 
loop we compile only part of the method starting from that loop.
It is the first time I see that it could fill codecache.

I filed bug:

8023191: OSR nmethods should be flushed to free space in CodeCache

You should be able to see it soon:

http://bugs.sun.com/view_bug.do?bug_id=8023191

 > I can see GC events, and a bunch of messages from the sweeper, but 
not a single "flushing nmethod".

Next are "flushing nmethod" messages:

### sweeper: start_cleaning total_blobs='5073' nmethods='4867' 
adapters='166' free_code_cache='2024896' largest_free_block='1523840'
   38737 1 java.lang.String::hashCode (55 bytes) ### nmethod is 
speculatively disconnected
   38737 2 java.lang.String::indexOf (70 bytes) ### nmethod is 
speculatively disconnected


Regards,
Vladimir

On 8/14/13 11:24 PM, Martin Traverso wrote:
>
>     We have several bugs opened and we are working on them.
>
>
> Is there a bug report you could point me to?
>
>
>     You can try to play with next 2 flags to see if it helps:
>
>     product(intx,  MinCodeCacheFlushingInterval, 30,
>              "Min number of seconds between code cache cleaning sessions")
>
>     product(uintx,  CodeCacheFlushingMinimumFreeSp__ace, 1500*K,
>             "When less than X space left, start code cache cleaning")
>
>
> Tweaking these didn't seem to help.
>
>
>
>     If you can build fastdebug VM you can run it with
>     -XX:+PrintMethodFlushing to see what happened.
>
>
> Here's a sample trace with PrintCompilation, PrintGCDetails and
> PrintMethodFlushing:
>
> https://github.com/martint/jittest/blob/master/stats-7u40-fastdebug.txt
>
> I can see GC events, and a bunch of messages from the sweeper, but not a
> single "flushing nmethod".
>
> Here's another run with the variant that calls System.gc() every second.
> This one does show "flushing nmethod" messages:
>
> https://github.com/martint/jittest/blob/master/stats-7u40-fastdebug-force-gc.txt
>
>
>     Do you have normal GC events (young gen collections)
>     -XX:+PrintGCDetails? Methods usage marking and CodeCache sweeping
>     initiation happen only during safepoints (usually when GC is needed)
>     when all java threads are stopped.
>
>
> Yes, there are normal GC events throughout the entire execution.
>
>
> Thanks,
> Martin


More information about the hotspot-compiler-dev mailing list