mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 20:35:23 +02:00
ANDROID: vendor_hooks: add hook to show more vendor cpu info.
Add hook to show the more information about cpu, when cat /proc/cpuinfo , some chip info will be appended. Bug: 341597636 Change-Id: I4dbf7ba305a428f3dcf71e71d700a51dac8f7be0 Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
This commit is contained in:
parent
5eb138730a
commit
08c63cde8c
|
@ -25,6 +25,8 @@
|
|||
#include <linux/smp.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#include <trace/hooks/cpuinfo.h>
|
||||
|
||||
/*
|
||||
* In case the boot CPU is hotpluggable, we record its initial state and
|
||||
* current state separately. Certain system registers may contain different
|
||||
|
@ -238,6 +240,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;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#include <trace/hooks/bug.h>
|
||||
#include <trace/hooks/softlockup.h>
|
||||
#include <trace/hooks/power.h>
|
||||
#include <trace/hooks/cpuinfo.h>
|
||||
#include <trace/hooks/gzvm.h>
|
||||
#include <trace/hooks/signal.h>
|
||||
#include <trace/hooks/logbuf.h>
|
||||
|
@ -137,6 +138,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpufreq_fast_switch);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpufreq_target);
|
||||
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);
|
||||
|
|
18
include/trace/hooks/cpuinfo.h
Normal file
18
include/trace/hooks/cpuinfo.h
Normal file
|
@ -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 <trace/hooks/vendor_hooks.h>
|
||||
|
||||
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 <trace/define_trace.h>
|
Loading…
Reference in New Issue
Block a user