InlineCacheBuffer + GuaranteedSafepointInterval

Vitaly Davidovich vitalyd at
Wed Jun 3 16:02:34 UTC 2015


Could someone please explain the idea behind GuaranteedSafepointInterval
induced safepoints being gated on InlineCacheBuffer::is_empty() returning
false? This code in safepoint.cpp:

bool SafepointSynchronize::is_cleanup_needed() {
 // Need a safepoint if some inline cache buffers is non-empty
 if (!InlineCacheBuffer::is_empty()) return true;
 return false; <>}

Looking at icBuffer.cpp:

void InlineCacheBuffer::update_inline_caches() {
 if (buffer()->number_of_stubs() > 1) {
   if (TraceICBuffer) {
     tty->print_cr("[updating inline caches with %d stubs]",
   } <>
 } <>
exactly triggers IC holders to be eligible for deletion?

The reason behind this question is I'd like to eliminate "unnecessary"
safepoints that I'm seeing, but would like to understand implications
of this with respect to compiler infrastructure (C2, specifically).  I
have a fairly large code cache reserved, and the # of compiled methods
isn't too big, so space there shouldn't be an issue.

Why is GuaranteedSafepointInterval based safepoint actually gated on
this particular check? If I turn off background safepoints (i.e.
GuaranteedSafepointInterval=0) or set them very far apart, am I
risking stability problems, at least in terms of compiler?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the hotspot-compiler-dev mailing list