summaryrefslogtreecommitdiff
path: root/runtime/entrypoints_order_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-05-23 07:28:07 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2024-06-20 10:50:35 +0000
commit7b23aad719b9cc4152355b7cf0fa49b040acd6ab (patch)
tree8e50f93ef6959b2e6a52e6afe6acb629b3d9cef0 /runtime/entrypoints_order_test.cc
parentdaf65911a4e8126d10a0d98b9e3bcb363d373a30 (diff)
Replace `ScopedAssertNoNewTransactionRecords`...
... with `ScopedAssertNoTransactionChecks`. The new check is stronger than the old one but does not work during early setup when we do not have a `Thread` object yet. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Iba5a5cda0d97993ff324b4d11de02cb07f770699
Diffstat (limited to 'runtime/entrypoints_order_test.cc')
-rw-r--r--runtime/entrypoints_order_test.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/runtime/entrypoints_order_test.cc b/runtime/entrypoints_order_test.cc
index 20f2863bb5..b25e01067b 100644
--- a/runtime/entrypoints_order_test.cc
+++ b/runtime/entrypoints_order_test.cc
@@ -105,16 +105,14 @@ class EntrypointsOrderTest : public CommonArtTest {
frame_id_to_shadow_frame, sizeof(void*));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, frame_id_to_shadow_frame, name, sizeof(void*));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, name, pthread_self, sizeof(void*));
- EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, pthread_self, last_no_thread_suspension_cause,
- sizeof(void*));
- EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, last_no_thread_suspension_cause,
- active_suspendall_barrier, sizeof(void*));
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, pthread_self, active_suspendall_barrier, sizeof(void*));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, active_suspendall_barrier,
active_suspend1_barriers, sizeof(void*));
- EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, active_suspend1_barriers, thread_local_pos, sizeof(void*));
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, active_suspend1_barriers, thread_local_start,
+ sizeof(void*));
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_start, thread_local_pos, sizeof(void*));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_pos, thread_local_end, sizeof(void*));
- EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_end, thread_local_start, sizeof(void*));
- EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_start, thread_local_limit, sizeof(void*));
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_end, thread_local_limit, sizeof(void*));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_limit, thread_local_objects, sizeof(void*));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_objects, checkpoint_function, sizeof(size_t));
EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, checkpoint_function, jni_entrypoints,
@@ -139,11 +137,17 @@ class EntrypointsOrderTest : public CommonArtTest {
Thread, tlsPtr_, method_trace_buffer, method_trace_buffer_index, sizeof(void*));
EXPECT_OFFSET_DIFFP(
Thread, tlsPtr_, method_trace_buffer_index, thread_exit_flags, sizeof(void*));
+ EXPECT_OFFSET_DIFFP(
+ Thread, tlsPtr_, thread_exit_flags, last_no_thread_suspension_cause, sizeof(void*));
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, last_no_thread_suspension_cause,
+ last_no_transaction_checks_cause, sizeof(void*));
// The first field after tlsPtr_ is forced to a 16 byte alignment so it might have some space.
auto offset_tlsptr_end = OFFSETOF_MEMBER(Thread, tlsPtr_) +
sizeof(decltype(reinterpret_cast<Thread*>(16)->tlsPtr_));
- CHECKED(offset_tlsptr_end - OFFSETOF_MEMBER(Thread, tlsPtr_.thread_exit_flags) == sizeof(void*),
- "async_exception last field");
+ CHECKED(
+ offset_tlsptr_end - OFFSETOF_MEMBER(Thread, tlsPtr_.last_no_transaction_checks_cause) ==
+ sizeof(void*),
+ "last_no_transaction_checks_cause last field");
}
void CheckJniEntryPoints() {