diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index b944bbab77e9..579301b89338 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -25,6 +25,8 @@ #include #include +#include + /* * In case the boot CPU is hotpluggable, we record its initial state and * current state separately. Certain system registers may contain different @@ -255,6 +257,8 @@ static int c_show(struct seq_file *m, void *v) seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr)); } + trace_android_rvh_cpuinfo_c_show(m); + return 0; } diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 5a2b3a9ad0f9..a275cae115fc 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -114,6 +115,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_irqs_disable); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_irqs_enable); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_attach); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_online); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpuinfo_c_show); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_meminfo_cache_adjust); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_mem_available_adjust); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_meminfo_adjust); diff --git a/include/trace/hooks/cpuinfo.h b/include/trace/hooks/cpuinfo.h new file mode 100644 index 000000000000..97c5e4f1347d --- /dev/null +++ b/include/trace/hooks/cpuinfo.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM cpuinfo + +#define TRACE_INCLUDE_PATH trace/hooks + +#if !defined(_TRACE_HOOK_CPUINFO_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_HOOK_CPUINFO_H + +#include + +DECLARE_RESTRICTED_HOOK(android_rvh_cpuinfo_c_show, + TP_PROTO(struct seq_file *m), + TP_ARGS(m), 1); + +#endif /* _TRACE_HOOK_CPUINFO_H */ +/* This part must be outside protection */ +#include