8049304: race between VM_Exit and _sync_FutileWakeups->inc()

Add PerfDataManager.has_PerfData() to indicate when PerfData objects should be safe to query. Update Java monitor PerfData usage to check the new flag. PerfDataManager::destroy() should only be called at a safepoint and when the StatSampler is not active.

Reviewed-by: kbarrett, dholmes, tbenson, bdelsart
6 files changed