(original) (raw)

Any words of wisdom? Thanks

sent from my phone

On Jun 3, 2015 12:02 PM, "Vitaly Davidovich" <vitalyd@gmail.com> wrote:
Hi,

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\]", buffer()->number\_of\_stubs());  
 }  
 buffer()->remove\_all();  
 init\_next\_stub();  
 }  
 release\_pending\_icholders();  
}  
What 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?

Thanks