< prev index next >

src/hotspot/share/jfr/recorder/jfrRecorder.cpp

Print this page


  27 #include "jfr/instrumentation/jfrJvmtiAgent.hpp"
  28 #include "jfr/jni/jfrJavaSupport.hpp"
  29 #include "jfr/periodic/jfrOSInterface.hpp"
  30 #include "jfr/periodic/sampling/jfrThreadSampler.hpp"
  31 #include "jfr/recorder/jfrRecorder.hpp"
  32 #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp"
  33 #include "jfr/recorder/repository/jfrRepository.hpp"
  34 #include "jfr/recorder/service/jfrOptionSet.hpp"
  35 #include "jfr/recorder/service/jfrPostBox.hpp"
  36 #include "jfr/recorder/service/jfrRecorderService.hpp"
  37 #include "jfr/recorder/service/jfrRecorderThread.hpp"
  38 #include "jfr/recorder/storage/jfrStorage.hpp"
  39 #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp"
  40 #include "jfr/recorder/stringpool/jfrStringPool.hpp"
  41 #include "jfr/utilities/jfrTime.hpp"
  42 #include "jfr/writers/jfrJavaEventWriter.hpp"
  43 #include "logging/log.hpp"
  44 #include "logging/logStream.hpp"
  45 #include "memory/resourceArea.inline.hpp"
  46 #include "runtime/handles.inline.hpp"
  47 #include "runtime/globals_extension.hpp"
  48 #include "utilities/growableArray.hpp"
  49 #ifdef ASSERT
  50 #include "prims/jvmtiEnvBase.hpp"
  51 #endif
  52 
  53 bool JfrRecorder::is_disabled() {
  54   // True if -XX:-FlightRecorder has been explicitly set on the
  55   // command line
  56   return FLAG_IS_CMDLINE(FlightRecorder) ? !FlightRecorder : false;
  57 }
  58 
  59 static bool _enabled = false;
  60 
  61 static bool enable() {
  62   assert(!_enabled, "invariant");
  63   if (!FlightRecorder) {
  64     FLAG_SET_MGMT(FlightRecorder, true);
  65   }
  66   _enabled = FlightRecorder;
  67   assert(_enabled, "invariant");




  27 #include "jfr/instrumentation/jfrJvmtiAgent.hpp"
  28 #include "jfr/jni/jfrJavaSupport.hpp"
  29 #include "jfr/periodic/jfrOSInterface.hpp"
  30 #include "jfr/periodic/sampling/jfrThreadSampler.hpp"
  31 #include "jfr/recorder/jfrRecorder.hpp"
  32 #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp"
  33 #include "jfr/recorder/repository/jfrRepository.hpp"
  34 #include "jfr/recorder/service/jfrOptionSet.hpp"
  35 #include "jfr/recorder/service/jfrPostBox.hpp"
  36 #include "jfr/recorder/service/jfrRecorderService.hpp"
  37 #include "jfr/recorder/service/jfrRecorderThread.hpp"
  38 #include "jfr/recorder/storage/jfrStorage.hpp"
  39 #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp"
  40 #include "jfr/recorder/stringpool/jfrStringPool.hpp"
  41 #include "jfr/utilities/jfrTime.hpp"
  42 #include "jfr/writers/jfrJavaEventWriter.hpp"
  43 #include "logging/log.hpp"
  44 #include "logging/logStream.hpp"
  45 #include "memory/resourceArea.inline.hpp"
  46 #include "runtime/handles.inline.hpp"
  47 #include "runtime/globals.hpp"
  48 #include "utilities/growableArray.hpp"
  49 #ifdef ASSERT
  50 #include "prims/jvmtiEnvBase.hpp"
  51 #endif
  52 
  53 bool JfrRecorder::is_disabled() {
  54   // True if -XX:-FlightRecorder has been explicitly set on the
  55   // command line
  56   return FLAG_IS_CMDLINE(FlightRecorder) ? !FlightRecorder : false;
  57 }
  58 
  59 static bool _enabled = false;
  60 
  61 static bool enable() {
  62   assert(!_enabled, "invariant");
  63   if (!FlightRecorder) {
  64     FLAG_SET_MGMT(FlightRecorder, true);
  65   }
  66   _enabled = FlightRecorder;
  67   assert(_enabled, "invariant");


< prev index next >