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> (cherry picked from commit 08c63cde8c2bbdd5ab44c4f644422764f9b9ad14)
This commit is contained in:
committed by
Treehugger Robot
parent
8689d027d8
commit
bcf4630798
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#include <trace/hooks/regmap.h>
|
||||
#include <trace/hooks/softlockup.h>
|
||||
#include <trace/hooks/power.h>
|
||||
#include <trace/hooks/cpuinfo.h>
|
||||
#include <trace/hooks/dmabuf.h>
|
||||
#include <trace/hooks/signal.h>
|
||||
#include <trace/hooks/compaction.h>
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user