From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Andreas Ziegler <andreas.ziegler@fau.de>,
Masami Hiramatsu <mhiramat@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] tracing: probeevent: Do not accumulate on ret variable
Date: Thu, 17 Jan 2019 22:48:55 +0900 [thread overview]
Message-ID: <154773293570.2285.15635282580280627220.stgit@devbox> (raw)
In-Reply-To: <154773287750.2285.5509629487576876823.stgit@devbox>
Do not accumulate strlen result on ret local variable, because
it is accumulated on total local variable for array case.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
kernel/trace/trace_probe_tmpl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_probe_tmpl.h b/kernel/trace/trace_probe_tmpl.h
index 5c56afc17cf8..e69b05a9f57c 100644
--- a/kernel/trace/trace_probe_tmpl.h
+++ b/kernel/trace/trace_probe_tmpl.h
@@ -88,7 +88,7 @@ process_fetch_insn_bottom(struct fetch_insn *code, unsigned long val,
/* 3rd stage: store value to buffer */
if (unlikely(!dest)) {
if (code->op == FETCH_OP_ST_STRING) {
- ret += fetch_store_strlen(val + code->offset);
+ ret = fetch_store_strlen(val + code->offset);
code++;
goto array;
} else
next prev parent reply other threads:[~2019-01-17 13:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 13:47 [PATCH 0/3] tracing: probeevent: Fix probe argument parser and handler Masami Hiramatsu
2019-01-17 13:48 ` [PATCH 1/3] tracing: uprobes: Re-enable $comm support for uprobe events Masami Hiramatsu
2019-01-17 13:48 ` Masami Hiramatsu [this message]
2019-01-17 13:49 ` [PATCH 3/3] tracing: probeevent: Fix to make the type of $comm string Masami Hiramatsu
2019-01-17 14:23 ` [PATCH 0/3] tracing: probeevent: Fix probe argument parser and handler Steven Rostedt
2019-01-17 23:30 ` Masami Hiramatsu
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=154773293570.2285.15635282580280627220.stgit@devbox \
--to=mhiramat@kernel.org \
--cc=andreas.ziegler@fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/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