< prev index next >
src/hotspot/share/services/dtraceAttacher.cpp
Print this page
rev 56251 : imported patch 8226705-v1
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -31,27 +31,10 @@
#include "runtime/vmOperations.hpp"
#include "services/dtraceAttacher.hpp"
#ifdef SOLARIS
-class VM_DeoptimizeTheWorld : public VM_Operation {
- public:
- VMOp_Type type() const {
- return VMOp_DeoptimizeTheWorld;
- }
- void doit() {
- CodeCache::mark_all_nmethods_for_deoptimization();
- ResourceMark rm;
- DeoptimizationMarker dm;
- // Deoptimize all activations depending on marked methods
- Deoptimization::deoptimize_dependents();
-
- // Mark the dependent methods non entrant
- CodeCache::make_marked_nmethods_not_entrant();
- }
-};
-
static void set_bool_flag(const char* name, bool value) {
JVMFlag* flag = JVMFlag::find_flag(name);
JVMFlag::boolAtPut(flag, &value, JVMFlag::ATTACH_ON_DEMAND);
}
@@ -72,12 +55,12 @@
changed = true;
}
if (changed) {
// one or more flags changed, need to deoptimize
- VM_DeoptimizeTheWorld op;
- VMThread::execute(&op);
+ CodeCache::mark_all_nmethods_for_deoptimization();
+ Deoptimization::deoptimize_all_marked();
}
}
// Disable only the "fine grained" flags. Do *not* touch
// the overall "ExtendedDTraceProbes" flag.
@@ -95,12 +78,12 @@
set_bool_flag("DTraceMonitorProbes", false);
changed = true;
}
if (changed) {
// one or more flags changed, need to deoptimize
- VM_DeoptimizeTheWorld op;
- VMThread::execute(&op);
+ CodeCache::mark_all_nmethods_for_deoptimization();
+ Deoptimization::deoptimize_all_marked();
}
}
// Do clean-up on "all door clients detached" event.
void DTrace::detach_all_clients() {
< prev index next >