34
35 class VM_DeoptimizeTheWorld : public VM_Operation {
36 public:
37 VMOp_Type type() const {
38 return VMOp_DeoptimizeTheWorld;
39 }
40 void doit() {
41 CodeCache::mark_all_nmethods_for_deoptimization();
42 ResourceMark rm;
43 DeoptimizationMarker dm;
44 // Deoptimize all activations depending on marked methods
45 Deoptimization::deoptimize_dependents();
46
47 // Mark the dependent methods non entrant
48 CodeCache::make_marked_nmethods_not_entrant();
49 }
50 };
51
52 static void set_bool_flag(const char* flag, bool value) {
53 CommandLineFlags::boolAtPut((char*)flag, strlen(flag), &value,
54 ATTACH_ON_DEMAND);
55 }
56
57 // Enable only the "fine grained" flags. Do *not* touch
58 // the overall "ExtendedDTraceProbes" flag.
59 void DTrace::enable_dprobes(int probes) {
60 bool changed = false;
61 if (!DTraceAllocProbes && (probes & DTRACE_ALLOC_PROBES)) {
62 set_bool_flag("DTraceAllocProbes", true);
63 changed = true;
64 }
65 if (!DTraceMethodProbes && (probes & DTRACE_METHOD_PROBES)) {
66 set_bool_flag("DTraceMethodProbes", true);
67 changed = true;
68 }
69 if (!DTraceMonitorProbes && (probes & DTRACE_MONITOR_PROBES)) {
70 set_bool_flag("DTraceMonitorProbes", true);
71 changed = true;
72 }
73
74 if (changed) {
|
34
35 class VM_DeoptimizeTheWorld : public VM_Operation {
36 public:
37 VMOp_Type type() const {
38 return VMOp_DeoptimizeTheWorld;
39 }
40 void doit() {
41 CodeCache::mark_all_nmethods_for_deoptimization();
42 ResourceMark rm;
43 DeoptimizationMarker dm;
44 // Deoptimize all activations depending on marked methods
45 Deoptimization::deoptimize_dependents();
46
47 // Mark the dependent methods non entrant
48 CodeCache::make_marked_nmethods_not_entrant();
49 }
50 };
51
52 static void set_bool_flag(const char* flag, bool value) {
53 CommandLineFlags::boolAtPut((char*)flag, strlen(flag), &value,
54 Flag::ATTACH_ON_DEMAND);
55 }
56
57 // Enable only the "fine grained" flags. Do *not* touch
58 // the overall "ExtendedDTraceProbes" flag.
59 void DTrace::enable_dprobes(int probes) {
60 bool changed = false;
61 if (!DTraceAllocProbes && (probes & DTRACE_ALLOC_PROBES)) {
62 set_bool_flag("DTraceAllocProbes", true);
63 changed = true;
64 }
65 if (!DTraceMethodProbes && (probes & DTRACE_METHOD_PROBES)) {
66 set_bool_flag("DTraceMethodProbes", true);
67 changed = true;
68 }
69 if (!DTraceMonitorProbes && (probes & DTRACE_MONITOR_PROBES)) {
70 set_bool_flag("DTraceMonitorProbes", true);
71 changed = true;
72 }
73
74 if (changed) {
|