* [PATCH] perf tool: remove an unnecessary function call while process pipe events
@ 2013-11-01 9:25 Chenggang Qin
0 siblings, 0 replies; only message in thread
From: Chenggang Qin @ 2013-11-01 9:25 UTC (permalink / raw)
To: linux-kernel
Cc: Chenggang Qin, David Ahern, Peter Zijlstra, Paul Mackerras,
Ingo Molnar, Arnaldo Carvalho de Melo, Arjan van de Ven,
Namhyung Kim, Yanmin Zhang, Wu Fengguang, Mike Galbraith,
Andrew Morton
From: Chenggang Qin <chenggang.qcg@taobao.com>
perf_session_free_sample_buffers() can be removed from
__perf_session__process_pipe_events(), since the ordered_samples buffer is not
used while samples are read from the pipe.
__perf_session__process_pipe_events() is only used while process the events from
pipe. While the sample are read from pipe, the ordered_samples is forbidden.
Refer to the following code in perf_session__new():
150 if (tool && tool->ordering_requires_timestamps &&
151 tool->ordered_samples && !perf_evlist__sample_id_all(self->evlist)) {
152 dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n");
153 tool->ordered_samples = false;
154 }
If pipe is used, perf_evlist__sample_id_all(self->evlist) always return 0. Because
session->evlist is empty util a attr_event is read.
Thanks
Chenggang Qin
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Yanmin Zhang <yanmin.zhang@intel.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chenggang Qin <chenggang.qcg@taobao.com>
---
tools/perf/util/session.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 568b750..b69c28a 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1251,7 +1251,6 @@ done:
out_err:
free(buf);
perf_session__warn_about_errors(self, tool);
- perf_session_free_sample_buffers(self);
return err;
}
--
1.7.8.rc2.5.g815b
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-01 9:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01 9:25 [PATCH] perf tool: remove an unnecessary function call while process pipe events Chenggang Qin
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).