From 268764da8022cafa5661c5b514eaa343c5257e57 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 13 Sep 2016 12:09:38 -0700 Subject: Make ScopedAssertNoThreadSuspension no overhead for non-debug Previously it required Thread::Current() which may not be free. The plan is to add a lot more ScopedAssertNoThreadSuspension in the codebase. Also cleaned up callers. Bug: 31458474 Change-Id: I5a1621a5435476504d22266cc01a9bf26aab7568 --- compiler/driver/compiler_driver.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index daac7fbb96..72c54feaa8 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -2473,7 +2473,7 @@ class InitializeClassVisitor : public CompilationVisitor { // mode which prevents the GC from visiting objects modified during the transaction. // Ensure GC is not run so don't access freed objects when aborting transaction. - ScopedAssertNoThreadSuspension ants(soa.Self(), "Transaction end"); + ScopedAssertNoThreadSuspension ants("Transaction end"); runtime->ExitTransactionMode(); if (!success) { -- cgit v1.2.3-59-g8ed1b