ANDROID: vendor_hooks: Reduce pointless modversions CRC churn

When vendor hooks are added to a file that previously didn't have any
vendor hooks, we end up indirectly including linux/tracepoint.h.  This
causes some data types that used to be opaque (forward declared) to the
code to become visible to the code.

Modversions correctly catches this change in visibility, but we don't
really care about the data types made visible when linux/tracepoint.h is
included. So, hide this from modversions in the central vendor_hooks.h
file instead of having to fix this on a case by case basis.

Since this is a KMI frozen branch, existing vendor hook headers are left
as is to avoid KMI breakage due to CRC churn.

To avoid future pointless CRC churn, new vendor hook header files that
include vendor_hooks.h should not include linux/tracepoint.h directly.

Bug: 227513263
Bug: 226140073
Signed-off-by: Saravana Kannan <saravanak@google.com>
Change-Id: Ia88e6af11dd94fe475c464eb30a6e5e1e24c938b
This commit is contained in:
Saravana Kannan
2022-03-30 14:58:30 -07:00
parent 002528dfb5
commit ceb6918d1d
2 changed files with 3 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
#define CREATE_TRACE_POINTS #define CREATE_TRACE_POINTS
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
#include <linux/tracepoint.h>
#include <trace/hooks/sched.h> #include <trace/hooks/sched.h>
#include <trace/hooks/cpu.h> #include <trace/hooks/cpu.h>
#include <trace/hooks/fpsimd.h> #include <trace/hooks/fpsimd.h>

View File

@@ -7,7 +7,9 @@
* will override the DECLARE_RESTRICTED_HOOK and break the second include. * will override the DECLARE_RESTRICTED_HOOK and break the second include.
*/ */
#ifndef __GENKSYMS__
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#endif
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)