CR review request for 6880029

Xiaobin Lu Xiaobin.Lu at Sun.COM
Wed Sep 23 16:13:37 PDT 2009


Webrev: http://cr.openjdk.java.net/~xlu/6880029/webrev.00/

Details:

When "PrintSafepointStatistics" is set, safepoint statistics will be 
printed out when any safepoint reached. The current implementation has a 
race when after "os::make_polling_page_unreacheable" is called, but 
before "begin_statistics" is getting called. The problem is that the 
compiler thread might call 
SafepointSynchronize::handle_polling_page_exception during this time 
window, and call inc_page_count to increment the page trap count. The 
page trap count is stored in an array which hasn't been malloc'ed at 
this point however.

A fix is to move the initialization up before we call 
os::making_polling_page_unreacheable and that is what I am doing in the 
webrev. One thing to notice is that we have to check both 
PrintSafepointStatistics and PrintStafepointStatisticsTimeout before 
deferred_initilize_stat is called since both flag can be specified 
separately. After the initialization, we can rely solely on 
PrintSafepointStatistics.

Thanks in advance!

-Xiaobin




More information about the hotspot-dev mailing list