summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2021-01-22 22:00:55 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-01-22 22:00:55 +0000
commit057ec0f1c82a0f4f937da43c9f5220cae10025ec (patch)
tree52b33b2844715df360849a120200c74787ab3845
parentce196cfa5bec2c4241680e603cb212b3e85f2bf5 (diff)
parent8d99411d5438ecd65337988db85a7b362f586832 (diff)
downloadlibhidl-057ec0f1c82a0f4f937da43c9f5220cae10025ec.tar.gz
Merge "HidlInstrumentor - fix w/ Wpadded" am: 951417092a am: b8a0af5f90 am: 8d99411d54
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1557027 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9b3ebc88eb0f279ba4bef2e254ba5fad526f81a2
-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