< prev index next >

src/hotspot/share/services/dtraceAttacher.cpp

Print this page


  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/codeCache.hpp"
  27 #include "memory/resourceArea.hpp"
  28 #include "runtime/deoptimization.hpp"
  29 #include "runtime/flags/jvmFlag.hpp"
  30 #include "runtime/vmThread.hpp"
  31 #include "runtime/vmOperations.hpp"
  32 #include "services/dtraceAttacher.hpp"
  33 
  34 #ifdef SOLARIS
  35 
  36 static void set_bool_flag(const char* name, bool value) {
  37   JVMFlag* flag = JVMFlag::find_flag(name);
  38   JVMFlag::boolAtPut(flag, &value, JVMFlag::ATTACH_ON_DEMAND);
  39 }
  40 
  41 // Enable only the "fine grained" flags. Do *not* touch
  42 // the overall "ExtendedDTraceProbes" flag.
  43 void DTrace::enable_dprobes(int probes) {
  44   bool changed = false;
  45   if (!DTraceAllocProbes && (probes & DTRACE_ALLOC_PROBES)) {
  46     set_bool_flag("DTraceAllocProbes", true);
  47     changed = true;
  48   }
  49   if (!DTraceMethodProbes && (probes & DTRACE_METHOD_PROBES)) {
  50     set_bool_flag("DTraceMethodProbes", true);
  51     changed = true;
  52   }
  53   if (!DTraceMonitorProbes && (probes & DTRACE_MONITOR_PROBES)) {
  54     set_bool_flag("DTraceMonitorProbes", true);
  55     changed = true;
  56   }
  57 
  58   if (changed) {




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/codeCache.hpp"
  27 #include "memory/resourceArea.hpp"
  28 #include "runtime/deoptimization.hpp"
  29 #include "runtime/flags/jvmFlag.hpp"
  30 #include "runtime/vmThread.hpp"
  31 #include "runtime/vmOperations.hpp"
  32 #include "services/dtraceAttacher.hpp"
  33 
  34 #ifdef SOLARIS
  35 
  36 static void set_bool_flag(const char* name, bool value) {
  37   JVMFlag* flag = JVMFlag::find_flag(name);
  38   JVMFlag::boolAtPut(flag, value, JVMFlag::ATTACH_ON_DEMAND);
  39 }
  40 
  41 // Enable only the "fine grained" flags. Do *not* touch
  42 // the overall "ExtendedDTraceProbes" flag.
  43 void DTrace::enable_dprobes(int probes) {
  44   bool changed = false;
  45   if (!DTraceAllocProbes && (probes & DTRACE_ALLOC_PROBES)) {
  46     set_bool_flag("DTraceAllocProbes", true);
  47     changed = true;
  48   }
  49   if (!DTraceMethodProbes && (probes & DTRACE_METHOD_PROBES)) {
  50     set_bool_flag("DTraceMethodProbes", true);
  51     changed = true;
  52   }
  53   if (!DTraceMonitorProbes && (probes & DTRACE_MONITOR_PROBES)) {
  54     set_bool_flag("DTraceMonitorProbes", true);
  55     changed = true;
  56   }
  57 
  58   if (changed) {


< prev index next >