[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-93ea01c29d4ed5a9fcf6d9a95bc584e54a420834@git.kernel.org>
Date: Thu, 15 Aug 2013 00:56:14 -0700
From: tip-bot for David Ahern <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, eranian@...gle.com,
hpa@...or.com, mingo@...nel.org, peterz@...radead.org,
namhyung@...nel.org, jolsa@...hat.com, fweisbec@...il.com,
dsahern@...il.com, tglx@...utronix.de
Subject: [tip:perf/core] perf session:
Change perf_session__has_traces to actually check for tracepoints
Commit-ID: 93ea01c29d4ed5a9fcf6d9a95bc584e54a420834
Gitweb: http://git.kernel.org/tip/93ea01c29d4ed5a9fcf6d9a95bc584e54a420834
Author: David Ahern <dsahern@...il.com>
AuthorDate: Wed, 7 Aug 2013 22:50:58 -0400
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 12 Aug 2013 10:31:08 -0300
perf session: Change perf_session__has_traces to actually check for tracepoints
Any event can have RAW data attribute set. The intent of the function is
to determine if the session has tracepoints, so check for the type of
each event explicitly.
Signed-off-by: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/1375930261-77273-17-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/session.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 5a89964..4d9028e 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1401,12 +1401,15 @@ int perf_session__process_events(struct perf_session *self,
bool perf_session__has_traces(struct perf_session *session, const char *msg)
{
- if (!(perf_evlist__sample_type(session->evlist) & PERF_SAMPLE_RAW)) {
- pr_err("No trace sample to read. Did you call 'perf %s'?\n", msg);
- return false;
+ struct perf_evsel *evsel;
+
+ list_for_each_entry(evsel, &session->evlist->entries, node) {
+ if (evsel->attr.type == PERF_TYPE_TRACEPOINT)
+ return true;
}
- return true;
+ pr_err("No trace sample to read. Did you call 'perf %s'?\n", msg);
+ return false;
}
int maps__set_kallsyms_ref_reloc_sym(struct map **maps,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists