summaryrefslogtreecommitdiff
path: root/runtime/instrumentation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/instrumentation.cc')
-rw-r--r--runtime/instrumentation.cc28
1 files changed, 3 insertions, 25 deletions
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index 8ef5ef41fc..b7f2c3c537 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -185,8 +185,7 @@ Instrumentation::Instrumentation()
deoptimization_enabled_(false),
interpreter_handler_table_(kMainHandlerTable),
quick_alloc_entry_points_instrumentation_counter_(0),
- alloc_entrypoints_instrumented_(false),
- can_use_instrumentation_trampolines_(true) {
+ alloc_entrypoints_instrumented_(false) {
}
void Instrumentation::InstallStubsForClass(ObjPtr<mirror::Class> klass) {
@@ -755,19 +754,6 @@ bool Instrumentation::RequiresInstrumentationInstallation(InstrumentationLevel n
return GetCurrentInstrumentationLevel() != new_level;
}
-void Instrumentation::UpdateInstrumentationLevels(InstrumentationLevel level) {
- if (level == InstrumentationLevel::kInstrumentWithInterpreter) {
- can_use_instrumentation_trampolines_ = false;
- }
- if (UNLIKELY(!can_use_instrumentation_trampolines_)) {
- for (auto& p : requested_instrumentation_levels_) {
- if (p.second == InstrumentationLevel::kInstrumentWithInstrumentationStubs) {
- p.second = InstrumentationLevel::kInstrumentWithInterpreter;
- }
- }
- }
-}
-
void Instrumentation::ConfigureStubs(const char* key, InstrumentationLevel desired_level) {
// Store the instrumentation level for this key or remove it.
if (desired_level == InstrumentationLevel::kInstrumentNothing) {
@@ -778,15 +764,12 @@ void Instrumentation::ConfigureStubs(const char* key, InstrumentationLevel desir
requested_instrumentation_levels_.Overwrite(key, desired_level);
}
- UpdateInstrumentationLevels(desired_level);
UpdateStubs();
}
-void Instrumentation::EnableSingleThreadDeopt() {
+void Instrumentation::EnableSingleThreadDeopt(const char* key) {
// Single-thread deopt only uses interpreter.
- can_use_instrumentation_trampolines_ = false;
- UpdateInstrumentationLevels(InstrumentationLevel::kInstrumentWithInterpreter);
- UpdateStubs();
+ ConfigureStubs(key, InstrumentationLevel::kInstrumentWithInterpreter);
}
void Instrumentation::UpdateInstrumentationLevel(InstrumentationLevel requested_level) {
@@ -800,11 +783,6 @@ void Instrumentation::UpdateStubs() {
requested_level = std::max(requested_level, v.second);
}
- DCHECK(can_use_instrumentation_trampolines_ ||
- requested_level != InstrumentationLevel::kInstrumentWithInstrumentationStubs)
- << "Use trampolines: " << can_use_instrumentation_trampolines_ << " level "
- << requested_level;
-
if (!RequiresInstrumentationInstallation(requested_level)) {
// We're already set.
return;