Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (408)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  -XX:+PrintCompilation - What's a zombie?  (Read 4293 times)
0 Members and 1 Guest are viewing this topic.
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Posted 2005-04-23 18:15:15 »

I was playing around with Mustang b33 and I flipped on the -XX:+PrintCompilation stuff.  (Sometimes it's fun to see what HotSpot is up to.)

After a while I noticed a bunch of lines like this:

522   made zombie  javax.swing.JComponent::paintChildren
551   made zombie  javax.swing.JComponent::_paintImmediately
576   made zombie  java.awt.Component::getGraphics
625   made zombie  com.sun.java.swing.SwingUtilities2::getFontMetrics

These mere methods that had been compiled earlier on in the execution of the program under test.  That first line appeared after the # in the first column had got to 1050.

A while ago someone posted a list somewhere the indicated what all the symbols between the # and the method signature meant (e.g. "!" and "s").  But "made zombie" is something new.

Just what does it mean?

*edit*
More info:
That first line:
522   made zombie  javax.swing.JComponent::paintChildren

was followed a while later by the more typical:
1062  !    javax.swing.JComponent::paintChildren (644 bytes)

and later:
1062   made zombie  javax.swing.JComponent::paintChildren

So it seems the zombies are given life again and then made back into zombies.
Maybe a "zombie" is simply excluded from further consideration for a while so HotSpot can focus on other methods?  I.e. maybe the method is a little too much of a "hot spot" and is dominating the time spent by the HotSpot optimizing code with little actual gains?  Just a guess.

Offline Azeem Jiva

Junior Member




Java VM Engineer, Sun Microsystems


« Reply #1 - Posted 2005-04-24 05:20:52 »

Quote

So it seems the zombies are given life again and then made back into zombies.
Maybe a "zombie" is simply excluded from further consideration for a while so HotSpot can focus on other methods?  I.e. maybe the method is a little too much of a "hot spot" and is dominating the time spent by the HotSpot optimizing code with little actual gains?  Just a guess.


Nah it's nothing like that, I'm not positive what the "make zombie" is but I'll check when I get to the office Monday
Offline K.I.L.E.R

Senior Member




Java games rock!


« Reply #2 - Posted 2005-04-24 08:27:53 »

Maybe it has something to do with left over debug code?
This is probably the silliest theory but it has happened before. Smiley

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Offline Raghar

Junior Member




Ue ni taete 'ru hitomi ni kono mi wa dou utsuru


« Reply #3 - Posted 2005-04-24 10:55:04 »

zombie - just wrapper for a future compiled code?
Offline Azeem Jiva

Junior Member




Java VM Engineer, Sun Microsystems


« Reply #4 - Posted 2005-04-25 20:07:34 »

Ahh ok, so here's what happened.  A Zombie method is one that is no longer entrant.  When this happens a native method can be swept by the GC and cleaned up.  The reason it's showing up now, is that the PrintCompilation code was cleaned up to show more information including the "made zombie" bit.  The actual code has always been there, but it's just being displayed as of a few builds ago.  Hope this helpes
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #5 - Posted 2005-04-26 01:14:34 »

Quote
A Zombie method is one that is no longer entrant.  


What exactly does that mean?

Offline Azeem Jiva

Junior Member




Java VM Engineer, Sun Microsystems


« Reply #6 - Posted 2005-04-26 05:06:51 »

Quote


What exactly does that mean?



Its a method that has been compiled (nmethod, or native method) that is been marked not entrant (enterable) for whatever reason.
Offline NVaidya

Junior Member




Java games rock!


« Reply #7 - Posted 2005-04-26 18:34:51 »

It is JustVoodooMagic  Grin

Gravity Sucks !
Offline Jeff

JGO Coder




Got any cats?


« Reply #8 - Posted 2005-04-26 18:38:58 »

Quote
It is JustVoodooMagic  Grin



lol Cool

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #9 - Posted 2005-04-27 16:03:04 »

Quote
Its a method that has been compiled (nmethod, or native method) that is been marked not entrant (enterable) for whatever reason.


That's what I thought.  I just can't see the circumstance in which it applies.  E.g. above I show paintComponent as the method and I just don't understand how paintComponent would no longer be "enterable"  (all of the UI is still visible throughout my test)

Perhaps I just need more coffee... or I'm oversimplifying.  

Is it correct to equate non-entrant with respect to methods as an equivalent of 'unreachable' with respect to objects?

Games published by our own members! Check 'em out!
Try the Free Demo of Droid Assault
Offline cliffc

Junior Newbie




Chief JVM Architect @ Azul Systems


« Reply #10 - Posted 2005-04-28 16:33:15 »

Zombie methods are methods whose code has been made invalid by class loading.  Generally the server compiler makes aggressive inlining decisions of non-final methods.  As long as the inlined method is never overridden the code is correct.  When a subclass is loaded and the method overridden, the compiled code is broken for all future calls to it.  The code gets declared "not entrant" (no future callers to the broken code), but sometimes existing callers can keep using the code.  In the case of inlining, that's not good enough; existing callers' stack frames are "deoptimized" when they return to the code from nested calls (or just if they are running in the code).  When no more stack frames hold PC's into the broken code it's declared a "zombie" - ready for removal once the GC gets around to it.

Cliff Click, PhD - org dot acm at cliffc
High Performance Java VM Design and Implementation
Azul Systems
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #11 - Posted 2005-04-28 20:15:03 »

Thanks Cliff,  that makes everything clear.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (131 views)
2013-05-17 21:29:12

alaslipknot (140 views)
2013-05-16 21:24:48

gouessej (170 views)
2013-05-16 00:53:38

gouessej (164 views)
2013-05-16 00:17:58

theagentd (174 views)
2013-05-15 15:01:13

theagentd (159 views)
2013-05-15 15:00:54

StreetDoggy (203 views)
2013-05-14 15:56:26

kutucuk (227 views)
2013-05-12 17:10:36

kutucuk (227 views)
2013-05-12 15:36:09

UnluckyDevil (230 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.122 seconds with 20 queries.