< prev index next >
src/share/vm/jfr/leakprofiler/startOperation.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,59 ****
*/
#ifndef SHARE_VM_LEAKPROFILER_STARTOPERATION_HPP
#define SHARE_VM_LEAKPROFILER_STARTOPERATION_HPP
- #include "jfr/recorder/jfrRecorder.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 starting leak profiler object sampler
! class StartOperation : public VM_Operation {
private:
! jlong _sample_count;
public:
! StartOperation(jlong sample_count) :
! _sample_count(sample_count) {
! }
!
! Mode evaluation_mode() const {
! return _safepoint;
! }
!
! VMOp_Type type() const {
! return VMOp_GC_HeapInspection;
! }
!
virtual void doit() {
! assert(!LeakProfiler::is_running(), "invariant");
! jint queue_size = JfrOptionSet::old_object_queue_size();
! LeakProfiler::set_object_sampler(new ObjectSampler(queue_size));
! if (LogJFR && Verbose) tty->print_cr( "Object sampling started");
}
};
#endif // SHARE_VM_LEAKPROFILER_STARTOPERATION_HPP
--- 23,42 ----
*/
#ifndef SHARE_VM_LEAKPROFILER_STARTOPERATION_HPP
#define SHARE_VM_LEAKPROFILER_STARTOPERATION_HPP
#include "jfr/leakprofiler/sampling/objectSampler.hpp"
! #include "jfr/leakprofiler/utilities/vmOperation.hpp"
! // Safepoint operation for creating and starting the leak profiler object sampler
! class StartOperation : public OldObjectVMOperation {
private:
! int _sample_count;
public:
! StartOperation(int sample_count) : _sample_count(sample_count) {}
virtual void doit() {
! ObjectSampler::create(_sample_count);
}
};
#endif // SHARE_VM_LEAKPROFILER_STARTOPERATION_HPP
< prev index next >