--- old/src/share/vm/runtime/sweeper.cpp 2020-01-16 16:56:34.163347433 +0300 +++ new/src/share/vm/runtime/sweeper.cpp 2020-01-16 16:56:34.115348981 +0300 @@ -28,7 +28,9 @@ #include "code/icBuffer.hpp" #include "code/nmethod.hpp" #include "compiler/compileBroker.hpp" +#if INCLUDE_JFR #include "jfr/jfrEvents.hpp" +#endif #include "memory/resourceArea.hpp" #include "oops/method.hpp" #include "runtime/atomic.hpp" @@ -318,6 +320,7 @@ } } +#if INCLUDE_JFR static void post_sweep_event(EventSweepCodeCache* event, const Ticks& start, const Ticks& end, @@ -335,6 +338,7 @@ event->set_zombifiedCount(zombified); event->commit(); } +#endif void NMethodSweeper::sweep_code_cache() { ResourceMark rm; @@ -410,10 +414,12 @@ _total_flushed_size += freed_memory; _total_nof_methods_reclaimed += _flushed_count; +#if INCLUDE_JFR EventSweepCodeCache event(UNTIMED); if (event.should_commit()) { post_sweep_event(&event, sweep_start_counter, sweep_end_counter, (s4)_traversals, swept_count, _flushed_count, _zombified_count); } +#endif #ifdef ASSERT if(PrintMethodFlushing) {