[PATCH] powerpc/xmon: Exclude all of xmon/ from ftrace
Naveen N. Rao
naveen.n.rao at linux.vnet.ibm.com
Thu Aug 3 04:25:38 AEST 2017
Exclude core xmon files from ftrace (along with an xmon xive helper
outside of xmon/) to minimize impact of ftrace while within xmon.
Before patch:
root at ubuntu:/sys/kernel/debug/tracing# cat available_filter_functions | grep -i xmon
xmon_xive_do_dump
xmon_dbgfs_get
xmon_print_symbol
xmon_show_stack
xmon_dbgfs_ops_open
xmon_init.part.2
xmon_dbgfs_set
sysrq_handle_xmon
xmon_fault_handler
cpus_are_in_xmon
xmon_core
xmon
xmon_irq
xmon_break_match
xmon_iabr_match
xmon_sstep
xmon_bpt
xmon_ipi
xmon_write
xmon_start_pagination
xmon_end_pagination
xmon_set_pagination_lpp
xmon_putchar
xmon_gets
xmon_printf
xmon_puts
root at ubuntu:/sys/kernel/debug/tracing#
After patch:
root at ubuntu:/sys/kernel/debug/tracing# cat available_filter_functions | grep -i xmon
root at ubuntu:/sys/kernel/debug/tracing#
Signed-off-by: Naveen N. Rao <naveen.n.rao at linux.vnet.ibm.com>
---
This is in addition to Breno's series to disable tracing while in xmon.
While this patch prevents xmon core functions from being traced,
Breno's series prevents other helpers used by xmon from logging entries
into the trace buffer.
- Naveen
arch/powerpc/sysdev/xive/common.c | 6 +++---
arch/powerpc/xmon/Makefile | 13 +++++++++++++
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index 6595462b1fc8..97e82a33b7be 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -190,7 +190,7 @@ static u32 xive_scan_interrupts(struct xive_cpu *xc, bool just_peek)
* This is used to perform the magic loads from an ESB
* described in xive.h
*/
-static u8 xive_poke_esb(struct xive_irq_data *xd, u32 offset)
+static notrace u8 xive_poke_esb(struct xive_irq_data *xd, u32 offset)
{
u64 val;
@@ -204,7 +204,7 @@ static u8 xive_poke_esb(struct xive_irq_data *xd, u32 offset)
}
#ifdef CONFIG_XMON
-static void xive_dump_eq(const char *name, struct xive_q *q)
+static notrace void xive_dump_eq(const char *name, struct xive_q *q)
{
u32 i0, i1, idx;
@@ -218,7 +218,7 @@ static void xive_dump_eq(const char *name, struct xive_q *q)
q->toggle, i0, i1);
}
-void xmon_xive_do_dump(int cpu)
+notrace void xmon_xive_do_dump(int cpu)
{
struct xive_cpu *xc = per_cpu(xive_cpu, cpu);
diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile
index 0b2f771593eb..5f95af64cb8f 100644
--- a/arch/powerpc/xmon/Makefile
+++ b/arch/powerpc/xmon/Makefile
@@ -7,6 +7,19 @@ UBSAN_SANITIZE := n
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_xmon.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_nonstdio.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
+ifdef CONFIG_XMON_DISASSEMBLY
+CFLAGS_REMOVE_ppc-dis.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_ppc-opc.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
+ifdef CONFIG_SPU_BASE
+CFLAGS_REMOVE_spu-dis.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
+CFLAGS_REMOVE_spu-opc.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
+endif
+endif
+endif
+
obj-y += xmon.o nonstdio.o spr_access.o
ifdef CONFIG_XMON_DISASSEMBLY
--
2.13.3
More information about the Linuxppc-dev
mailing list