summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Chang Xing <chxing@google.com> 2017-07-20 15:57:21 -0700
committer Chang Xing <chxing@google.com> 2017-07-26 16:26:23 -0700
commit605fe24d07062a038c8332a4d98f47052e9cee6a (patch)
tree9c6b132e5ec615d3f0f3aa4ab6f24486fb31d2bb /compiler/driver/compiler_driver.cc
parent5a906fcc111ffc07d9fd1e7265e8b4a89609f00e (diff)
Implemented Nested Transaction
Transaction can be created recursively and every transaction knows which class it is created for. The goal of implementing nested transaction is to let every class initialization (especially execution of class initializer) associates with one transaction which provides the ability to track whether field accesses are valid. To achieve this goal, we implemented a subclass for ClassLinker called AotClassLinker, which will be instantiated instead of ClassLinker under AOT compiler. All invocations of InitializeClass happens at AOT compiler will be wrapped with creating and destorying transactions. Transactions will be paused when rollbacking, otherwise the memory will not be rollbacked properly. The use the transaction is changed and all usage are updated, corresponding with native tests mentioning transaction, including transaction_test and unstarted_runtime_test. The validation rules will be implemented and explained in another CL. Test: make test-art-host -j64 Change-Id: If53d3ee3231c337a9ea917f5b885c173917765de
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index a932e381b6..7e31ff0024 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -2359,7 +2359,7 @@ class InitializeClassVisitor : public CompilationVisitor {
*file_log << exception->Dump() << "\n";
}
soa.Self()->ClearException();
- runtime->RollbackAndExitTransactionMode();
+ runtime->RollbackAllTransactions();
CHECK_EQ(old_status, klass->GetStatus()) << "Previous class status not restored";
} else if (is_boot_image) {
// For boot image, we want to put the updated status in the oat class since we can't