src/share/vm/code/codeCache.cpp
Print this page
rev 13113 : 8182651: Add TRACE_ONLY conditional macro to support more fine-grained INCLUDE_TRACE programming
Reviewed-by:
@@ -47,21 +47,23 @@
#include "runtime/icache.hpp"
#include "runtime/java.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/sweeper.hpp"
#include "services/memoryService.hpp"
-#include "trace/tracing.hpp"
#include "utilities/xmlstream.hpp"
#ifdef COMPILER1
#include "c1/c1_Compilation.hpp"
#include "c1/c1_Compiler.hpp"
#endif
#ifdef COMPILER2
#include "opto/c2compiler.hpp"
#include "opto/compile.hpp"
#include "opto/node.hpp"
#endif
+#if INCLUDE_TRACE
+#include "trace/tracing.hpp"
+#endif
// Helper class for printing in CodeCache
class CodeBlob_sizes {
private:
int count;
@@ -1353,10 +1355,11 @@
tty->print("%s", s.as_string());
}
heap->report_full();
+#if INCLUDE_TRACE
EventCodeCacheFull event;
if (event.should_commit()) {
event.set_codeBlobType((u1)code_blob_type);
event.set_startAddress((u8)heap->low_boundary());
event.set_commitedTopAddress((u8)heap->high());
@@ -1365,10 +1368,11 @@
event.set_methodCount(heap->nmethod_count());
event.set_adaptorCount(heap->adapter_count());
event.set_unallocatedCapacity(heap->unallocated_capacity());
event.set_fullCount(heap->full_count());
event.commit();
+#endif
}
}
PRAGMA_DIAG_POP
void CodeCache::print_memory_overhead() {
@@ -1622,6 +1626,5 @@
st->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'"
" adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
blob_count(), nmethod_count(), adapter_count(),
unallocated_capacity());
}
-