Mercurial > hg > truffle
comparison src/share/vm/gc_interface/collectedHeap.cpp @ 4944:09d00c18e323
7145537: minor tweaks to LogEvents
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Wed, 15 Feb 2012 10:12:55 -0800 |
parents | aa3d708d67c4 |
children | cc74fa5a91a9 |
comparison
equal
deleted
inserted
replaced
4943:80107dc493db | 4944:09d00c18e323 |
---|---|
60 void GCHeapLog::log_heap(bool before) { | 60 void GCHeapLog::log_heap(bool before) { |
61 if (!should_log()) { | 61 if (!should_log()) { |
62 return; | 62 return; |
63 } | 63 } |
64 | 64 |
65 jlong timestamp = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; | 65 double timestamp = fetch_timestamp(); |
66 MutexLockerEx ml(&_mutex, Mutex::_no_safepoint_check_flag); | 66 MutexLockerEx ml(&_mutex, Mutex::_no_safepoint_check_flag); |
67 int index = compute_log_index(); | 67 int index = compute_log_index(); |
68 _records[index].thread = NULL; // Its the GC thread so it's not that interesting. | 68 _records[index].thread = NULL; // Its the GC thread so it's not that interesting. |
69 _records[index].timestamp = timestamp; | 69 _records[index].timestamp = timestamp; |
70 _records[index].data.is_before = before; | 70 _records[index].data.is_before = before; |
71 stringStream st(_records[index].data.buffer(), _records[index].data.size()); | 71 stringStream st(_records[index].data.buffer(), _records[index].data.size()); |
72 if (before) { | 72 if (before) { |
73 Universe::print_heap_before_gc(&st); | 73 Universe::print_heap_before_gc(&st, true); |
74 } else { | 74 } else { |
75 Universe::print_heap_after_gc(&st); | 75 Universe::print_heap_after_gc(&st, true); |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 // Memory state functions. | 79 // Memory state functions. |
80 | 80 |