Escape analysis for objects with injected fields
Doug Simon @ Oracle
doug.simon at oracle.com
Thu Nov 8 00:25:38 PST 2012
While debugging a deoptimization issue in Graal[1], I (painfully) learnt of the importance of field ordering in the relationship between escape analyzed (EA) objects and deoptimization. In particular, the values in the DebugInfo for an EA'ed object must correspond with the field order returned by Klass::do_nonstatic_fields(). However, that latter function does not include internal/injected fields such as the 'loader_data' and 'dependencies' fields injected into java.lang.ClassLoader instances. So, my question is what happens when such an object is EA'ed and rematerialized during deoptimization? As far as I can tell, these fields will be left uninitialized. At least, I cannot see any code in c1 or c2 (e.g., line 704 of [2]) that omits such objects from EA.
Am I missing something or is HotSpot just getting lucky by never determining that such objects are worthy of EA?
-Doug
[1] http://openjdk.java.net/projects/graal/
[2] http://hg.openjdk.java.net/hsx/hsx25/hotspot/raw-file/8e47bac5643a/src/share/vm/opto/macro.cpp
More information about the hotspot-dev
mailing list