equal
deleted
inserted
replaced
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 } |