From: Steven Rostedt <rostedt@goodmis.org>
To: kbuild test robot <lkp@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [PATCH] tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined
Date: Thu, 2 Jan 2020 22:09:55 -0500 [thread overview]
Message-ID: <20200102220955.05975d6e@rorschach.local.home> (raw)
In-Reply-To: <20200102220754.5dc61fcc@rorschach.local.home>
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
On some archs with some configurations, MCOUNT_INSN_SIZE is not defined, and
this makes the stack tracer fail to compile. Just define it to zero in this
case.
Link: https://lore.kernel.org/r/202001020219.zvE3vsty%lkp@intel.com
Cc: stable@vger.kernel.org
Fixes: 4df297129f622 ("tracing: Remove most or all of stack tracer stack size from stack_max_size")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/trace_stack.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index 4df9a209f7ca..c557f42a9397 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -283,6 +283,11 @@ static void check_stack(unsigned long ip, unsigned long *stack)
local_irq_restore(flags);
}
+/* Some archs may not define MCOUNT_INSN_SIZE */
+#ifndef MCOUNT_INSN_SIZE
+# define MCOUNT_INSN_SIZE 0
+#endif
+
static void
stack_trace_call(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *pt_regs)
--
2.20.1
prev parent reply other threads:[~2020-01-03 3:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 18:09 kernel//trace/fgraph.c:111:35: error: 'MCOUNT_INSN_SIZE' undeclared; did you mean 'UCOUNT_COUNTS'? kbuild test robot
2020-01-03 3:07 ` Steven Rostedt
2020-01-03 3:09 ` [PATCH] tracing: Define MCOUNT_INSN_SIZE when not defined without direct calls Steven Rostedt
2020-01-03 3:09 ` Steven Rostedt [this message]
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=20200102220955.05975d6e@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=ast@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox