< prev index next >

src/share/vm/jfr/leakprofiler/stopOperation.hpp

Print this page
rev 9055 : 8214542: JFR: Old Object Sample event slow on a deep heap in debug builds
Reviewed-by: egahlin, rwestberg

*** 23,55 **** */ #ifndef SHARE_VM_LEAKPROFILER_STOPOPERATION_HPP #define SHARE_VM_LEAKPROFILER_STOPOPERATION_HPP - #include "jfr/leakprofiler/leakProfiler.hpp" #include "jfr/leakprofiler/sampling/objectSampler.hpp" ! #include "jfr/recorder/service/jfrOptionSet.hpp" ! #include "runtime/vm_operations.hpp" ! // Safepoint operation for stopping leak profiler object sampler ! class StopOperation : public VM_Operation { public: - StopOperation() {} - - Mode evaluation_mode() const { - return _safepoint; - } - - VMOp_Type type() const { - return VMOp_GC_HeapInspection; - } - virtual void doit() { ! assert(LeakProfiler::is_running(), "invariant"); ! ObjectSampler* object_sampler = LeakProfiler::object_sampler(); ! delete object_sampler; ! LeakProfiler::set_object_sampler(NULL); ! if (LogJFR && Verbose) tty->print_cr( "Object sampling stopped"); } }; #endif // SHARE_VM_LEAKPROFILER_STOPOPERATION_HPP --- 23,39 ---- */ #ifndef SHARE_VM_LEAKPROFILER_STOPOPERATION_HPP #define SHARE_VM_LEAKPROFILER_STOPOPERATION_HPP #include "jfr/leakprofiler/sampling/objectSampler.hpp" ! #include "jfr/leakprofiler/utilities/vmOperation.hpp" ! // Safepoint operation for stopping and destroying the leak profiler object sampler ! class StopOperation : public OldObjectVMOperation { public: virtual void doit() { ! ObjectSampler::destroy(); } }; #endif // SHARE_VM_LEAKPROFILER_STOPOPERATION_HPP
< prev index next >