From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, Breno Leitao <leitao@debian.org>
Subject: [PATCH] powerpc/xmon: Exclude all of xmon/ from ftrace
Date: Wed, 2 Aug 2017 23:55:38 +0530 [thread overview]
Message-ID: <20170802182538.26526-1-naveen.n.rao@linux.vnet.ibm.com> (raw)
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@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@ubuntu:/sys/kernel/debug/tracing#
After patch:
root@ubuntu:/sys/kernel/debug/tracing# cat available_filter_functions | grep -i xmon
root@ubuntu:/sys/kernel/debug/tracing#
Signed-off-by: Naveen N. Rao <naveen.n.rao@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
next reply other threads:[~2017-08-02 18:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 18:25 Naveen N. Rao [this message]
2017-08-08 10:46 ` [PATCH] powerpc/xmon: Exclude all of xmon/ from ftrace Michael Ellerman
2017-08-15 10:04 ` Michael Ellerman
2017-08-16 14:13 ` Naveen N. Rao
2017-08-17 12:54 ` Michael Ellerman
2017-08-16 12:29 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170802182538.26526-1-naveen.n.rao@linux.vnet.ibm.com \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=leitao@debian.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.