[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ec7fa596f514b76a5f1003ffe9e6dfb50cb9e811@git.kernel.org>
Date: Fri, 18 Dec 2015 01:01:27 -0800
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: jolsa@...nel.org, mingo@...nel.org, linux-kernel@...r.kernel.org,
namhyung@...nel.org, tglx@...utronix.de, a.p.zijlstra@...llo.nl,
dsahern@...il.com, hpa@...or.com, acme@...hat.com,
kan.liang@...el.com
Subject: [tip:perf/core] perf thread_map:
Add perf_event__fprintf_thread_map function
Commit-ID: ec7fa596f514b76a5f1003ffe9e6dfb50cb9e811
Gitweb: http://git.kernel.org/tip/ec7fa596f514b76a5f1003ffe9e6dfb50cb9e811
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Sun, 25 Oct 2015 15:51:22 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 17 Dec 2015 14:38:17 -0300
perf thread_map: Add perf_event__fprintf_thread_map function
To display a thread_map event for a raw dump.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Tested-by: Kan Liang <kan.liang@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1445784728-21732-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/event.c | 16 ++++++++++++++++
tools/perf/util/event.h | 1 +
2 files changed, 17 insertions(+)
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index b13373a..938f006 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -820,6 +820,22 @@ size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp)
event->mmap2.filename);
}
+size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp)
+{
+ struct thread_map *threads = thread_map__new_event(&event->thread_map);
+ size_t ret;
+
+ ret = fprintf(fp, " nr: ");
+
+ if (threads)
+ ret += thread_map__fprintf(threads, fp);
+ else
+ ret += fprintf(fp, "failed to get threads from event\n");
+
+ thread_map__put(threads);
+ return ret;
+}
+
int perf_event__process_mmap(struct perf_tool *tool __maybe_unused,
union perf_event *event,
struct perf_sample *sample,
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 952dd4d..b7ad896 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -516,6 +516,7 @@ size_t perf_event__fprintf_task(union perf_event *event, FILE *fp);
size_t perf_event__fprintf_aux(union perf_event *event, FILE *fp);
size_t perf_event__fprintf_itrace_start(union perf_event *event, FILE *fp);
size_t perf_event__fprintf_switch(union perf_event *event, FILE *fp);
+size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp);
size_t perf_event__fprintf(union perf_event *event, FILE *fp);
u64 kallsyms__get_function_start(const char *kallsyms_filename,
--
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