Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Andreas Gampe | 8cf9cb3 | 2017-07-19 09:28:38 -0700 | [diff] [blame] | 17 | #include <memory> |
| 18 | |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 19 | #include "base/macros.h" |
| 20 | #include "common_runtime_test.h" |
| 21 | #include "thread.h" |
| 22 | |
| 23 | // This test checks the offsets of values in the thread TLS and entrypoint structures. A failure |
| 24 | // of this test means that offsets have changed from the last update of the test. This indicates |
| 25 | // that an oat version bump may be in order, and some defines should be carefully checked (or their |
| 26 | // corresponding tests run). |
| 27 | |
| 28 | namespace art { |
| 29 | |
| 30 | // OFFSETOF_MEMBER uses reinterpret_cast. This means it is not a constexpr. So we cannot use |
| 31 | // compile-time assertions. Once we find another way, adjust the define accordingly. |
| 32 | #define CHECKED(expr, name) \ |
| 33 | EXPECT_TRUE(expr) << #name |
| 34 | |
| 35 | // Macro to check whether two fields have an expected difference in offsets. The error is named |
| 36 | // name. |
| 37 | #define EXPECT_OFFSET_DIFF(first_type, first_field, second_type, second_field, diff, name) \ |
| 38 | CHECKED(OFFSETOF_MEMBER(second_type, second_field) \ |
Chih-Hung Hsieh | 1a0de6a | 2016-08-26 15:06:11 -0700 | [diff] [blame] | 39 | - OFFSETOF_MEMBER(first_type, first_field) == (diff), name) |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 40 | |
| 41 | // Helper macro for when the fields are from the same type. |
| 42 | #define EXPECT_OFFSET_DIFFNP(type, first_field, second_field, diff) \ |
| 43 | EXPECT_OFFSET_DIFF(type, first_field, type, second_field, diff, \ |
| 44 | type ## _ ## first_field ## _ ## second_field) |
| 45 | |
| 46 | // Helper macro for when the fields are from the same type and in the same member of said type. |
Chih-Hung Hsieh | 1a0de6a | 2016-08-26 15:06:11 -0700 | [diff] [blame] | 47 | // NOLINT, do not add parentheses around 'prefix'. |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 48 | #define EXPECT_OFFSET_DIFFP(type, prefix, first_field, second_field, diff) \ |
Chih-Hung Hsieh | 1a0de6a | 2016-08-26 15:06:11 -0700 | [diff] [blame] | 49 | EXPECT_OFFSET_DIFF(type, prefix . first_field, type, prefix . second_field, diff, /* NOLINT */ \ |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 50 | type ## _ ## prefix ## _ ## first_field ## _ ## second_field) |
| 51 | |
| 52 | // Macro to check whether two fields have at least an expected difference in offsets. The error is |
| 53 | // named name. |
| 54 | #define EXPECT_OFFSET_DIFF_GT(first_type, first_field, second_type, second_field, diff, name) \ |
| 55 | CHECKED(OFFSETOF_MEMBER(second_type, second_field) \ |
Chih-Hung Hsieh | 1a0de6a | 2016-08-26 15:06:11 -0700 | [diff] [blame] | 56 | - OFFSETOF_MEMBER(first_type, first_field) >= (diff), name) |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 57 | |
| 58 | // Helper macro for when the fields are from the same type. |
| 59 | #define EXPECT_OFFSET_DIFF_GT3(type, first_field, second_field, diff, name) \ |
| 60 | EXPECT_OFFSET_DIFF_GT(type, first_field, type, second_field, diff, name) |
| 61 | |
| 62 | class EntrypointsOrderTest : public CommonRuntimeTest { |
| 63 | protected: |
| 64 | void CheckThreadOffsets() { |
| 65 | CHECKED(OFFSETOF_MEMBER(Thread, tls32_.state_and_flags) == 0, thread_flags_at_zero); |
| 66 | EXPECT_OFFSET_DIFFP(Thread, tls32_, state_and_flags, suspend_count, 4); |
Alex Light | 72e27b0 | 2020-07-27 12:59:58 -0700 | [diff] [blame] | 67 | EXPECT_OFFSET_DIFFP(Thread, tls32_, suspend_count, thin_lock_thread_id, 4); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 68 | EXPECT_OFFSET_DIFFP(Thread, tls32_, thin_lock_thread_id, tid, 4); |
| 69 | EXPECT_OFFSET_DIFFP(Thread, tls32_, tid, daemon, 4); |
| 70 | EXPECT_OFFSET_DIFFP(Thread, tls32_, daemon, throwing_OutOfMemoryError, 4); |
| 71 | EXPECT_OFFSET_DIFFP(Thread, tls32_, throwing_OutOfMemoryError, no_thread_suspension, 4); |
| 72 | EXPECT_OFFSET_DIFFP(Thread, tls32_, no_thread_suspension, thread_exit_check_count, 4); |
Nicolas Geoffray | 4d29efc | 2021-10-07 15:15:08 +0100 | [diff] [blame] | 73 | EXPECT_OFFSET_DIFFP(Thread, tls32_, thread_exit_check_count, is_transitioning_to_runnable, 4); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 74 | |
| 75 | // TODO: Better connection. Take alignment into account. |
| 76 | EXPECT_OFFSET_DIFF_GT3(Thread, tls32_.thread_exit_check_count, tls64_.trace_clock_base, 4, |
| 77 | thread_tls32_to_tls64); |
| 78 | |
Sebastien Hertz | 0747466 | 2015-08-25 15:12:33 +0000 | [diff] [blame] | 79 | EXPECT_OFFSET_DIFFP(Thread, tls64_, trace_clock_base, stats, 8); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 80 | |
| 81 | // TODO: Better connection. Take alignment into account. |
| 82 | EXPECT_OFFSET_DIFF_GT3(Thread, tls64_.stats, tlsPtr_.card_table, 8, thread_tls64_to_tlsptr); |
| 83 | |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 84 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, card_table, exception, sizeof(void*)); |
| 85 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, exception, stack_end, sizeof(void*)); |
| 86 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, stack_end, managed_stack, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 87 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, managed_stack, suspend_trigger, sizeof(ManagedStack)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 88 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, suspend_trigger, jni_env, sizeof(void*)); |
Andreas Gampe | 449357d | 2015-06-01 22:29:51 -0700 | [diff] [blame] | 89 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, jni_env, tmp_jni_env, sizeof(void*)); |
| 90 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, tmp_jni_env, self, sizeof(void*)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 91 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, self, opeer, sizeof(void*)); |
| 92 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, opeer, jpeer, sizeof(void*)); |
| 93 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, jpeer, stack_begin, sizeof(void*)); |
| 94 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, stack_begin, stack_size, sizeof(void*)); |
Nicolas Geoffray | 340dafa | 2016-11-18 16:03:10 +0000 | [diff] [blame] | 95 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, stack_size, deps_or_stack_trace_sample, sizeof(void*)); |
| 96 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, deps_or_stack_trace_sample, wait_next, sizeof(void*)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 97 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, wait_next, monitor_enter_object, sizeof(void*)); |
| 98 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, monitor_enter_object, top_handle_scope, sizeof(void*)); |
| 99 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, top_handle_scope, class_loader_override, sizeof(void*)); |
| 100 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, class_loader_override, long_jump_context, sizeof(void*)); |
| 101 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, long_jump_context, instrumentation_stack, sizeof(void*)); |
Alex Light | fc58809 | 2020-01-23 15:39:08 -0800 | [diff] [blame] | 102 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, instrumentation_stack, stacked_shadow_frame_record, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 103 | sizeof(void*)); |
Mingyao Yang | 1f2d3ba | 2015-05-18 12:12:50 -0700 | [diff] [blame] | 104 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, stacked_shadow_frame_record, |
Sebastien Hertz | 0747466 | 2015-08-25 15:12:33 +0000 | [diff] [blame] | 105 | deoptimization_context_stack, sizeof(void*)); |
Mingyao Yang | 99170c6 | 2015-07-06 11:10:37 -0700 | [diff] [blame] | 106 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, deoptimization_context_stack, |
| 107 | frame_id_to_shadow_frame, sizeof(void*)); |
| 108 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, frame_id_to_shadow_frame, name, sizeof(void*)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 109 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, name, pthread_self, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 110 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, pthread_self, last_no_thread_suspension_cause, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 111 | sizeof(void*)); |
Mathieu Chartier | 952e1e3 | 2016-06-13 14:04:02 -0700 | [diff] [blame] | 112 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, last_no_thread_suspension_cause, checkpoint_function, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 113 | sizeof(void*)); |
Mathieu Chartier | 952e1e3 | 2016-06-13 14:04:02 -0700 | [diff] [blame] | 114 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, checkpoint_function, active_suspend_barriers, |
| 115 | sizeof(void*)); |
Roland Levillain | e71b354 | 2017-01-16 14:58:23 +0000 | [diff] [blame] | 116 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, active_suspend_barriers, thread_local_start, |
Mathieu Chartier | 952e1e3 | 2016-06-13 14:04:02 -0700 | [diff] [blame] | 117 | sizeof(Thread::tls_ptr_sized_values::active_suspend_barriers)); |
Roland Levillain | e71b354 | 2017-01-16 14:58:23 +0000 | [diff] [blame] | 118 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_start, thread_local_pos, sizeof(void*)); |
| 119 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_pos, thread_local_end, sizeof(void*)); |
Mathieu Chartier | 28a24b3 | 2017-04-19 23:54:33 -0700 | [diff] [blame] | 120 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_end, thread_local_limit, sizeof(void*)); |
| 121 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_limit, thread_local_objects, sizeof(void*)); |
Roland Levillain | e71b354 | 2017-01-16 14:58:23 +0000 | [diff] [blame] | 122 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_objects, jni_entrypoints, sizeof(size_t)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 123 | |
| 124 | // Skip across the entrypoints structures. |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 125 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, rosalloc_runs, thread_local_alloc_stack_top, |
Hiroshi Yamauchi | 7ed9c56 | 2016-02-02 15:22:09 -0800 | [diff] [blame] | 126 | sizeof(void*) * kNumRosAllocThreadLocalSizeBracketsInThread); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 127 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_alloc_stack_top, thread_local_alloc_stack_end, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 128 | sizeof(void*)); |
Vladimir Marko | 23cf32f | 2021-11-15 13:38:02 +0000 | [diff] [blame] | 129 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_alloc_stack_end, mutator_lock, sizeof(void*)); |
| 130 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, mutator_lock, held_mutexes, sizeof(void*)); |
Josh Gao | efd20cb | 2017-02-28 16:53:59 -0800 | [diff] [blame] | 131 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, held_mutexes, flip_function, |
Hiroshi Yamauchi | 2cd334a | 2015-01-09 14:03:35 -0800 | [diff] [blame] | 132 | sizeof(void*) * kLockLevelCount); |
Mathieu Chartier | 12d625f | 2015-03-13 11:33:37 -0700 | [diff] [blame] | 133 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, flip_function, method_verifier, sizeof(void*)); |
Hiroshi Yamauchi | 0b71357 | 2015-06-16 18:29:23 -0700 | [diff] [blame] | 134 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, method_verifier, thread_local_mark_stack, sizeof(void*)); |
Alex Light | 848574c | 2017-09-25 16:59:39 -0700 | [diff] [blame] | 135 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_mark_stack, async_exception, sizeof(void*)); |
Alex Light | 55eccdf | 2019-10-07 13:51:13 +0000 | [diff] [blame] | 136 | EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, async_exception, top_reflective_handle_scope, |
| 137 | sizeof(void*)); |
Alex Light | bb68fda | 2018-10-01 13:21:47 -0700 | [diff] [blame] | 138 | // The first field after tlsPtr_ is forced to a 16 byte alignment so it might have some space. |
| 139 | auto offset_tlsptr_end = OFFSETOF_MEMBER(Thread, tlsPtr_) + |
| 140 | sizeof(decltype(reinterpret_cast<Thread*>(16)->tlsPtr_)); |
Ulya Trafimovich | 5439f05 | 2020-07-29 10:03:46 +0100 | [diff] [blame] | 141 | CHECKED(offset_tlsptr_end - OFFSETOF_MEMBER(Thread, tlsPtr_.top_reflective_handle_scope) == |
| 142 | sizeof(void*), |
| 143 | "async_exception last field"); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 144 | } |
| 145 | |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 146 | void CheckJniEntryPoints() { |
| 147 | CHECKED(OFFSETOF_MEMBER(JniEntryPoints, pDlsymLookup) == 0, |
| 148 | JniEntryPoints_start_with_dlsymlookup); |
Vladimir Marko | fa458ac | 2020-02-12 14:08:07 +0000 | [diff] [blame] | 149 | CHECKED(OFFSETOF_MEMBER(JniEntryPoints, pDlsymLookup) + sizeof(void*) == |
| 150 | OFFSETOF_MEMBER(JniEntryPoints, pDlsymLookupCritical), |
| 151 | JniEntryPoints_dlsymlookup_critical); |
| 152 | CHECKED(OFFSETOF_MEMBER(JniEntryPoints, pDlsymLookupCritical) + sizeof(void*) == |
| 153 | sizeof(JniEntryPoints), |
| 154 | JniEntryPoints_all); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 155 | } |
| 156 | |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 157 | void CheckQuickEntryPoints() { |
Nicolas Geoffray | 8d91ac3 | 2017-01-18 18:07:15 +0000 | [diff] [blame] | 158 | CHECKED(OFFSETOF_MEMBER(QuickEntryPoints, pAllocArrayResolved) == 0, |
| 159 | QuickEntryPoints_start_with_allocarray_resoved); |
Nicolas Geoffray | b048cb7 | 2017-01-23 22:50:24 +0000 | [diff] [blame] | 160 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocArrayResolved, pAllocArrayResolved8, |
| 161 | sizeof(void*)); |
| 162 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocArrayResolved8, pAllocArrayResolved16, |
| 163 | sizeof(void*)); |
| 164 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocArrayResolved16, pAllocArrayResolved32, |
| 165 | sizeof(void*)); |
| 166 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocArrayResolved32, pAllocArrayResolved64, |
| 167 | sizeof(void*)); |
| 168 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocArrayResolved64, pAllocObjectResolved, |
Nicolas Geoffray | 0d3998b | 2017-01-12 15:35:12 +0000 | [diff] [blame] | 169 | sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 170 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocObjectResolved, pAllocObjectInitialized, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 171 | sizeof(void*)); |
Nicolas Geoffray | 0d3998b | 2017-01-12 15:35:12 +0000 | [diff] [blame] | 172 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocObjectInitialized, pAllocObjectWithChecks, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 173 | sizeof(void*)); |
Alex Light | d109e30 | 2018-06-27 10:25:41 -0700 | [diff] [blame] | 174 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocObjectWithChecks, pAllocStringObject, |
| 175 | sizeof(void*)); |
| 176 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocStringObject, pAllocStringFromBytes, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 177 | sizeof(void*)); |
Jeff Hao | 848f70a | 2014-01-15 13:49:50 -0800 | [diff] [blame] | 178 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocStringFromBytes, pAllocStringFromChars, |
| 179 | sizeof(void*)); |
| 180 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocStringFromChars, pAllocStringFromString, |
| 181 | sizeof(void*)); |
| 182 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAllocStringFromString, pInstanceofNonTrivial, |
| 183 | sizeof(void*)); |
Mathieu Chartier | b99f4d6 | 2016-11-07 16:17:26 -0800 | [diff] [blame] | 184 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInstanceofNonTrivial, pCheckInstanceOf, sizeof(void*)); |
| 185 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCheckInstanceOf, pInitializeStaticStorage, |
| 186 | sizeof(void*)); |
Vladimir Marko | 9d47925 | 2018-07-24 11:35:20 +0100 | [diff] [blame] | 187 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInitializeStaticStorage, pResolveTypeAndVerifyAccess, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 188 | sizeof(void*)); |
Vladimir Marko | 9d47925 | 2018-07-24 11:35:20 +0100 | [diff] [blame] | 189 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pResolveTypeAndVerifyAccess, pResolveType, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 190 | sizeof(void*)); |
Vladimir Marko | 9d47925 | 2018-07-24 11:35:20 +0100 | [diff] [blame] | 191 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pResolveType, pResolveMethodHandle, sizeof(void*)); |
Orion Hodson | dbaa5c7 | 2018-05-10 08:22:46 +0100 | [diff] [blame] | 192 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pResolveMethodHandle, pResolveMethodType, sizeof(void*)); |
Orion Hodson | 18259d7 | 2018-04-12 11:18:23 +0100 | [diff] [blame] | 193 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pResolveMethodType, pResolveString, sizeof(void*)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 194 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pResolveString, pSet8Instance, sizeof(void*)); |
| 195 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSet8Instance, pSet8Static, sizeof(void*)); |
| 196 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSet8Static, pSet16Instance, sizeof(void*)); |
| 197 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSet16Instance, pSet16Static, sizeof(void*)); |
| 198 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSet16Static, pSet32Instance, sizeof(void*)); |
| 199 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSet32Instance, pSet32Static, sizeof(void*)); |
| 200 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSet32Static, pSet64Instance, sizeof(void*)); |
| 201 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSet64Instance, pSet64Static, sizeof(void*)); |
| 202 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSet64Static, pSetObjInstance, sizeof(void*)); |
| 203 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSetObjInstance, pSetObjStatic, sizeof(void*)); |
| 204 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSetObjStatic, pGetByteInstance, sizeof(void*)); |
| 205 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetByteInstance, pGetBooleanInstance, sizeof(void*)); |
| 206 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetBooleanInstance, pGetByteStatic, sizeof(void*)); |
| 207 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetByteStatic, pGetBooleanStatic, sizeof(void*)); |
| 208 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetBooleanStatic, pGetShortInstance, sizeof(void*)); |
| 209 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetShortInstance, pGetCharInstance, sizeof(void*)); |
| 210 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetCharInstance, pGetShortStatic, sizeof(void*)); |
| 211 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetShortStatic, pGetCharStatic, sizeof(void*)); |
| 212 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetCharStatic, pGet32Instance, sizeof(void*)); |
| 213 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGet32Instance, pGet32Static, sizeof(void*)); |
| 214 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGet32Static, pGet64Instance, sizeof(void*)); |
| 215 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGet64Instance, pGet64Static, sizeof(void*)); |
| 216 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGet64Static, pGetObjInstance, sizeof(void*)); |
| 217 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetObjInstance, pGetObjStatic, sizeof(void*)); |
Nicolas Geoffray | 39cee66 | 2017-01-13 16:04:53 +0000 | [diff] [blame] | 218 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pGetObjStatic, pAputObject, sizeof(void*)); |
| 219 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAputObject, pJniMethodStart, sizeof(void*)); |
Vladimir Marko | 4d52715 | 2021-11-23 12:07:04 +0000 | [diff] [blame] | 220 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pJniMethodStart, pJniMethodEnd, sizeof(void*)); |
| 221 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pJniMethodEnd, pJniMethodEndWithReference, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 222 | sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 223 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pJniMethodEndWithReference, |
Vladimir Marko | 46a8910 | 2021-10-21 13:05:46 +0000 | [diff] [blame] | 224 | pJniDecodeReferenceResult, sizeof(void*)); |
| 225 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pJniDecodeReferenceResult, |
Vladimir Marko | 4d52715 | 2021-11-23 12:07:04 +0000 | [diff] [blame] | 226 | pJniLockObject, sizeof(void*)); |
| 227 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pJniLockObject, |
| 228 | pJniUnlockObject, sizeof(void*)); |
| 229 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pJniUnlockObject, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 230 | pQuickGenericJniTrampoline, sizeof(void*)); |
| 231 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pQuickGenericJniTrampoline, pLockObject, sizeof(void*)); |
| 232 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pLockObject, pUnlockObject, sizeof(void*)); |
| 233 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pUnlockObject, pCmpgDouble, sizeof(void*)); |
| 234 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCmpgDouble, pCmpgFloat, sizeof(void*)); |
| 235 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCmpgFloat, pCmplDouble, sizeof(void*)); |
| 236 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCmplDouble, pCmplFloat, sizeof(void*)); |
Mark Mendell | a4f1220 | 2015-08-06 15:23:34 -0400 | [diff] [blame] | 237 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCmplFloat, pCos, sizeof(void*)); |
| 238 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCos, pSin, sizeof(void*)); |
| 239 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSin, pAcos, sizeof(void*)); |
| 240 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAcos, pAsin, sizeof(void*)); |
| 241 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAsin, pAtan, sizeof(void*)); |
| 242 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAtan, pAtan2, sizeof(void*)); |
Vladimir Marko | 4d17987 | 2018-01-19 14:50:10 +0000 | [diff] [blame] | 243 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pAtan2, pPow, sizeof(void*)); |
| 244 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pPow, pCbrt, sizeof(void*)); |
Mark Mendell | a4f1220 | 2015-08-06 15:23:34 -0400 | [diff] [blame] | 245 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCbrt, pCosh, sizeof(void*)); |
| 246 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCosh, pExp, sizeof(void*)); |
| 247 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pExp, pExpm1, sizeof(void*)); |
| 248 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pExpm1, pHypot, sizeof(void*)); |
| 249 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pHypot, pLog, sizeof(void*)); |
| 250 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pLog, pLog10, sizeof(void*)); |
| 251 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pLog10, pNextAfter, sizeof(void*)); |
| 252 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNextAfter, pSinh, sizeof(void*)); |
| 253 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pSinh, pTan, sizeof(void*)); |
| 254 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pTan, pTanh, sizeof(void*)); |
| 255 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pTanh, pFmod, sizeof(void*)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 256 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pFmod, pL2d, sizeof(void*)); |
| 257 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pL2d, pFmodf, sizeof(void*)); |
| 258 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pFmodf, pL2f, sizeof(void*)); |
| 259 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pL2f, pD2iz, sizeof(void*)); |
| 260 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pD2iz, pF2iz, sizeof(void*)); |
| 261 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pF2iz, pIdivmod, sizeof(void*)); |
| 262 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pIdivmod, pD2l, sizeof(void*)); |
| 263 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pD2l, pF2l, sizeof(void*)); |
| 264 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pF2l, pLdiv, sizeof(void*)); |
| 265 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pLdiv, pLmod, sizeof(void*)); |
| 266 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pLmod, pLmul, sizeof(void*)); |
| 267 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pLmul, pShlLong, sizeof(void*)); |
| 268 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pShlLong, pShrLong, sizeof(void*)); |
| 269 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pShrLong, pUshrLong, sizeof(void*)); |
| 270 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pUshrLong, pIndexOf, sizeof(void*)); |
| 271 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pIndexOf, pStringCompareTo, sizeof(void*)); |
| 272 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pStringCompareTo, pMemcpy, sizeof(void*)); |
| 273 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pMemcpy, pQuickImtConflictTrampoline, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 274 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pQuickImtConflictTrampoline, pQuickResolutionTrampoline, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 275 | sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 276 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pQuickResolutionTrampoline, pQuickToInterpreterBridge, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 277 | sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 278 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pQuickToInterpreterBridge, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 279 | pInvokeDirectTrampolineWithAccessCheck, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 280 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInvokeDirectTrampolineWithAccessCheck, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 281 | pInvokeInterfaceTrampolineWithAccessCheck, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 282 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInvokeInterfaceTrampolineWithAccessCheck, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 283 | pInvokeStaticTrampolineWithAccessCheck, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 284 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInvokeStaticTrampolineWithAccessCheck, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 285 | pInvokeSuperTrampolineWithAccessCheck, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 286 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInvokeSuperTrampolineWithAccessCheck, |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 287 | pInvokeVirtualTrampolineWithAccessCheck, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 288 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInvokeVirtualTrampolineWithAccessCheck, |
Orion Hodson | ac14139 | 2017-01-13 11:53:47 +0000 | [diff] [blame] | 289 | pInvokePolymorphic, sizeof(void*)); |
Orion Hodson | 4c8e12e | 2018-05-18 08:33:20 +0100 | [diff] [blame] | 290 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInvokePolymorphic, pInvokeCustom, sizeof(void*)); |
| 291 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pInvokeCustom, pTestSuspend, sizeof(void*)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 292 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pTestSuspend, pDeliverException, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 293 | |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 294 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pDeliverException, pThrowArrayBounds, sizeof(void*)); |
| 295 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowArrayBounds, pThrowDivZero, sizeof(void*)); |
Vladimir Marko | 0584647 | 2016-09-14 12:49:57 +0100 | [diff] [blame] | 296 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowDivZero, pThrowNullPointer, sizeof(void*)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 297 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowNullPointer, pThrowStackOverflow, sizeof(void*)); |
Vladimir Marko | 87f3fcb | 2016-04-28 15:52:11 +0100 | [diff] [blame] | 298 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowStackOverflow, pThrowStringBounds, sizeof(void*)); |
| 299 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowStringBounds, pDeoptimize, sizeof(void*)); |
Mingyao Yang | d43b3ac | 2015-04-01 14:03:04 -0700 | [diff] [blame] | 300 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pDeoptimize, pA64Load, sizeof(void*)); |
Ian Rogers | 1373595 | 2014-10-08 12:43:28 -0700 | [diff] [blame] | 301 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pA64Load, pA64Store, sizeof(void*)); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 302 | |
Jeff Hao | 848f70a | 2014-01-15 13:49:50 -0800 | [diff] [blame] | 303 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pA64Store, pNewEmptyString, sizeof(void*)); |
| 304 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewEmptyString, pNewStringFromBytes_B, sizeof(void*)); |
| 305 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromBytes_B, pNewStringFromBytes_BI, |
| 306 | sizeof(void*)); |
| 307 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromBytes_BI, pNewStringFromBytes_BII, |
| 308 | sizeof(void*)); |
| 309 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromBytes_BII, pNewStringFromBytes_BIII, |
| 310 | sizeof(void*)); |
| 311 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromBytes_BIII, pNewStringFromBytes_BIIString, |
| 312 | sizeof(void*)); |
| 313 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromBytes_BIIString, |
| 314 | pNewStringFromBytes_BString, sizeof(void*)); |
| 315 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromBytes_BString, |
| 316 | pNewStringFromBytes_BIICharset, sizeof(void*)); |
| 317 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromBytes_BIICharset, |
| 318 | pNewStringFromBytes_BCharset, sizeof(void*)); |
| 319 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromBytes_BCharset, |
| 320 | pNewStringFromChars_C, sizeof(void*)); |
| 321 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromChars_C, pNewStringFromChars_CII, |
| 322 | sizeof(void*)); |
| 323 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromChars_CII, pNewStringFromChars_IIC, |
| 324 | sizeof(void*)); |
| 325 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromChars_IIC, pNewStringFromCodePoints, |
| 326 | sizeof(void*)); |
| 327 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromCodePoints, pNewStringFromString, |
| 328 | sizeof(void*)); |
| 329 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromString, pNewStringFromStringBuffer, |
| 330 | sizeof(void*)); |
| 331 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromStringBuffer, pNewStringFromStringBuilder, |
| 332 | sizeof(void*)); |
Vladimir Marko | 552a134 | 2017-10-31 10:56:47 +0000 | [diff] [blame] | 333 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pNewStringFromStringBuilder, pStringBuilderAppend, |
| 334 | sizeof(void*)); |
Nicolas Geoffray | e2a3aa9 | 2019-11-25 17:52:58 +0000 | [diff] [blame] | 335 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pStringBuilderAppend, pUpdateInlineCache, |
Hiroshi Yamauchi | 1cc71eb | 2015-05-07 10:47:27 -0700 | [diff] [blame] | 336 | sizeof(void*)); |
Nicolas Geoffray | a59af8a | 2019-11-27 17:42:32 +0000 | [diff] [blame] | 337 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pUpdateInlineCache, pCompileOptimized, |
| 338 | sizeof(void*)); |
| 339 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pCompileOptimized, pReadBarrierJni, |
Nicolas Geoffray | e2a3aa9 | 2019-11-25 17:52:58 +0000 | [diff] [blame] | 340 | sizeof(void*)); |
| 341 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierJni, pReadBarrierMarkReg00, |
| 342 | sizeof(void*)); |
Roland Levillain | 02b7580 | 2016-07-13 11:54:35 +0100 | [diff] [blame] | 343 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg00, pReadBarrierMarkReg01, |
| 344 | sizeof(void*)); |
| 345 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg01, pReadBarrierMarkReg02, |
| 346 | sizeof(void*)); |
| 347 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg02, pReadBarrierMarkReg03, |
| 348 | sizeof(void*)); |
| 349 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg03, pReadBarrierMarkReg04, |
| 350 | sizeof(void*)); |
| 351 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg04, pReadBarrierMarkReg05, |
| 352 | sizeof(void*)); |
| 353 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg05, pReadBarrierMarkReg06, |
| 354 | sizeof(void*)); |
| 355 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg06, pReadBarrierMarkReg07, |
| 356 | sizeof(void*)); |
| 357 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg07, pReadBarrierMarkReg08, |
| 358 | sizeof(void*)); |
| 359 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg08, pReadBarrierMarkReg09, |
| 360 | sizeof(void*)); |
| 361 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg09, pReadBarrierMarkReg10, |
| 362 | sizeof(void*)); |
| 363 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg10, pReadBarrierMarkReg11, |
| 364 | sizeof(void*)); |
| 365 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg11, pReadBarrierMarkReg12, |
| 366 | sizeof(void*)); |
| 367 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg12, pReadBarrierMarkReg13, |
| 368 | sizeof(void*)); |
| 369 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg13, pReadBarrierMarkReg14, |
| 370 | sizeof(void*)); |
| 371 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg14, pReadBarrierMarkReg15, |
| 372 | sizeof(void*)); |
| 373 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg15, pReadBarrierMarkReg16, |
| 374 | sizeof(void*)); |
| 375 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg16, pReadBarrierMarkReg17, |
| 376 | sizeof(void*)); |
| 377 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg17, pReadBarrierMarkReg18, |
| 378 | sizeof(void*)); |
| 379 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg18, pReadBarrierMarkReg19, |
| 380 | sizeof(void*)); |
| 381 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg19, pReadBarrierMarkReg20, |
| 382 | sizeof(void*)); |
| 383 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg20, pReadBarrierMarkReg21, |
| 384 | sizeof(void*)); |
| 385 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg21, pReadBarrierMarkReg22, |
| 386 | sizeof(void*)); |
| 387 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg22, pReadBarrierMarkReg23, |
| 388 | sizeof(void*)); |
| 389 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg23, pReadBarrierMarkReg24, |
| 390 | sizeof(void*)); |
| 391 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg24, pReadBarrierMarkReg25, |
| 392 | sizeof(void*)); |
| 393 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg25, pReadBarrierMarkReg26, |
| 394 | sizeof(void*)); |
| 395 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg26, pReadBarrierMarkReg27, |
| 396 | sizeof(void*)); |
| 397 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg27, pReadBarrierMarkReg28, |
| 398 | sizeof(void*)); |
| 399 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg28, pReadBarrierMarkReg29, |
| 400 | sizeof(void*)); |
Roland Levillain | d549c28 | 2016-07-25 12:49:15 +0100 | [diff] [blame] | 401 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierMarkReg29, pReadBarrierSlow, sizeof(void*)); |
Roland Levillain | 0d5a281 | 2015-11-13 10:07:31 +0000 | [diff] [blame] | 402 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pReadBarrierSlow, pReadBarrierForRootSlow, |
| 403 | sizeof(void*)); |
Mythri Alle | 5097f83 | 2021-11-02 14:52:30 +0000 | [diff] [blame] | 404 | EXPECT_OFFSET_DIFFNP( |
| 405 | QuickEntryPoints, pReadBarrierForRootSlow, pMethodEntryHook, sizeof(void*)); |
| 406 | EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pMethodEntryHook, pMethodExitHook, sizeof(void*)); |
Jeff Hao | 848f70a | 2014-01-15 13:49:50 -0800 | [diff] [blame] | 407 | |
Mythri Alle | 5097f83 | 2021-11-02 14:52:30 +0000 | [diff] [blame] | 408 | CHECKED(OFFSETOF_MEMBER(QuickEntryPoints, pMethodExitHook) + sizeof(void*) == |
| 409 | sizeof(QuickEntryPoints), |
| 410 | QuickEntryPoints_all); |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 411 | } |
| 412 | }; |
| 413 | |
| 414 | TEST_F(EntrypointsOrderTest, ThreadOffsets) { |
| 415 | CheckThreadOffsets(); |
| 416 | } |
| 417 | |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 418 | TEST_F(EntrypointsOrderTest, JniEntryPoints) { |
| 419 | CheckJniEntryPoints(); |
| 420 | } |
| 421 | |
Andreas Gampe | 4352b45 | 2014-06-04 18:59:01 -0700 | [diff] [blame] | 422 | TEST_F(EntrypointsOrderTest, QuickEntryPoints) { |
| 423 | CheckQuickEntryPoints(); |
| 424 | } |
| 425 | |
| 426 | } // namespace art |