Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/shared/objectCountEventSender.cpp @ 12034:274ce305e5b9
8020598: ObjectCountEventSender::send needs INCLUDE_TRACE guards when building OpenJDK with INCLUDE_TRACE=0
Reviewed-by: stefank, brutisso, sjohanss
author | ehelin |
---|---|
date | Tue, 13 Aug 2013 18:16:19 +0200 |
parents | 6aa440bc1125 |
children | 86e6d691f2e1 |
comparison
equal
deleted
inserted
replaced
12032:5d9995d16b26 | 12034:274ce305e5b9 |
---|---|
30 #include "utilities/globalDefinitions.hpp" | 30 #include "utilities/globalDefinitions.hpp" |
31 | 31 |
32 #if INCLUDE_SERVICES | 32 #if INCLUDE_SERVICES |
33 | 33 |
34 void ObjectCountEventSender::send(const KlassInfoEntry* entry, GCId gc_id, jlong timestamp) { | 34 void ObjectCountEventSender::send(const KlassInfoEntry* entry, GCId gc_id, jlong timestamp) { |
35 #if INCLUDE_TRACE | |
35 assert(Tracing::is_event_enabled(EventObjectCountAfterGC::eventId), | 36 assert(Tracing::is_event_enabled(EventObjectCountAfterGC::eventId), |
36 "Only call this method if the event is enabled"); | 37 "Only call this method if the event is enabled"); |
37 | 38 |
38 EventObjectCountAfterGC event(UNTIMED); | 39 EventObjectCountAfterGC event(UNTIMED); |
39 event.set_gcId(gc_id); | 40 event.set_gcId(gc_id); |
40 event.set_class(entry->klass()); | 41 event.set_class(entry->klass()); |
41 event.set_count(entry->count()); | 42 event.set_count(entry->count()); |
42 event.set_totalSize(entry->words() * BytesPerWord); | 43 event.set_totalSize(entry->words() * BytesPerWord); |
43 event.set_endtime(timestamp); | 44 event.set_endtime(timestamp); |
44 event.commit(); | 45 event.commit(); |
46 #endif // INCLUDE_TRACE | |
45 } | 47 } |
46 | 48 |
47 bool ObjectCountEventSender::should_send_event() { | 49 bool ObjectCountEventSender::should_send_event() { |
48 #if INCLUDE_TRACE | 50 #if INCLUDE_TRACE |
49 return Tracing::is_event_enabled(EventObjectCountAfterGC::eventId); | 51 return Tracing::is_event_enabled(EventObjectCountAfterGC::eventId); |