Support unlimited pending checkpoints
Prevents the spinning that used to happen if RunCheckpoint was called
with 3 pending checkpoints. This spinning was done when holding
thread_list_lock_ and thread_suspend_count_lock_ and could deadlock
if any of the pending checkpoints required any of these locks.
The fix is to use an overflow list instead of having a fixed limit of
3.
Changed suspend stress test to have more threads and only compare last
line since there may be libbacktrace spam like:
"+E/libbacktrace(69891): void SignalHandler(int, siginfo_t *, void *):
Timed out waiting for unwind thread to indicate it completed."
Bug: 28988206
Change-Id: I2ae611506147d5199d59a08eee0395f7fa35d448
diff --git a/runtime/entrypoints_order_test.cc b/runtime/entrypoints_order_test.cc
index c621672..91deea0 100644
--- a/runtime/entrypoints_order_test.cc
+++ b/runtime/entrypoints_order_test.cc
@@ -112,10 +112,12 @@
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, checkpoint_functions,
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, last_no_thread_suspension_cause, checkpoint_function,
sizeof(void*));
- EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, checkpoint_functions, jni_entrypoints,
- sizeof(void*) * 6);
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, checkpoint_function, active_suspend_barriers,
+ sizeof(void*));
+ EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, active_suspend_barriers, jni_entrypoints,
+ sizeof(Thread::tls_ptr_sized_values::active_suspend_barriers));
// Skip across the entrypoints structures.