Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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 5987 times)
0 Members and 1 Guest are viewing this topic.
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Posted 2005-04-23 16: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 Duke




Java VM Engineer, Sun Microsystems


« Reply #1 - Posted 2005-04-24 03: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 Duke




Java games rock!


« Reply #2 - Posted 2005-04-24 06: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!
Legends of Yore - The Casual Retro Roguelike
Offline Raghar

Junior Duke




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


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

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

Junior Duke




Java VM Engineer, Sun Microsystems


« Reply #4 - Posted 2005-04-25 18: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


Exp: 12 years


Where's the Kaboom?


« Reply #5 - Posted 2005-04-25 23:14:34 »

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


What exactly does that mean?

Offline Azeem Jiva

Junior Duke




Java VM Engineer, Sun Microsystems


« Reply #6 - Posted 2005-04-26 03: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 Duke




Java games rock!


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

It is JustVoodooMagic  Grin

Gravity Sucks !
Offline Jeff

JGO Coder




Got any cats?


« Reply #8 - Posted 2005-04-26 16: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


Exp: 12 years


Where's the Kaboom?


« Reply #9 - Posted 2005-04-27 14: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!
Legends of Yore - The Casual Retro Roguelike
Offline cliffc

Junior Newbie




Chief JVM Architect @ Azul Systems


« Reply #10 - Posted 2005-04-28 14: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


Exp: 12 years


Where's the Kaboom?


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

Thanks Cliff,  that makes everything clear.

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

 

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

The first screenshot will be displayed as a thumbnail.

Longarmx (38 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (53 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (43 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!