Hi John, > The HotSpot compiler has enough to do working with live code, so making > useful output for dead code is a very low priority.
understood. > I suggest using PrintAssembly to see what you get. I was trying to avoid this but now it looks like I have to sort out a not loadable hsdis-.jnilib error. (Mac OSX) > But I don't see a reason to care about it. You can't extrapolate the > optimizer's actions on provably dead values to actions on real code; the > inputs are way different. I'm not trying to extrapolate the optimizer's actions. I'm more interested in recognizing Hotspot activity from looking at the logs. This interest is in response to an engagement that I've completed where a lightly loaded instance of a system was running 20ms slower than a heavily loaded instance. It turned out that the decay rate on the counters prevented a key method from being compiled. I call this condition "luke-warm methods". So, I've been feeding the VM with code and looking at the logs so that I can recognize HotSpot activities in the future. The logs are a wee bit tricky to read but they are quite readable. The LogCompilation tooling was helpful (once I corrected the code for the hex format problem) in untangling things but I wasn't able to find anything that said, total is dead, get rid of it.. and then loop is empty, get rid of it. But, if it's not there.. I didn't miss anything. > > Given that 'total' is a dead value, you will end up with an empty loop. The > loop probably disappears also. So your dead method will have an empty body. > Perhaps it will deopt at the end of the loop, if the exit branch is not taken > until after compilation. > >> 1% com.kodewerk.mbm.DeadCode::deadMethod @ 12 (33 bytes) > = compilation task 1, type = osr, osr entry point = bci:12 Out of curiosity, the first compile_id tag was for java/lang/String hashCode and it's id was 1. The inlining compile_id also started with an id of 1. Is this because two threads are at work? The code is single threaded. Regards, Kirk > >> 19 com.kodewerk.mbm.DeadCode::deadMethod (33 bytes) > = compilation task 19, type = normal (entry point = bci:1) > > Best wishes, > -- John > > -- > You received this message because you are subscribed to the Google Groups > "JVM Languages" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/jvm-languages?hl=en. > -- You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en.
