Revert^5 "Rewrite JVMTI method tracing to use trampolines"
This reverts commit d7da3147fea647ade418337aed6a8f9402412611.
Reason for revert: Tests are still failing on the buildbot.
Change-Id: Iaaac38137b1c4bed8e3a15b0c0c14730654025f6
diff --git a/openjdkjvmti/events.cc b/openjdkjvmti/events.cc
index 10a4923..f71a5dc 100644
--- a/openjdkjvmti/events.cc
+++ b/openjdkjvmti/events.cc
@@ -888,29 +888,16 @@
case ArtJvmtiEvent::kBreakpoint:
case ArtJvmtiEvent::kException:
return false;
- default:
- return true;
- }
-}
-
-static FullDeoptRequirement GetFullDeoptRequirement(ArtJvmtiEvent event) {
- switch (event) {
- // TODO We should support more of these as Limited or at least do something to make them
- // discriminate by thread.
+ // TODO We should support more of these or at least do something to make them discriminate by
+ // thread.
case ArtJvmtiEvent::kMethodEntry:
- case ArtJvmtiEvent::kMethodExit:
- // We only need MethodEntered and MethodExited for these so we can use Stubs. We will need to
- // disable intrinsics.
- // TODO Offer a version of this without disabling intrinsics.
- return FullDeoptRequirement::kStubs;
case ArtJvmtiEvent::kExceptionCatch:
+ case ArtJvmtiEvent::kMethodExit:
case ArtJvmtiEvent::kFieldModification:
case ArtJvmtiEvent::kFieldAccess:
case ArtJvmtiEvent::kSingleStep:
- // NB If we ever make this runnable using stubs or some other method we will need to be careful
- // that it doesn't require disabling intrinsics.
case ArtJvmtiEvent::kFramePop:
- return FullDeoptRequirement::kInterpreter;
+ return true;
default:
LOG(FATAL) << "Unexpected event type!";
UNREACHABLE();
@@ -920,18 +907,19 @@
void EventHandler::SetupTraceListener(JvmtiMethodTraceListener* listener,
ArtJvmtiEvent event,
bool enable) {
+ bool needs_full_deopt = EventNeedsFullDeopt(event);
// Make sure we can deopt.
{
art::ScopedObjectAccess soa(art::Thread::Current());
DeoptManager* deopt_manager = DeoptManager::Get();
if (enable) {
deopt_manager->AddDeoptimizationRequester();
- if (EventNeedsFullDeopt(event)) {
- deopt_manager->AddDeoptimizeAllMethods(GetFullDeoptRequirement(event));
+ if (needs_full_deopt) {
+ deopt_manager->AddDeoptimizeAllMethods();
}
} else {
- if (EventNeedsFullDeopt(event)) {
- deopt_manager->RemoveDeoptimizeAllMethods(GetFullDeoptRequirement(event));
+ if (needs_full_deopt) {
+ deopt_manager->RemoveDeoptimizeAllMethods();
}
deopt_manager->RemoveDeoptimizationRequester();
}