Possible to inline is_zombie check?

Eric Caspole eric.caspole at amd.com
Wed Aug 22 07:57:33 PDT 2012


Hi hotspot team,
While profiling a customer app, I saw "nmethod::is_zombie() const"  
surprisingly high in the profile. It turns out that is_zombie() is  
virtual in CodeBlob, so it is always a call. But there is only one  
"guarantee" in CodeCache that takes advantage of the virtualness that  
can be coded around.

I have a simple microbenchmark, attached, mimicking the real app,  
attached, where "nmethod::is_zombie() const" is exercised due to  
frequent stack-walking. This webrev removes is_zombie as a virtual  
call so it can be inlined, and improves the performance of the  
microbenchmark by a few percent.

  http://cr.openjdk.java.net/~ecaspole/inline_zombie_check/webrev.00/

Regards,
Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: StreamChicken.java
Type: application/octet-stream
Size: 3718 bytes
Desc: StreamChicken.java
Url : http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20120822/ec678855/StreamChicken-0001.java 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Chicken.java
Type: application/octet-stream
Size: 103 bytes
Desc: Chicken.java
Url : http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20120822/ec678855/Chicken-0001.java 


More information about the hotspot-compiler-dev mailing list