Weldon Washburn wrote:
A question for Harmony compiler developers. I have been tracing through the
code with the debugger. It looks like the JIT calls jvmti_safe_point on
back-branch polling. And the poll variable that is tested to determine if a
callout is required is hythread_t.request. Is this correct?
If the above is correct, does anyone know why the back-branch polling
support routine is called jvmti_safe_point? Is this support routine somehow
tied to JVMTI?
JIT inserts calls to safepoint VM helper on back branch polling. Somehow
in VM this helper was changed to always call jvmti_safe_point function
instead of hythread_safe_point when JVMTI is not enabled.
The jvmti_safe_point contains the usual safepoint functionality, but it
also checks whether a pop frame request has been set for the thread. Pop
frame checks are necessary for implementation of JVMTI PopFrame [1]
function.
I think that when JVMTI is not enabled the safepoint helper should call
a different function that doesn't perform pop frame checks. It will make
the code a bit faster.
[1] http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#PopFrame
--
Gregory