src/hotspot/share/services/memTracker.cpp
changeset 59252 623722a6aeb9
parent 58927 d8aced36e872
child 59290 97d13893ec3c
equal deleted inserted replaced
59251:4cbfa5077d68 59252:623722a6aeb9
   181   // This function is called during both error reporting and normal VM exit.
   181   // This function is called during both error reporting and normal VM exit.
   182   // However, it should only ever run once.  E.g. if the VM crashes after
   182   // However, it should only ever run once.  E.g. if the VM crashes after
   183   // printing the final report during normal VM exit, it should not print
   183   // printing the final report during normal VM exit, it should not print
   184   // the final report again. In addition, it should be guarded from
   184   // the final report again. In addition, it should be guarded from
   185   // recursive calls in case NMT reporting itself crashes.
   185   // recursive calls in case NMT reporting itself crashes.
   186   if (Atomic::cmpxchg(true, &g_final_report_did_run, false) == false) {
   186   if (Atomic::cmpxchg(&g_final_report_did_run, false, true) == false) {
   187     NMT_TrackingLevel level = tracking_level();
   187     NMT_TrackingLevel level = tracking_level();
   188     if (level >= NMT_summary) {
   188     if (level >= NMT_summary) {
   189       report(level == NMT_summary, output);
   189       report(level == NMT_summary, output);
   190     }
   190     }
   191   }
   191   }