summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2021-01-22 21:28:55 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-01-22 21:28:55 +0000
commitb8a0af5f906ebb02726e87d1435a35d6df0cdfc5 (patch)
tree52b33b2844715df360849a120200c74787ab3845
parenta8e8f13e8daeba50f8c5fabc753523da5890d1cd (diff)
parent951417092ad39889f46d2a604990d085bda9a52f (diff)
downloadlibhidl-b8a0af5f906ebb02726e87d1435a35d6df0cdfc5.tar.gz
Merge "HidlInstrumentor - fix w/ Wpadded" am: 951417092a
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1557027 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9b42aa336514513c1b7e8c737087caa4e191a851
-rw-r--r--base/include/hidl/HidlInternal.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/base/include/hidl/HidlInternal.h b/base/include/hidl/HidlInternal.h
index 3cd246a..3d1a444 100644
--- a/base/include/hidl/HidlInternal.h
+++ b/base/include/hidl/HidlInternal.h
@@ -201,7 +201,10 @@ struct HidlInstrumentor {
// A list of registered instrumentation callbacks.
std::vector<InstrumentationCallback> mInstrumentationCallbacks;
// Flag whether to enable instrumentation.
- bool mEnableInstrumentation;
+ union {
+ bool mEnableInstrumentation;
+ void* mReserved0;
+ };
// Prefix to lookup the instrumentation libraries.
std::string mInstrumentationLibPackage;
// Used for dlsym to load the profiling method for given interface.
@@ -209,6 +212,12 @@ struct HidlInstrumentor {
};
+#ifdef __LP64__
+static_assert(sizeof(HidlInstrumentor) == 88, "HidlInstrumentor size frozen by prebuilts");
+#else
+static_assert(sizeof(HidlInstrumentor) == 44, "HidlInstrumentor size frozen by prebuilts");
+#endif
+
} // namespace details
} // namespace hardware
} // namespace android