Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1294233
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 04/43] perf thread_map: Add perf_event__fprintf_thread_map function |
| Date | 2015-12-17 21:10 +0100 |
| Message-ID | <qGN2b-48Z-29@gated-at.bofh.it> (permalink) |
| References | <qGMIN-3MF-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Jiri Olsa <jolsa@kernel.org>
To display a thread_map event for a raw dump.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Kan Liang <kan.liang@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1445784728-21732-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 b13373a60337..938f006c758e 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 952dd4d83f81..b7ad896d1317 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,
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/43] perf/core new feature: 'perf stat record/report' Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 08/43] perf cpu_map: Add perf_event__fprintf_cpu_map function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 06/43] perf cpu_map: Add cpu_map event synthesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 10/43] perf tools: Add stat config event synthesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 19/43] perf tools: Add event_update event unit type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 09/43] perf tools: Add stat config user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 25/43] perf tools: Introduce stat perf.data header feature Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 24/43] perf report: Display newly added events in raw dump Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 07/43] perf cpu_map: Add cpu_map__new_event function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 40/43] perf stat report: Move csv_sep initialization before report command Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 05/43] perf cpu_map: Add cpu_map user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 18/43] perf tools: Add event_update user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 22/43] perf tools: Add event_update event cpus type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 29/43] perf evlist: Export id_add_fd() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 01/43] perf thread_map: Add thread_map user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 17/43] perf tools: Add stat events fprintf functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 39/43] perf stat report: Add support to initialize aggr_map from file Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 36/43] perf stat report: Add report command Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 03/43] perf thread_map: Add thread_map__new_event function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 16/43] perf tools: Add stat round event synthesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 28/43] perf stat record: Synthesize stat record data Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 35/43] perf stat record: Synthesize event update events Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 13/43] perf tools: Add stat event synthesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 26/43] perf stat record: Add record command Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 15/43] perf tools: Add stat round user level event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 21/43] perf tools: Add event_update event name type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 20/43] perf tools: Add event_update event scale type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 33/43] perf stat record: Write stat round events on record Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 14/43] perf tools: Add stat event read function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:00 +0100
[PATCH 02/43] perf thread_map: Add thread_map event sythesize function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:10 +0100
[PATCH 04/43] perf thread_map: Add perf_event__fprintf_thread_map function Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 21:10 +0100
Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report' Ingo Molnar <mingo@kernel.org> - 2015-12-18 09:50 +0100
Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report' Ingo Molnar <mingo@kernel.org> - 2015-12-18 10:00 +0100
Re: [GIT PULL 00/43] perf/core new feature: 'perf stat record/report' Jiri Olsa <jolsa@redhat.com> - 2015-12-18 11:20 +0100
csiph-web