Remove unused fields in Thread.
Test: test.py
Change-Id: Iafc0be23eec86102844b127622be564f69c55eda
diff --git a/compiler/jni/jni_cfi_test_expected.inc b/compiler/jni/jni_cfi_test_expected.inc
index 20dc399..6278f12 100644
--- a/compiler/jni/jni_cfi_test_expected.inc
+++ b/compiler/jni/jni_cfi_test_expected.inc
@@ -3,7 +3,7 @@
0x2D, 0xE9, 0xE0, 0x4D, 0x2D, 0xED, 0x10, 0x8A, 0x85, 0xB0, 0x00, 0x90,
0x1D, 0x91, 0x8D, 0xED, 0x1E, 0x0A, 0x1F, 0x92, 0x20, 0x93, 0x88, 0xB0,
0x08, 0xB0, 0x05, 0xB0, 0xBD, 0xEC, 0x10, 0x8A, 0xBD, 0xE8, 0xE0, 0x4D,
- 0xD9, 0xF8, 0x30, 0x80, 0x70, 0x47,
+ 0xD9, 0xF8, 0x24, 0x80, 0x70, 0x47,
};
static constexpr uint8_t expected_cfi_kThumb2[] = {
0x44, 0x0E, 0x1C, 0x85, 0x07, 0x86, 0x06, 0x87, 0x05, 0x88, 0x04, 0x8A,
@@ -101,7 +101,7 @@
0xF3, 0x53, 0x45, 0xA9, 0xF5, 0x5B, 0x46, 0xA9, 0xF7, 0x63, 0x47, 0xA9,
0xF9, 0x6B, 0x48, 0xA9, 0xFB, 0x73, 0x49, 0xA9, 0xFD, 0x7B, 0x4A, 0xA9,
0xE8, 0x27, 0x41, 0x6D, 0xEA, 0x2F, 0x42, 0x6D, 0xEC, 0x37, 0x43, 0x6D,
- 0xEE, 0x3F, 0x44, 0x6D, 0x74, 0x32, 0x40, 0xB9, 0xFF, 0xC3, 0x02, 0x91,
+ 0xEE, 0x3F, 0x44, 0x6D, 0x74, 0x26, 0x40, 0xB9, 0xFF, 0xC3, 0x02, 0x91,
0xC0, 0x03, 0x5F, 0xD6,
};
static constexpr uint8_t expected_cfi_kArm64[] = {
diff --git a/compiler/utils/assembler_thumb_test_expected.cc.inc b/compiler/utils/assembler_thumb_test_expected.cc.inc
index 4205bf1..78fd90c 100644
--- a/compiler/utils/assembler_thumb_test_expected.cc.inc
+++ b/compiler/utils/assembler_thumb_test_expected.cc.inc
@@ -76,7 +76,7 @@
" f0: bc f1 00 0f cmp.w r12, #0\n"
" f4: 18 bf it ne\n"
" f6: 0d f2 01 4c addwne r12, sp, #1025\n"
- " fa: d9 f8 9c c0 ldr.w r12, [r9, #156]\n"
+ " fa: d9 f8 8c c0 ldr.w r12, [r9, #140]\n"
" fe: bc f1 00 0f cmp.w r12, #0\n"
" 102: 71 d1 bne 0x1e8 @ imm = #226\n"
" 104: cd f8 ff c7 str.w r12, [sp, #2047]\n"
@@ -150,10 +150,10 @@
" 212: 05 b0 add sp, #20\n"
" 214: bd ec 10 8a vpop {s16, s17, s18, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30, s31}\n"
" 218: bd e8 e0 4d pop.w {r5, r6, r7, r8, r10, r11, lr}\n"
- " 21c: d9 f8 30 80 ldr.w r8, [r9, #48]\n"
+ " 21c: d9 f8 24 80 ldr.w r8, [r9, #36]\n"
" 220: 70 47 bx lr\n"
" 222: 60 46 mov r0, r12\n"
- " 224: d9 f8 e0 e2 ldr.w lr, [r9, #736]\n"
+ " 224: d9 f8 d0 e2 ldr.w lr, [r9, #720]\n"
" 228: f0 47 blx lr\n"
};
diff --git a/runtime/entrypoints_order_test.cc b/runtime/entrypoints_order_test.cc
index cd43aaf..73f97bc 100644
--- a/runtime/entrypoints_order_test.cc
+++ b/runtime/entrypoints_order_test.cc
@@ -70,7 +70,7 @@
EXPECT_OFFSET_DIFFP(Thread, tls32_, daemon, throwing_OutOfMemoryError, 4);
EXPECT_OFFSET_DIFFP(Thread, tls32_, throwing_OutOfMemoryError, no_thread_suspension, 4);
EXPECT_OFFSET_DIFFP(Thread, tls32_, no_thread_suspension, thread_exit_check_count, 4);
- EXPECT_OFFSET_DIFFP(Thread, tls32_, thread_exit_check_count, handling_signal_, 4);
+ EXPECT_OFFSET_DIFFP(Thread, tls32_, thread_exit_check_count, is_transitioning_to_runnable, 4);
// TODO: Better connection. Take alignment into account.
EXPECT_OFFSET_DIFF_GT3(Thread, tls32_.thread_exit_check_count, tls64_.trace_clock_base, 4,
diff --git a/runtime/oat.h b/runtime/oat.h
index 84948e0..88af8ee 100644
--- a/runtime/oat.h
+++ b/runtime/oat.h
@@ -32,8 +32,8 @@
class PACKED(4) OatHeader {
public:
static constexpr std::array<uint8_t, 4> kOatMagic { { 'o', 'a', 't', '\n' } };
- // Last oat version changed reason: Thread offsets changed.
- static constexpr std::array<uint8_t, 4> kOatVersion { { '2', '0', '1', '\0' } };
+ // Last oat version changed reason: Removed unused fields in Thread.
+ static constexpr std::array<uint8_t, 4> kOatVersion { { '2', '0', '2', '\0' } };
static constexpr const char* kDex2OatCmdLineKey = "dex2oat-cmdline";
static constexpr const char* kDebuggableKey = "debuggable";
diff --git a/runtime/thread.h b/runtime/thread.h
index de7dfb0..7e60582 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -934,28 +934,6 @@
return handle_scope;
}
- // Indicates whether this thread is ready to invoke a method for debugging. This
- // is only true if the thread has been suspended by a debug event.
- bool IsReadyForDebugInvoke() const {
- return tls32_.ready_for_debug_invoke;
- }
-
- void SetReadyForDebugInvoke(bool ready) {
- tls32_.ready_for_debug_invoke = ready;
- }
-
- bool IsDebugMethodEntry() const {
- return tls32_.debug_method_entry_;
- }
-
- void SetDebugMethodEntry() {
- tls32_.debug_method_entry_ = true;
- }
-
- void ClearDebugMethodEntry() {
- tls32_.debug_method_entry_ = false;
- }
-
bool GetIsGcMarking() const {
CHECK(kUseReadBarrier);
return tls32_.is_gc_marking;
@@ -1219,14 +1197,6 @@
bool ProtectStack(bool fatal_on_error = true);
bool UnprotectStack();
- bool HandlingSignal() const {
- return tls32_.handling_signal_;
- }
-
- void SetHandlingSignal(bool handling_signal) {
- tls32_.handling_signal_ = handling_signal;
- }
-
bool IsTransitioningToRunnable() const {
return tls32_.is_transitioning_to_runnable;
}
@@ -1534,10 +1504,7 @@
throwing_OutOfMemoryError(false),
no_thread_suspension(0),
thread_exit_check_count(0),
- handling_signal_(false),
is_transitioning_to_runnable(false),
- ready_for_debug_invoke(false),
- debug_method_entry_(false),
is_gc_marking(false),
weak_ref_access_enabled(true),
disable_thread_flip_count(0),
@@ -1576,23 +1543,11 @@
// How many times has our pthread key's destructor been called?
uint32_t thread_exit_check_count;
- // True if signal is being handled by this thread.
- bool32_t handling_signal_;
-
// True if the thread is in TransitionFromSuspendedToRunnable(). This is used to distinguish the
// non-runnable threads (eg. kNative, kWaiting) that are about to transition to runnable from
// the rest of them.
bool32_t is_transitioning_to_runnable;
- // True if the thread has been suspended by a debugger event. This is
- // used to invoke method from the debugger which is only allowed when
- // the thread is suspended by an event.
- bool32_t ready_for_debug_invoke;
-
- // True if the thread enters a method. This is used to detect method entry
- // event for the debugger.
- bool32_t debug_method_entry_;
-
// True if the GC is in the marking phase. This is used for the CC collector only. This is
// thread local so that we can simplify the logic to check for the fast path of read barriers of
// GC roots.