16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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 class VM_DeoptimizeTheWorld : public VM_Operation {
37 public:
38 VMOp_Type type() const {
39 return VMOp_DeoptimizeTheWorld;
40 }
41 void doit() {
42 CodeCache::mark_all_nmethods_for_deoptimization();
43 ResourceMark rm;
44 DeoptimizationMarker dm;
45 // Deoptimize all activations depending on marked methods
46 Deoptimization::deoptimize_dependents();
47
48 // Mark the dependent methods non entrant
49 CodeCache::make_marked_nmethods_not_entrant();
50 }
51 };
52
53 static void set_bool_flag(const char* name, bool value) {
54 JVMFlag* flag = JVMFlag::find_flag(name);
55 JVMFlag::boolAtPut(flag, &value, JVMFlag::ATTACH_ON_DEMAND);
56 }
57
58 // Enable only the "fine grained" flags. Do *not* touch
59 // the overall "ExtendedDTraceProbes" flag.
60 void DTrace::enable_dprobes(int probes) {
61 bool changed = false;
62 if (!DTraceAllocProbes && (probes & DTRACE_ALLOC_PROBES)) {
63 set_bool_flag("DTraceAllocProbes", true);
64 changed = true;
65 }
66 if (!DTraceMethodProbes && (probes & DTRACE_METHOD_PROBES)) {
67 set_bool_flag("DTraceMethodProbes", true);
68 changed = true;
69 }
70 if (!DTraceMonitorProbes && (probes & DTRACE_MONITOR_PROBES)) {
71 set_bool_flag("DTraceMonitorProbes", true);
72 changed = true;
|
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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;
|