PcDesc/ScopeDesc vs jvmtiAddrLocationMap
Tom Rodriguez
Thomas.Rodriguez at Sun.COM
Fri Mar 19 16:23:45 PDT 2010
I've been looking more closely at the information we pass out the JVMTI to agents for profiling and I just realized we have a mismatch between how we record and use PcDescs and how JVMTI presents that to agents. We place our ScopeDescs after the instruction they are associated with, so given an instruction at pc the proper way to lookup the associated PcDesc is to searching at pc+1. This is handled transparently in our internal interfaces. jvmtiAddrLocationMap and the new jvmtiCompiledMethodLoadInlineRecord both present a model that starts from pc to the instruction that has debug info. This means that any external user asking questions using the data we provide will get answers that are off by a bit since the ranges are all effectively shifted by the instruction length.
I don't see any easy way to paper over this. Everything I come up with requires recording more information when we're building the ScopeDescs. Alternatively we could process and store the extra debug info recorded by DebugNonSafepoints differently so that it was suitable for use by JVMTI. Any good ideas?
tom
More information about the hotspot-compiler-dev
mailing list