From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Borislav Petkov <bp@suse.de>, David Ahern <dsahern@gmail.com>,
Don Zickus <dzickus@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Stephane Eranian <eranian@google.com>
Subject: [PATCH 5/6] perf trace: Fix syscall enter formatting bug
Date: Thu, 26 Mar 2015 12:41:04 -0300 [thread overview]
Message-ID: <1427384465-7601-6-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1427384465-7601-1-git-send-email-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
commit e596663ebb28a068f5cca57f83285b7b293a2c83
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Fri Feb 13 13:22:21 2015 -0300
perf trace: Handle multiple threads better wrt syscalls being intermixed
Introduced a bug where it considered the number of bytes output directly
to the output file when formatting the syscall entry buffer that is
stored to be finally printed at syscall exit, ending up leaving garbage
at the start of syscalls that appeared while another syscall was being
processed, in another thread. Fix it.
Example of garbage in the output before this patch:
4280.102 ( 0.000 ms): lsmd/763 ... [continued]: select()) = 0 Timeout
4280.107 (275.250 ms): tuned/852 select(tvp: 0x7f41f7ffde50 ) ...
4280.109 ( 0.002 ms): lsmd/763 Xl�� ) = -10
4639.197 ( 0.000 ms): systemd-journa/542 ... [continued]: epoll_wait()) = 1
4639.202 (359.088 ms): lsmd/763 select(n: 6, inp: 0x7ffff21daad0, tvp: 0x7ffff21daac0) ...
4639.207 ( 0.005 ms): systemd-journa/542 Hn�� ) = 106
4639.221 ( 0.002 ms): systemd-journa/542 uname(name: 0x7ffdbaed8e00) = 0
4639.271 ( 0.008 ms): systemd-journa/542 ftruncate(fd: 11</run/log/journal/60cd52417cf440a4a80107518bbd3c20/system.journal>, length: 50331648) = 0
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9ckfe8mvsedgkg6y80gz1ul8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 001c6ae9a1b1..bcc98ce3e5b8 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1735,7 +1735,7 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
}
if (!trace->summary_only)
- printed += trace__printf_interrupted_entry(trace, sample);
+ trace__printf_interrupted_entry(trace, sample);
ttrace->entry_time = sample->time;
msg = ttrace->entry_str;
--
1.9.3
next prev parent reply other threads:[~2015-03-26 15:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 15:40 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-03-26 15:41 ` [PATCH 1/6] perf timechart: Fix SIBGUS error on sparc64 Arnaldo Carvalho de Melo
2015-03-26 15:41 ` [PATCH 2/6] perf evlist: Return the first evsel with an invalid filter in apply_filters() Arnaldo Carvalho de Melo
2015-03-26 15:41 ` [PATCH 3/6] perf: Bump max number of cpus to 1024 Arnaldo Carvalho de Melo
2015-03-26 15:41 ` [PATCH 4/6] perf tools: Set JOBS based on CPU or processor Arnaldo Carvalho de Melo
2015-03-26 15:41 ` Arnaldo Carvalho de Melo [this message]
2015-03-26 15:41 ` [PATCH 6/6] tools lib traceevent: Zero should not be considered "not found" in eval_flag() Arnaldo Carvalho de Melo
2015-03-27 7:37 ` [GIT PULL 0/6] perf/core improvements and fixes Ingo Molnar
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=1427384465-7601-6-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=bp@suse.de \
--cc=dsahern@gmail.com \
--cc=dzickus@redhat.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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;
as well as URLs for NNTP newsgroup(s).