* [PATCH 00/23] libperf: Add rest of events to perf/event.h @ 2019-08-28 13:56 Jiri Olsa 2019-08-28 13:56 ` [PATCH 01/23] libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' " Jiri Olsa ` (23 more replies) 0 siblings, 24 replies; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:56 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan hi, to export 'union perf_event' we need to export the rest of events. It's also available in here: git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git perf/fixes thanks, jirka --- Jiri Olsa (23): libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' to perf/event.h libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' to perf/event.h libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' to perf/event.h libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' to perf/event.h libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' to perf/event.h libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' to perf/event.h libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' to perf/event.h libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' to perf/event.h libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' to perf/event.h libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' to perf/event.h libperf: Add PERF_RECORD_AUX 'struct aux_event' to perf/event.h libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' to perf/event.h libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' to perf/event.h libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' to perf/event.h libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' to perf/event.h libperf: Add PERF_RECORD_STAT 'struct stat_event' to perf/event.h libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' to perf/event.h libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' to perf/event.h libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' to perf/event.h libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' to perf/event.h libperf: Add 'union perf_event' to perf/event.h libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix libperf: Move 'enum perf_user_event_type' to perf/event.h tools/perf/arch/arm/util/cs-etm.c | 4 +-- tools/perf/arch/arm64/util/arm-spe.c | 2 +- tools/perf/arch/s390/util/auxtrace.c | 2 +- tools/perf/arch/x86/util/intel-bts.c | 2 +- tools/perf/arch/x86/util/intel-pt.c | 4 +-- tools/perf/arch/x86/util/tsc.c | 2 +- tools/perf/builtin-record.c | 4 +-- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-stat.c | 2 +- tools/perf/lib/include/perf/event.h | 273 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/tests/cpumap.c | 12 ++++---- tools/perf/tests/event_update.c | 16 +++++----- tools/perf/tests/stat.c | 8 ++--- tools/perf/tests/thread-map.c | 2 +- tools/perf/util/arm-spe.c | 6 ++-- tools/perf/util/auxtrace.c | 20 ++++++------ tools/perf/util/auxtrace.h | 8 ++--- tools/perf/util/build-id.c | 2 +- tools/perf/util/cpumap.c | 6 ++-- tools/perf/util/cpumap.h | 4 +-- tools/perf/util/cs-etm.c | 2 +- tools/perf/util/event.c | 38 +++++++++++------------ tools/perf/util/event.h | 278 +++-------------------------------------------------------------------------------------------------------------------------------------------------------------------- tools/perf/util/header.c | 56 +++++++++++++++++----------------- tools/perf/util/intel-bts.c | 6 ++-- tools/perf/util/intel-pt.c | 12 ++++---- tools/perf/util/python.c | 4 +-- tools/perf/util/s390-cpumsf.c | 4 +-- tools/perf/util/session.c | 28 ++++++++--------- tools/perf/util/session.h | 2 +- tools/perf/util/stat.c | 12 ++++---- tools/perf/util/thread_map.c | 4 +-- tools/perf/util/thread_map.h | 4 +-- 34 files changed, 418 insertions(+), 415 deletions(-) ^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 01/23] libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa @ 2019-08-28 13:56 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:56 ` [PATCH 02/23] libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' " Jiri Olsa ` (22 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:56 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_HEADER_ATTR event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-53ciuchxtqxz9kuntcd5vnxx@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 36ad3a4a79e6..bb66da57d366 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -109,4 +109,10 @@ struct perf_record_sample { __u64 array[]; }; +struct attr_event { + struct perf_event_header header; + struct perf_event_attr attr; + __u64 id[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 429a3fe52d6c..21fa6c2acea4 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -363,12 +363,6 @@ struct cpu_map_event { struct cpu_map_data data; }; -struct attr_event { - struct perf_event_header header; - struct perf_event_attr attr; - u64 id[]; -}; - enum { PERF_EVENT_UPDATE__UNIT = 0, PERF_EVENT_UPDATE__SCALE = 1, -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' to perf/event.h 2019-08-28 13:56 ` [PATCH 01/23] libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: c78ad994ad99a4e03ecefe446d39dced48ba254f Gitweb: https://git.kernel.org/tip/c78ad994ad99a4e03ecefe446d39dced48ba254f Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:56:55 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Wed, 28 Aug 2019 18:15:04 -03:00 libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' to perf/event.h Move the PERF_RECORD_HEADER_ATTR event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 36ad3a4..bb66da5 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -109,4 +109,10 @@ struct perf_record_sample { __u64 array[]; }; +struct attr_event { + struct perf_event_header header; + struct perf_event_attr attr; + __u64 id[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 429a3fe..21fa6c2 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -363,12 +363,6 @@ struct cpu_map_event { struct cpu_map_data data; }; -struct attr_event { - struct perf_event_header header; - struct perf_event_attr attr; - u64 id[]; -}; - enum { PERF_EVENT_UPDATE__UNIT = 0, PERF_EVENT_UPDATE__SCALE = 1, ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 02/23] libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa 2019-08-28 13:56 ` [PATCH 01/23] libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' " Jiri Olsa @ 2019-08-28 13:56 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:56 ` [PATCH 03/23] libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' " Jiri Olsa ` (21 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:56 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_CPU_MAP event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-mvxietu3tdtqfi7e2nbqkwy2@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 26 ++++++++++++++++++++++++++ tools/perf/util/event.h | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index bb66da57d366..469be778fdc1 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -115,4 +115,30 @@ struct attr_event { __u64 id[]; }; +enum { + PERF_CPU_MAP__CPUS = 0, + PERF_CPU_MAP__MASK = 1, +}; + +struct cpu_map_entries { + __u16 nr; + __u16 cpu[]; +}; + +struct cpu_map_mask { + __u16 nr; + __u16 long_size; + unsigned long mask[]; +}; + +struct cpu_map_data { + __u16 type; + char data[]; +}; + +struct cpu_map_event { + struct perf_event_header header; + struct cpu_map_data data; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 21fa6c2acea4..84bf67353635 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,32 +337,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -enum { - PERF_CPU_MAP__CPUS = 0, - PERF_CPU_MAP__MASK = 1, -}; - -struct cpu_map_entries { - u16 nr; - u16 cpu[]; -}; - -struct cpu_map_mask { - u16 nr; - u16 long_size; - unsigned long mask[]; -}; - -struct cpu_map_data { - u16 type; - char data[]; -}; - -struct cpu_map_event { - struct perf_event_header header; - struct cpu_map_data data; -}; - enum { PERF_EVENT_UPDATE__UNIT = 0, PERF_EVENT_UPDATE__SCALE = 1, -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' to perf/event.h 2019-08-28 13:56 ` [PATCH 02/23] libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 78e5ea1620964c4e34e9bf43e98a3def77e6bcde Gitweb: https://git.kernel.org/tip/78e5ea1620964c4e34e9bf43e98a3def77e6bcde Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:56:56 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Wed, 28 Aug 2019 18:15:04 -03:00 libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' to perf/event.h Move the PERF_RECORD_CPU_MAP event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 26 ++++++++++++++++++++++++++ tools/perf/util/event.h | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index bb66da5..469be77 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -115,4 +115,30 @@ struct attr_event { __u64 id[]; }; +enum { + PERF_CPU_MAP__CPUS = 0, + PERF_CPU_MAP__MASK = 1, +}; + +struct cpu_map_entries { + __u16 nr; + __u16 cpu[]; +}; + +struct cpu_map_mask { + __u16 nr; + __u16 long_size; + unsigned long mask[]; +}; + +struct cpu_map_data { + __u16 type; + char data[]; +}; + +struct cpu_map_event { + struct perf_event_header header; + struct cpu_map_data data; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 21fa6c2..84bf673 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -338,32 +338,6 @@ struct events_stats { }; enum { - PERF_CPU_MAP__CPUS = 0, - PERF_CPU_MAP__MASK = 1, -}; - -struct cpu_map_entries { - u16 nr; - u16 cpu[]; -}; - -struct cpu_map_mask { - u16 nr; - u16 long_size; - unsigned long mask[]; -}; - -struct cpu_map_data { - u16 type; - char data[]; -}; - -struct cpu_map_event { - struct perf_event_header header; - struct cpu_map_data data; -}; - -enum { PERF_EVENT_UPDATE__UNIT = 0, PERF_EVENT_UPDATE__SCALE = 1, PERF_EVENT_UPDATE__NAME = 2, ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 03/23] libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa 2019-08-28 13:56 ` [PATCH 01/23] libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' " Jiri Olsa 2019-08-28 13:56 ` [PATCH 02/23] libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' " Jiri Olsa @ 2019-08-28 13:56 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:56 ` [PATCH 04/23] libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' " Jiri Olsa ` (20 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:56 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_EVENT_UPDATE event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-evb1r0gk2usfnby0b9dxlzfs@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 22 ++++++++++++++++++++++ tools/perf/util/event.h | 23 ----------------------- tools/perf/util/header.c | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 469be778fdc1..3d99818077d8 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -141,4 +141,26 @@ struct cpu_map_event { struct cpu_map_data data; }; +enum { + PERF_EVENT_UPDATE__UNIT = 0, + PERF_EVENT_UPDATE__SCALE = 1, + PERF_EVENT_UPDATE__NAME = 2, + PERF_EVENT_UPDATE__CPUS = 3, +}; + +struct event_update_event_cpus { + struct cpu_map_data cpus; +}; + +struct event_update_event_scale { + double scale; +}; + +struct event_update_event { + struct perf_event_header header; + __u64 type; + __u64 id; + char data[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 84bf67353635..a579e6b439d6 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,29 +337,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -enum { - PERF_EVENT_UPDATE__UNIT = 0, - PERF_EVENT_UPDATE__SCALE = 1, - PERF_EVENT_UPDATE__NAME = 2, - PERF_EVENT_UPDATE__CPUS = 3, -}; - -struct event_update_event_cpus { - struct cpu_map_data cpus; -}; - -struct event_update_event_scale { - double scale; -}; - -struct event_update_event { - struct perf_event_header header; - u64 type; - u64 id; - - char data[]; -}; - #define MAX_EVENT_NAME 64 struct perf_trace_event_type { diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 1f2965a07bef..cc4998fcf4ee 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -3892,7 +3892,7 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) struct perf_cpu_map *map; size_t ret; - ret = fprintf(fp, "\n... id: %" PRIu64 "\n", ev->id); + ret = fprintf(fp, "\n... id: %" PRI_lu64 "\n", ev->id); switch (ev->type) { case PERF_EVENT_UPDATE__SCALE: -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' to perf/event.h 2019-08-28 13:56 ` [PATCH 03/23] libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 5ded068e923837068e39c0fd4ab40c0dacaa08e8 Gitweb: https://git.kernel.org/tip/5ded068e923837068e39c0fd4ab40c0dacaa08e8 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:56:57 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Wed, 28 Aug 2019 18:15:04 -03:00 libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' to perf/event.h Move the PERF_RECORD_EVENT_UPDATE event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 22 ++++++++++++++++++++++ tools/perf/util/event.h | 23 ----------------------- tools/perf/util/header.c | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 469be77..3d99818 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -141,4 +141,26 @@ struct cpu_map_event { struct cpu_map_data data; }; +enum { + PERF_EVENT_UPDATE__UNIT = 0, + PERF_EVENT_UPDATE__SCALE = 1, + PERF_EVENT_UPDATE__NAME = 2, + PERF_EVENT_UPDATE__CPUS = 3, +}; + +struct event_update_event_cpus { + struct cpu_map_data cpus; +}; + +struct event_update_event_scale { + double scale; +}; + +struct event_update_event { + struct perf_event_header header; + __u64 type; + __u64 id; + char data[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 84bf673..a579e6b 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,29 +337,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -enum { - PERF_EVENT_UPDATE__UNIT = 0, - PERF_EVENT_UPDATE__SCALE = 1, - PERF_EVENT_UPDATE__NAME = 2, - PERF_EVENT_UPDATE__CPUS = 3, -}; - -struct event_update_event_cpus { - struct cpu_map_data cpus; -}; - -struct event_update_event_scale { - double scale; -}; - -struct event_update_event { - struct perf_event_header header; - u64 type; - u64 id; - - char data[]; -}; - #define MAX_EVENT_NAME 64 struct perf_trace_event_type { diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 8e67faf..629bdb1 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -3893,7 +3893,7 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) struct perf_cpu_map *map; size_t ret; - ret = fprintf(fp, "\n... id: %" PRIu64 "\n", ev->id); + ret = fprintf(fp, "\n... id: %" PRI_lu64 "\n", ev->id); switch (ev->type) { case PERF_EVENT_UPDATE__SCALE: ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 04/23] libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (2 preceding siblings ...) 2019-08-28 13:56 ` [PATCH 03/23] libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' " Jiri Olsa @ 2019-08-28 13:56 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:56 ` [PATCH 05/23] libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' " Jiri Olsa ` (19 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:56 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_HEADER_EVENT_TYPE event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-1zsyvaupk78y7w42jfrvue1q@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 12 ++++++++++++ tools/perf/util/event.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 3d99818077d8..ecd1536a3a0c 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -163,4 +163,16 @@ struct event_update_event { char data[]; }; +#define MAX_EVENT_NAME 64 + +struct perf_trace_event_type { + __u64 event_id; + char name[MAX_EVENT_NAME]; +}; + +struct event_type_event { + struct perf_event_header header; + struct perf_trace_event_type event_type; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index a579e6b439d6..00725a1b602b 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,18 +337,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -#define MAX_EVENT_NAME 64 - -struct perf_trace_event_type { - u64 event_id; - char name[MAX_EVENT_NAME]; -}; - -struct event_type_event { - struct perf_event_header header; - struct perf_trace_event_type event_type; -}; - struct tracing_data_event { struct perf_event_header header; u32 size; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' to perf/event.h 2019-08-28 13:56 ` [PATCH 04/23] libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 0f5b1a28c03d416f7a66d47a9b2f18942e334fc6 Gitweb: https://git.kernel.org/tip/0f5b1a28c03d416f7a66d47a9b2f18942e334fc6 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:56:58 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Wed, 28 Aug 2019 18:15:04 -03:00 libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' to perf/event.h Move the PERF_RECORD_HEADER_EVENT_TYPE event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 12 ++++++++++++ tools/perf/util/event.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 3d99818..ecd1536 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -163,4 +163,16 @@ struct event_update_event { char data[]; }; +#define MAX_EVENT_NAME 64 + +struct perf_trace_event_type { + __u64 event_id; + char name[MAX_EVENT_NAME]; +}; + +struct event_type_event { + struct perf_event_header header; + struct perf_trace_event_type event_type; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index a579e6b..00725a1 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,18 +337,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -#define MAX_EVENT_NAME 64 - -struct perf_trace_event_type { - u64 event_id; - char name[MAX_EVENT_NAME]; -}; - -struct event_type_event { - struct perf_event_header header; - struct perf_trace_event_type event_type; -}; - struct tracing_data_event { struct perf_event_header header; u32 size; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 05/23] libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (3 preceding siblings ...) 2019-08-28 13:56 ` [PATCH 04/23] libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' " Jiri Olsa @ 2019-08-28 13:56 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 06/23] libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' " Jiri Olsa ` (18 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:56 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_HEADER_TRACING_DATA event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-a3vv3556pgb0k7gmp1hybqwy@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 5 +++++ tools/perf/util/event.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ecd1536a3a0c..fa81fea8dc02 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -175,4 +175,9 @@ struct event_type_event { struct perf_trace_event_type event_type; }; +struct tracing_data_event { + struct perf_event_header header; + __u32 size; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 00725a1b602b..67f6a67ad3b4 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,11 +337,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct tracing_data_event { - struct perf_event_header header; - u32 size; -}; - struct id_index_entry { u64 id; u64 idx; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' to perf/event.h 2019-08-28 13:56 ` [PATCH 05/23] libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 4fd7a4d220421bc6b63a6f693e45d4397d4da055 Gitweb: https://git.kernel.org/tip/4fd7a4d220421bc6b63a6f693e45d4397d4da055 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:56:59 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Wed, 28 Aug 2019 18:15:04 -03:00 libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' to perf/event.h Move the PERF_RECORD_HEADER_TRACING_DATA event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 5 +++++ tools/perf/util/event.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ecd1536..fa81fea 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -175,4 +175,9 @@ struct event_type_event { struct perf_trace_event_type event_type; }; +struct tracing_data_event { + struct perf_event_header header; + __u32 size; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 00725a1..67f6a67 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,11 +337,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct tracing_data_event { - struct perf_event_header header; - u32 size; -}; - struct id_index_entry { u64 id; u64 idx; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 06/23] libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (4 preceding siblings ...) 2019-08-28 13:56 ` [PATCH 05/23] libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 07/23] libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' " Jiri Olsa ` (17 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_HEADER_BUILD_ID event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Adding the fix value for build_id variable, because it will never change. Link: http://lkml.kernel.org/n/tip-k8qspx6f04gaveoe7qwpapw8@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 8 ++++++++ tools/perf/util/event.h | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index fa81fea8dc02..5e6b6d16793c 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -6,6 +6,7 @@ #include <linux/types.h> #include <linux/limits.h> #include <linux/bpf.h> +#include <sys/types.h> /* pid_t */ struct perf_record_mmap { struct perf_event_header header; @@ -180,4 +181,11 @@ struct tracing_data_event { __u32 size; }; +struct build_id_event { + struct perf_event_header header; + pid_t pid; + __u8 build_id[24]; + char filename[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 67f6a67ad3b4..4b6cf89f31db 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -144,13 +144,6 @@ struct perf_sample { PERF_MEM_S(LOCK, NA) |\ PERF_MEM_S(TLB, NA)) -struct build_id_event { - struct perf_event_header header; - pid_t pid; - u8 build_id[PERF_ALIGN(BUILD_ID_SIZE, sizeof(u64))]; - char filename[]; -}; - enum perf_user_event_type { /* above any possible kernel type */ PERF_RECORD_USER_TYPE_START = 64, PERF_RECORD_HEADER_ATTR = 64, -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 06/23] libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: ffd337b45b1aedc86b1de3cf8de9a79c10fd3810 Gitweb: https://git.kernel.org/tip/ffd337b45b1aedc86b1de3cf8de9a79c10fd3810 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:00 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Wed, 28 Aug 2019 18:15:04 -03:00 libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' to perf/event.h Move the PERF_RECORD_HEADER_BUILD_ID event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Adding the fix value for build_id variable, because it will never change. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 8 ++++++++ tools/perf/util/event.h | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index fa81fea..5e6b6d1 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -6,6 +6,7 @@ #include <linux/types.h> #include <linux/limits.h> #include <linux/bpf.h> +#include <sys/types.h> /* pid_t */ struct perf_record_mmap { struct perf_event_header header; @@ -180,4 +181,11 @@ struct tracing_data_event { __u32 size; }; +struct build_id_event { + struct perf_event_header header; + pid_t pid; + __u8 build_id[24]; + char filename[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 67f6a67..4b6cf89 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -144,13 +144,6 @@ struct perf_sample { PERF_MEM_S(LOCK, NA) |\ PERF_MEM_S(TLB, NA)) -struct build_id_event { - struct perf_event_header header; - pid_t pid; - u8 build_id[PERF_ALIGN(BUILD_ID_SIZE, sizeof(u64))]; - char filename[]; -}; - enum perf_user_event_type { /* above any possible kernel type */ PERF_RECORD_USER_TYPE_START = 64, PERF_RECORD_HEADER_ATTR = 64, ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 07/23] libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (5 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 06/23] libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 08/23] libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' " Jiri Olsa ` (16 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_ID_INDEX event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Adding PRI_ld64 define, so we can use it in printf output. Link: http://lkml.kernel.org/n/tip-rfqlci30hjrzropnxjnwoz12@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 13 +++++++++++++ tools/perf/util/event.h | 15 ++------------- tools/perf/util/session.c | 8 ++++---- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 5e6b6d16793c..c68523c4fa01 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -188,4 +188,17 @@ struct build_id_event { char filename[]; }; +struct id_index_entry { + __u64 id; + __u64 idx; + __u64 cpu; + __u64 tid; +}; + +struct id_index_event { + struct perf_event_header header; + __u64 nr; + struct id_index_entry entries[0]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 4b6cf89f31db..82315d2845fe 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -22,9 +22,11 @@ */ #define PRI_lu64 "l" PRIu64 #define PRI_lx64 "l" PRIx64 +#define PRI_ld64 "l" PRId64 #else #define PRI_lu64 PRIu64 #define PRI_lx64 PRIx64 +#define PRI_ld64 PRId64 #endif #define PERF_SAMPLE_MASK \ @@ -330,19 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct id_index_entry { - u64 id; - u64 idx; - u64 cpu; - u64 tid; -}; - -struct id_index_event { - struct perf_event_header header; - u64 nr; - struct id_index_entry entries[0]; -}; - struct auxtrace_info_event { struct perf_event_header header; u32 type; diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 5786e9c807c5..daa8aed27eae 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -2392,10 +2392,10 @@ int perf_event__process_id_index(struct perf_session *session, struct perf_sample_id *sid; if (dump_trace) { - fprintf(stdout, " ... id: %"PRIu64, e->id); - fprintf(stdout, " idx: %"PRIu64, e->idx); - fprintf(stdout, " cpu: %"PRId64, e->cpu); - fprintf(stdout, " tid: %"PRId64"\n", e->tid); + fprintf(stdout, " ... id: %"PRI_lu64, e->id); + fprintf(stdout, " idx: %"PRI_lu64, e->idx); + fprintf(stdout, " cpu: %"PRI_ld64, e->cpu); + fprintf(stdout, " tid: %"PRI_ld64"\n", e->tid); } sid = perf_evlist__id2sid(evlist, e->id); -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 07/23] libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: fecb410030628d70401e06a98a585d735f61d7e2 Gitweb: https://git.kernel.org/tip/fecb410030628d70401e06a98a585d735f61d7e2 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:01 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Wed, 28 Aug 2019 18:15:05 -03:00 libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' to perf/event.h Move the PERF_RECORD_ID_INDEX event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Add the PRI_ld64 define, so we can use it in printf output. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 13 +++++++++++++ tools/perf/util/event.h | 15 ++------------- tools/perf/util/session.c | 8 ++++---- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 5e6b6d1..c68523c 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -188,4 +188,17 @@ struct build_id_event { char filename[]; }; +struct id_index_entry { + __u64 id; + __u64 idx; + __u64 cpu; + __u64 tid; +}; + +struct id_index_event { + struct perf_event_header header; + __u64 nr; + struct id_index_entry entries[0]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 4b6cf89..82315d2 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -22,9 +22,11 @@ */ #define PRI_lu64 "l" PRIu64 #define PRI_lx64 "l" PRIx64 +#define PRI_ld64 "l" PRId64 #else #define PRI_lu64 PRIu64 #define PRI_lx64 PRIx64 +#define PRI_ld64 PRId64 #endif #define PERF_SAMPLE_MASK \ @@ -330,19 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct id_index_entry { - u64 id; - u64 idx; - u64 cpu; - u64 tid; -}; - -struct id_index_event { - struct perf_event_header header; - u64 nr; - struct id_index_entry entries[0]; -}; - struct auxtrace_info_event { struct perf_event_header header; u32 type; diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index a275f2e..aa96674 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -2393,10 +2393,10 @@ int perf_event__process_id_index(struct perf_session *session, struct perf_sample_id *sid; if (dump_trace) { - fprintf(stdout, " ... id: %"PRIu64, e->id); - fprintf(stdout, " idx: %"PRIu64, e->idx); - fprintf(stdout, " cpu: %"PRId64, e->cpu); - fprintf(stdout, " tid: %"PRId64"\n", e->tid); + fprintf(stdout, " ... id: %"PRI_lu64, e->id); + fprintf(stdout, " idx: %"PRI_lu64, e->idx); + fprintf(stdout, " cpu: %"PRI_ld64, e->cpu); + fprintf(stdout, " tid: %"PRI_ld64"\n", e->tid); } sid = perf_evlist__id2sid(evlist, e->id); ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 08/23] libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (6 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 07/23] libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 09/23] libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' " Jiri Olsa ` (15 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_AUXTRACE_INFO event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-794xxtrbjexwc0o0p2o79b1y@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/arch/x86/util/intel-pt.c | 2 +- tools/perf/lib/include/perf/event.h | 7 +++++++ tools/perf/util/arm-spe.c | 2 +- tools/perf/util/event.h | 7 ------- tools/perf/util/intel-bts.c | 2 +- tools/perf/util/intel-pt.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index 44cfe72c1a4c..d7125e331dda 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -327,7 +327,7 @@ static int intel_pt_info_fill(struct auxtrace_record *itr, unsigned long max_non_turbo_ratio; size_t filter_str_len; const char *filter; - u64 *info; + __u64 *info; int err; if (priv_size != ptr->priv_size) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index c68523c4fa01..02da73491451 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -201,4 +201,11 @@ struct id_index_event { struct id_index_entry entries[0]; }; +struct auxtrace_info_event { + struct perf_event_header header; + __u32 type; + __u32 reserved__; /* For alignment */ + __u64 priv[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index a314e5b26e9d..cd26315bc9aa 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -181,7 +181,7 @@ static const char * const arm_spe_info_fmts[] = { [ARM_SPE_PMU_TYPE] = " PMU Type %"PRId64"\n", }; -static void arm_spe_print_info(u64 *arr) +static void arm_spe_print_info(__u64 *arr) { if (!dump_trace) return; diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 82315d2845fe..ca2cae332c43 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,13 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct auxtrace_info_event { - struct perf_event_header header; - u32 type; - u32 reserved__; /* For alignment */ - u64 priv[]; -}; - struct auxtrace_event { struct perf_event_header header; u64 size; diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c index 8dc6408206b9..03c581a0d5d0 100644 --- a/tools/perf/util/intel-bts.c +++ b/tools/perf/util/intel-bts.c @@ -834,7 +834,7 @@ static const char * const intel_bts_info_fmts[] = { [INTEL_BTS_SNAPSHOT_MODE] = " Snapshot mode %"PRId64"\n", }; -static void intel_bts_print_info(u64 *arr, int start, int finish) +static void intel_bts_print_info(__u64 *arr, int start, int finish) { int i; diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index ea504fa9b623..c83a9a718c03 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -3044,7 +3044,7 @@ static const char * const intel_pt_info_fmts[] = { [INTEL_PT_FILTER_STR_LEN] = " Filter string len. %"PRIu64"\n", }; -static void intel_pt_print_info(u64 *arr, int start, int finish) +static void intel_pt_print_info(__u64 *arr, int start, int finish) { int i; @@ -3076,7 +3076,7 @@ int intel_pt_process_auxtrace_info(union perf_event *event, size_t min_sz = sizeof(u64) * INTEL_PT_PER_CPU_MMAPS; struct intel_pt *pt; void *info_end; - u64 *info; + __u64 *info; int err; if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) + -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 08/23] libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 9a8dad0419552934573ddf94d11146faeda465b5 Gitweb: https://git.kernel.org/tip/9a8dad0419552934573ddf94d11146faeda465b5 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:02 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:34:52 -03:00 libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' to perf/event.h Move the PERF_RECORD_AUXTRACE_INFO event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-9-jolsa@kernel.org [ Fix cs_etm__print_auxtrace_info() arg to be __u64 too to fix the CORESIGHT=1 build ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/arch/x86/util/intel-pt.c | 2 +- tools/perf/lib/include/perf/event.h | 7 +++++++ tools/perf/util/arm-spe.c | 2 +- tools/perf/util/cs-etm.c | 2 +- tools/perf/util/event.h | 7 ------- tools/perf/util/intel-bts.c | 2 +- tools/perf/util/intel-pt.c | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index 04b424a..89fe30d 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -328,7 +328,7 @@ static int intel_pt_info_fill(struct auxtrace_record *itr, unsigned long max_non_turbo_ratio; size_t filter_str_len; const char *filter; - u64 *info; + __u64 *info; int err; if (priv_size != ptr->priv_size) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index c68523c..02da734 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -201,4 +201,11 @@ struct id_index_event { struct id_index_entry entries[0]; }; +struct auxtrace_info_event { + struct perf_event_header header; + __u32 type; + __u32 reserved__; /* For alignment */ + __u64 priv[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index a314e5b..cd26315 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -181,7 +181,7 @@ static const char * const arm_spe_info_fmts[] = { [ARM_SPE_PMU_TYPE] = " PMU Type %"PRId64"\n", }; -static void arm_spe_print_info(u64 *arr) +static void arm_spe_print_info(__u64 *arr) { if (!dump_trace) return; diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index b3a5daa..e210c1d 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -2370,7 +2370,7 @@ static const char * const cs_etmv4_priv_fmts[] = { [CS_ETMV4_TRCAUTHSTATUS] = " TRCAUTHSTATUS %llx\n", }; -static void cs_etm__print_auxtrace_info(u64 *val, int num) +static void cs_etm__print_auxtrace_info(__u64 *val, int num) { int i, j, cpu = 0; diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 82315d2..ca2cae3 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,13 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct auxtrace_info_event { - struct perf_event_header header; - u32 type; - u32 reserved__; /* For alignment */ - u64 priv[]; -}; - struct auxtrace_event { struct perf_event_header header; u64 size; diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c index 8dc6408..03c581a 100644 --- a/tools/perf/util/intel-bts.c +++ b/tools/perf/util/intel-bts.c @@ -834,7 +834,7 @@ static const char * const intel_bts_info_fmts[] = { [INTEL_BTS_SNAPSHOT_MODE] = " Snapshot mode %"PRId64"\n", }; -static void intel_bts_print_info(u64 *arr, int start, int finish) +static void intel_bts_print_info(__u64 *arr, int start, int finish) { int i; diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index ea504fa..c83a9a7 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -3044,7 +3044,7 @@ static const char * const intel_pt_info_fmts[] = { [INTEL_PT_FILTER_STR_LEN] = " Filter string len. %"PRIu64"\n", }; -static void intel_pt_print_info(u64 *arr, int start, int finish) +static void intel_pt_print_info(__u64 *arr, int start, int finish) { int i; @@ -3076,7 +3076,7 @@ int intel_pt_process_auxtrace_info(union perf_event *event, size_t min_sz = sizeof(u64) * INTEL_PT_PER_CPU_MMAPS; struct intel_pt *pt; void *info_end; - u64 *info; + __u64 *info; int err; if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) + ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 09/23] libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (7 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 08/23] libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 10/23] libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' " Jiri Olsa ` (14 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_AUXTRACE event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-wrq43lrq47pqj0vhdqpgyanz@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 11 +++++++++++ tools/perf/util/auxtrace.c | 2 +- tools/perf/util/event.h | 11 ----------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 02da73491451..78001c2973b6 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -208,4 +208,15 @@ struct auxtrace_info_event { __u64 priv[]; }; +struct auxtrace_event { + struct perf_event_header header; + __u64 size; + __u64 offset; + __u64 reference; + __u32 idx; + __u32 tid; + __u32 cpu; + __u32 reserved__; /* For alignment */ +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 12e9b7acbb2c..0d2ba1397e47 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -942,7 +942,7 @@ s64 perf_event__process_auxtrace(struct perf_session *session, s64 err; if (dump_trace) - fprintf(stdout, " size: %#"PRIx64" offset: %#"PRIx64" ref: %#"PRIx64" idx: %u tid: %d cpu: %d\n", + fprintf(stdout, " size: %#"PRI_lx64" offset: %#"PRI_lx64" ref: %#"PRI_lx64" idx: %u tid: %d cpu: %d\n", event->auxtrace.size, event->auxtrace.offset, event->auxtrace.reference, event->auxtrace.idx, event->auxtrace.tid, event->auxtrace.cpu); diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index ca2cae332c43..60895a3b2c85 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,17 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct auxtrace_event { - struct perf_event_header header; - u64 size; - u64 offset; - u64 reference; - u32 idx; - u32 tid; - u32 cpu; - u32 reserved__; /* For alignment */ -}; - #define MAX_AUXTRACE_ERROR_MSG 64 struct auxtrace_error_event { -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 09/23] libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 306c9d24c09d84d80ae54b36f7f907c8b8fa537a Gitweb: https://git.kernel.org/tip/306c9d24c09d84d80ae54b36f7f907c8b8fa537a Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:03 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:11 -03:00 libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' to perf/event.h Move the PERF_RECORD_AUXTRACE event definition to libperf's event.h. Ipn order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 11 +++++++++++ tools/perf/util/auxtrace.c | 2 +- tools/perf/util/event.h | 11 ----------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 02da734..78001c2 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -208,4 +208,15 @@ struct auxtrace_info_event { __u64 priv[]; }; +struct auxtrace_event { + struct perf_event_header header; + __u64 size; + __u64 offset; + __u64 reference; + __u32 idx; + __u32 tid; + __u32 cpu; + __u32 reserved__; /* For alignment */ +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 112c24a..5edec71 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -943,7 +943,7 @@ s64 perf_event__process_auxtrace(struct perf_session *session, s64 err; if (dump_trace) - fprintf(stdout, " size: %#"PRIx64" offset: %#"PRIx64" ref: %#"PRIx64" idx: %u tid: %d cpu: %d\n", + fprintf(stdout, " size: %#"PRI_lx64" offset: %#"PRI_lx64" ref: %#"PRI_lx64" idx: %u tid: %d cpu: %d\n", event->auxtrace.size, event->auxtrace.offset, event->auxtrace.reference, event->auxtrace.idx, event->auxtrace.tid, event->auxtrace.cpu); diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index ca2cae3..60895a3 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,17 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct auxtrace_event { - struct perf_event_header header; - u64 size; - u64 offset; - u64 reference; - u32 idx; - u32 tid; - u32 cpu; - u32 reserved__; /* For alignment */ -}; - #define MAX_AUXTRACE_ERROR_MSG 64 struct auxtrace_error_event { ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 10/23] libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (8 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 09/23] libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 11/23] libperf: Add PERF_RECORD_AUX 'struct aux_event' " Jiri Olsa ` (13 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_AUXTRACE_ERROR event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-2i1ggfthfst9ont7ulmejgwg@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 15 +++++++++++++++ tools/perf/util/auxtrace.c | 2 +- tools/perf/util/event.h | 15 --------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 78001c2973b6..6292b7c41bac 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -219,4 +219,19 @@ struct auxtrace_event { __u32 reserved__; /* For alignment */ }; +#define MAX_AUXTRACE_ERROR_MSG 64 + +struct auxtrace_error_event { + struct perf_event_header header; + __u32 type; + __u32 code; + __u32 cpu; + __u32 pid; + __u32 tid; + __u32 fmt; + __u64 ip; + __u64 time; + char msg[MAX_AUXTRACE_ERROR_MSG]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 0d2ba1397e47..cddf04c45a20 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -1188,7 +1188,7 @@ size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp) if (!e->fmt) msg = (const char *)&e->time; - ret += fprintf(fp, " cpu %d pid %d tid %d ip %#"PRIx64" code %u: %s\n", + ret += fprintf(fp, " cpu %d pid %d tid %d ip %#"PRI_lx64" code %u: %s\n", e->cpu, e->pid, e->tid, e->ip, e->code, msg); return ret; } diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 60895a3b2c85..e334ecbe50a0 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,21 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -#define MAX_AUXTRACE_ERROR_MSG 64 - -struct auxtrace_error_event { - struct perf_event_header header; - u32 type; - u32 code; - u32 cpu; - u32 pid; - u32 tid; - u32 fmt; - u64 ip; - u64 time; - char msg[MAX_AUXTRACE_ERROR_MSG]; -}; - struct aux_event { struct perf_event_header header; u64 aux_offset; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 10/23] libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 3460efb2e842cccc4566756f194a1be0547f7098 Gitweb: https://git.kernel.org/tip/3460efb2e842cccc4566756f194a1be0547f7098 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:04 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:11 -03:00 libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' to perf/event.h Move the PERF_RECORD_AUXTRACE_ERROR event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 15 +++++++++++++++ tools/perf/util/auxtrace.c | 2 +- tools/perf/util/event.h | 15 --------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 78001c2..6292b7c 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -219,4 +219,19 @@ struct auxtrace_event { __u32 reserved__; /* For alignment */ }; +#define MAX_AUXTRACE_ERROR_MSG 64 + +struct auxtrace_error_event { + struct perf_event_header header; + __u32 type; + __u32 code; + __u32 cpu; + __u32 pid; + __u32 tid; + __u32 fmt; + __u64 ip; + __u64 time; + char msg[MAX_AUXTRACE_ERROR_MSG]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 5edec71..c3da8a0 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -1189,7 +1189,7 @@ size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp) if (!e->fmt) msg = (const char *)&e->time; - ret += fprintf(fp, " cpu %d pid %d tid %d ip %#"PRIx64" code %u: %s\n", + ret += fprintf(fp, " cpu %d pid %d tid %d ip %#"PRI_lx64" code %u: %s\n", e->cpu, e->pid, e->tid, e->ip, e->code, msg); return ret; } diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 60895a3..e334ecb 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,21 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -#define MAX_AUXTRACE_ERROR_MSG 64 - -struct auxtrace_error_event { - struct perf_event_header header; - u32 type; - u32 code; - u32 cpu; - u32 pid; - u32 tid; - u32 fmt; - u64 ip; - u64 time; - char msg[MAX_AUXTRACE_ERROR_MSG]; -}; - struct aux_event { struct perf_event_header header; u64 aux_offset; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 11/23] libperf: Add PERF_RECORD_AUX 'struct aux_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (9 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 10/23] libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 12/23] libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' " Jiri Olsa ` (12 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_AUX event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-u8n9stb8xl6hq0qoqjegoiyi@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 7 +++++++ tools/perf/util/event.c | 2 +- tools/perf/util/event.h | 7 ------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 6292b7c41bac..d453ac833a58 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -234,4 +234,11 @@ struct auxtrace_error_event { char msg[MAX_AUXTRACE_ERROR_MSG]; }; +struct aux_event { + struct perf_event_header header; + __u64 aux_offset; + __u64 aux_size; + __u64 flags; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 33616ea62a47..85f9f27782b1 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -1448,7 +1448,7 @@ int perf_event__process_exit(struct perf_tool *tool __maybe_unused, size_t perf_event__fprintf_aux(union perf_event *event, FILE *fp) { - return fprintf(fp, " offset: %#"PRIx64" size: %#"PRIx64" flags: %#"PRIx64" [%s%s%s]\n", + return fprintf(fp, " offset: %#"PRI_lx64" size: %#"PRI_lx64" flags: %#"PRI_lx64" [%s%s%s]\n", event->aux.aux_offset, event->aux.aux_size, event->aux.flags, event->aux.flags & PERF_AUX_FLAG_TRUNCATED ? "T" : "", diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index e334ecbe50a0..db901aea33af 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,13 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct aux_event { - struct perf_event_header header; - u64 aux_offset; - u64 aux_size; - u64 flags; -}; - struct itrace_start_event { struct perf_event_header header; u32 pid, tid; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_AUX 'struct aux_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 11/23] libperf: Add PERF_RECORD_AUX 'struct aux_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: aedebdca09ca6efa7efbc0bf26d94cb235120ee4 Gitweb: https://git.kernel.org/tip/aedebdca09ca6efa7efbc0bf26d94cb235120ee4 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:05 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:11 -03:00 libperf: Add PERF_RECORD_AUX 'struct aux_event' to perf/event.h Move the PERF_RECORD_AUX event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-12-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 7 +++++++ tools/perf/util/event.c | 2 +- tools/perf/util/event.h | 7 ------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 6292b7c..d453ac8 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -234,4 +234,11 @@ struct auxtrace_error_event { char msg[MAX_AUXTRACE_ERROR_MSG]; }; +struct aux_event { + struct perf_event_header header; + __u64 aux_offset; + __u64 aux_size; + __u64 flags; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index e33dd1a..b048e60 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -1449,7 +1449,7 @@ int perf_event__process_exit(struct perf_tool *tool __maybe_unused, size_t perf_event__fprintf_aux(union perf_event *event, FILE *fp) { - return fprintf(fp, " offset: %#"PRIx64" size: %#"PRIx64" flags: %#"PRIx64" [%s%s%s]\n", + return fprintf(fp, " offset: %#"PRI_lx64" size: %#"PRI_lx64" flags: %#"PRI_lx64" [%s%s%s]\n", event->aux.aux_offset, event->aux.aux_size, event->aux.flags, event->aux.flags & PERF_AUX_FLAG_TRUNCATED ? "T" : "", diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index e334ecb..db901ae 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,13 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct aux_event { - struct perf_event_header header; - u64 aux_offset; - u64 aux_size; - u64 flags; -}; - struct itrace_start_event { struct perf_event_header header; u32 pid, tid; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 12/23] libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (10 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 11/23] libperf: Add PERF_RECORD_AUX 'struct aux_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 13/23] libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' " Jiri Olsa ` (11 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_ITRACE_START event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-it9jc5sr10hblg89ljuz7j93@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index d453ac833a58..3bcbc1eaeb35 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -241,4 +241,10 @@ struct aux_event { __u64 flags; }; +struct itrace_start_event { + struct perf_event_header header; + __u32 pid; + __u32 tid; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index db901aea33af..f89e8ddadd46 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,11 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct itrace_start_event { - struct perf_event_header header; - u32 pid, tid; -}; - struct context_switch_event { struct perf_event_header header; u32 next_prev_pid; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 12/23] libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: f279ad63a09da65766dfeaf03cfd659f95414936 Gitweb: https://git.kernel.org/tip/f279ad63a09da65766dfeaf03cfd659f95414936 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:06 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:11 -03:00 libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' to perf/event.h Move the PERF_RECORD_ITRACE_START event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-13-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index d453ac8..3bcbc1e 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -241,4 +241,10 @@ struct aux_event { __u64 flags; }; +struct itrace_start_event { + struct perf_event_header header; + __u32 pid; + __u32 tid; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index db901ae..f89e8dd 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,11 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct itrace_start_event { - struct perf_event_header header; - u32 pid, tid; -}; - struct context_switch_event { struct perf_event_header header; u32 next_prev_pid; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 13/23] libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (11 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 12/23] libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 14/23] libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' " Jiri Olsa ` (10 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_SWITCH event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-hduuqm2bnzbxhhoynf2x3d3q@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 3bcbc1eaeb35..a7b0344bb8b4 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -110,6 +110,12 @@ struct perf_record_sample { __u64 array[]; }; +struct context_switch_event { + struct perf_event_header header; + __u32 next_prev_pid; + __u32 next_prev_tid; +}; + struct attr_event { struct perf_event_header header; struct perf_event_attr attr; diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index f89e8ddadd46..012b2ba9a9a8 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,12 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct context_switch_event { - struct perf_event_header header; - u32 next_prev_pid; - u32 next_prev_tid; -}; - struct thread_map_event_entry { u64 pid; char comm[16]; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 13/23] libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 6b49aaebd05fdbb29a4ab6e28b4fa91539c64877 Gitweb: https://git.kernel.org/tip/6b49aaebd05fdbb29a4ab6e28b4fa91539c64877 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:07 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:11 -03:00 libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' to perf/event.h Move the PERF_RECORD_SWITCH event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-14-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 3bcbc1e..a7b0344 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -110,6 +110,12 @@ struct perf_record_sample { __u64 array[]; }; +struct context_switch_event { + struct perf_event_header header; + __u32 next_prev_pid; + __u32 next_prev_tid; +}; + struct attr_event { struct perf_event_header header; struct perf_event_attr attr; diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index f89e8dd..012b2ba 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,12 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct context_switch_event { - struct perf_event_header header; - u32 next_prev_pid; - u32 next_prev_tid; -}; - struct thread_map_event_entry { u64 pid; char comm[16]; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 14/23] libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (12 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 13/23] libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 15/23] libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' " Jiri Olsa ` (9 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_THREAD_MAP event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-7gqcq30lozmcm0rsbs8kq67k@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 11 +++++++++++ tools/perf/util/event.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index a7b0344bb8b4..fe0ce655af17 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -253,4 +253,15 @@ struct itrace_start_event { __u32 tid; }; +struct thread_map_event_entry { + __u64 pid; + char comm[16]; +}; + +struct thread_map_event { + struct perf_event_header header; + __u64 nr; + struct thread_map_event_entry entries[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 012b2ba9a9a8..3a856696c6b1 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,17 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct thread_map_event_entry { - u64 pid; - char comm[16]; -}; - -struct thread_map_event { - struct perf_event_header header; - u64 nr; - struct thread_map_event_entry entries[]; -}; - enum { PERF_STAT_CONFIG_TERM__AGGR_MODE = 0, PERF_STAT_CONFIG_TERM__INTERVAL = 1, -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 14/23] libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 3e4c453f5cbac75afec37eedd0ffcd8dac82e23e Gitweb: https://git.kernel.org/tip/3e4c453f5cbac75afec37eedd0ffcd8dac82e23e Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:08 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:11 -03:00 libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' to perf/event.h Move the PERF_RECORD_THREAD_MAP event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-15-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 11 +++++++++++ tools/perf/util/event.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index a7b0344..fe0ce65 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -253,4 +253,15 @@ struct itrace_start_event { __u32 tid; }; +struct thread_map_event_entry { + __u64 pid; + char comm[16]; +}; + +struct thread_map_event { + struct perf_event_header header; + __u64 nr; + struct thread_map_event_entry entries[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 012b2ba..3a85669 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,17 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct thread_map_event_entry { - u64 pid; - char comm[16]; -}; - -struct thread_map_event { - struct perf_event_header header; - u64 nr; - struct thread_map_event_entry entries[]; -}; - enum { PERF_STAT_CONFIG_TERM__AGGR_MODE = 0, PERF_STAT_CONFIG_TERM__INTERVAL = 1, ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 15/23] libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (13 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 14/23] libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 16/23] libperf: Add PERF_RECORD_STAT 'struct stat_event' " Jiri Olsa ` (8 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_STAT_CONFIG event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-ftr4j2l1by743i4rk9msjbmi@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 18 ++++++++++++++++++ tools/perf/util/event.c | 2 +- tools/perf/util/event.h | 18 ------------------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index fe0ce655af17..ba6ed243a31f 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -264,4 +264,22 @@ struct thread_map_event { struct thread_map_event_entry entries[]; }; +enum { + PERF_STAT_CONFIG_TERM__AGGR_MODE = 0, + PERF_STAT_CONFIG_TERM__INTERVAL = 1, + PERF_STAT_CONFIG_TERM__SCALE = 2, + PERF_STAT_CONFIG_TERM__MAX = 3, +}; + +struct stat_config_event_entry { + __u64 tag; + __u64 val; +}; + +struct stat_config_event { + struct perf_event_header header; + __u64 nr; + struct stat_config_event_entry data[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 85f9f27782b1..2369333d61d8 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -1234,7 +1234,7 @@ void perf_event__read_stat_config(struct perf_stat_config *config, CASE(INTERVAL, interval) #undef CASE default: - pr_warning("unknown stat config term %" PRIu64 "\n", + pr_warning("unknown stat config term %" PRI_lu64 "\n", event->data[i].tag); } } diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 3a856696c6b1..68531d08dcec 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,24 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -enum { - PERF_STAT_CONFIG_TERM__AGGR_MODE = 0, - PERF_STAT_CONFIG_TERM__INTERVAL = 1, - PERF_STAT_CONFIG_TERM__SCALE = 2, - PERF_STAT_CONFIG_TERM__MAX = 3, -}; - -struct stat_config_event_entry { - u64 tag; - u64 val; -}; - -struct stat_config_event { - struct perf_event_header header; - u64 nr; - struct stat_config_event_entry data[]; -}; - struct stat_event { struct perf_event_header header; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 15/23] libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: c5f416e6c69e333207666a1ddab0b41c6f12e588 Gitweb: https://git.kernel.org/tip/c5f416e6c69e333207666a1ddab0b41c6f12e588 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:09 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:11 -03:00 libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' to perf/event.h Move the PERF_RECORD_STAT_CONFIG event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-16-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 18 ++++++++++++++++++ tools/perf/util/event.c | 2 +- tools/perf/util/event.h | 18 ------------------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index fe0ce65..ba6ed24 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -264,4 +264,22 @@ struct thread_map_event { struct thread_map_event_entry entries[]; }; +enum { + PERF_STAT_CONFIG_TERM__AGGR_MODE = 0, + PERF_STAT_CONFIG_TERM__INTERVAL = 1, + PERF_STAT_CONFIG_TERM__SCALE = 2, + PERF_STAT_CONFIG_TERM__MAX = 3, +}; + +struct stat_config_event_entry { + __u64 tag; + __u64 val; +}; + +struct stat_config_event { + struct perf_event_header header; + __u64 nr; + struct stat_config_event_entry data[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index b048e60..b711019 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -1235,7 +1235,7 @@ void perf_event__read_stat_config(struct perf_stat_config *config, CASE(INTERVAL, interval) #undef CASE default: - pr_warning("unknown stat config term %" PRIu64 "\n", + pr_warning("unknown stat config term %" PRI_lu64 "\n", event->data[i].tag); } } diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 3a85669..68531d0 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,24 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -enum { - PERF_STAT_CONFIG_TERM__AGGR_MODE = 0, - PERF_STAT_CONFIG_TERM__INTERVAL = 1, - PERF_STAT_CONFIG_TERM__SCALE = 2, - PERF_STAT_CONFIG_TERM__MAX = 3, -}; - -struct stat_config_event_entry { - u64 tag; - u64 val; -}; - -struct stat_config_event { - struct perf_event_header header; - u64 nr; - struct stat_config_event_entry data[]; -}; - struct stat_event { struct perf_event_header header; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 16/23] libperf: Add PERF_RECORD_STAT 'struct stat_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (14 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 15/23] libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 17/23] libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' " Jiri Olsa ` (7 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_STAT event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-80tqbm5o9hhyl924f8khd6tp@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 17 +++++++++++++++++ tools/perf/util/event.h | 17 ----------------- tools/perf/util/stat.c | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ba6ed243a31f..7d1834f558d6 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -282,4 +282,21 @@ struct stat_config_event { struct stat_config_event_entry data[]; }; +struct stat_event { + struct perf_event_header header; + + __u64 id; + __u32 cpu; + __u32 thread; + + union { + struct { + __u64 val; + __u64 ena; + __u64 run; + }; + __u64 values[3]; + }; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 68531d08dcec..f3a02e01852a 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,23 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct stat_event { - struct perf_event_header header; - - u64 id; - u32 cpu; - u32 thread; - - union { - struct { - u64 val; - u64 ena; - u64 run; - }; - u64 values[3]; - }; -}; - enum { PERF_STAT_ROUND_TYPE__INTERVAL = 0, PERF_STAT_ROUND_TYPE__FINAL = 1, diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index f985336b3a22..c0cd9f9bb0ea 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -405,9 +405,9 @@ size_t perf_event__fprintf_stat(union perf_event *event, FILE *fp) struct stat_event *st = (struct stat_event *) event; size_t ret; - ret = fprintf(fp, "\n... id %" PRIu64 ", cpu %d, thread %d\n", + ret = fprintf(fp, "\n... id %" PRI_lu64 ", cpu %d, thread %d\n", st->id, st->cpu, st->thread); - ret += fprintf(fp, "... value %" PRIu64 ", enabled %" PRIu64 ", running %" PRIu64 "\n", + ret += fprintf(fp, "... value %" PRI_lu64 ", enabled %" PRI_lu64 ", running %" PRI_lu64 "\n", st->val, st->ena, st->run); return ret; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_STAT 'struct stat_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 16/23] libperf: Add PERF_RECORD_STAT 'struct stat_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 18a13a60f6f50f2fb1f7354f6d0b2ded01995443 Gitweb: https://git.kernel.org/tip/18a13a60f6f50f2fb1f7354f6d0b2ded01995443 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:10 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:12 -03:00 libperf: Add PERF_RECORD_STAT 'struct stat_event' to perf/event.h Move the PERF_RECORD_STAT event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 17 +++++++++++++++++ tools/perf/util/event.h | 17 ----------------- tools/perf/util/stat.c | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ba6ed24..7d1834f 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -282,4 +282,21 @@ struct stat_config_event { struct stat_config_event_entry data[]; }; +struct stat_event { + struct perf_event_header header; + + __u64 id; + __u32 cpu; + __u32 thread; + + union { + struct { + __u64 val; + __u64 ena; + __u64 run; + }; + __u64 values[3]; + }; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 68531d0..f3a02e0 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,23 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct stat_event { - struct perf_event_header header; - - u64 id; - u32 cpu; - u32 thread; - - union { - struct { - u64 val; - u64 ena; - u64 run; - }; - u64 values[3]; - }; -}; - enum { PERF_STAT_ROUND_TYPE__INTERVAL = 0, PERF_STAT_ROUND_TYPE__FINAL = 1, diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index f985336..c0cd9f9 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -405,9 +405,9 @@ size_t perf_event__fprintf_stat(union perf_event *event, FILE *fp) struct stat_event *st = (struct stat_event *) event; size_t ret; - ret = fprintf(fp, "\n... id %" PRIu64 ", cpu %d, thread %d\n", + ret = fprintf(fp, "\n... id %" PRI_lu64 ", cpu %d, thread %d\n", st->id, st->cpu, st->thread); - ret += fprintf(fp, "... value %" PRIu64 ", enabled %" PRIu64 ", running %" PRIu64 "\n", + ret += fprintf(fp, "... value %" PRI_lu64 ", enabled %" PRI_lu64 ", running %" PRI_lu64 "\n", st->val, st->ena, st->run); return ret; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 17/23] libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (15 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 16/23] libperf: Add PERF_RECORD_STAT 'struct stat_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 18/23] libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' " Jiri Olsa ` (6 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_STAT_ROUND event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-x7c2m4n8303nftb4maf333of@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ tools/perf/util/stat.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 7d1834f558d6..34d365bd2c5c 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -299,4 +299,10 @@ struct stat_event { }; }; +struct stat_round_event { + struct perf_event_header header; + __u64 type; + __u64 time; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index f3a02e01852a..ec76412afba1 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,12 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -struct stat_round_event { - struct perf_event_header header; - u64 type; - u64 time; -}; - struct time_conv_event { struct perf_event_header header; u64 time_shift; diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index c0cd9f9bb0ea..4c7957496e7c 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -418,7 +418,7 @@ size_t perf_event__fprintf_stat_round(union perf_event *event, FILE *fp) struct stat_round_event *rd = (struct stat_round_event *)event; size_t ret; - ret = fprintf(fp, "\n... time %" PRIu64 ", type %s\n", rd->time, + ret = fprintf(fp, "\n... time %" PRI_lu64 ", type %s\n", rd->time, rd->type == PERF_STAT_ROUND_TYPE__FINAL ? "FINAL" : "INTERVAL"); return ret; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 17/23] libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 782adbe2964953803ea1a38b80f6255c336cdd7b Gitweb: https://git.kernel.org/tip/782adbe2964953803ea1a38b80f6255c336cdd7b Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:11 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:12 -03:00 libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' to perf/event.h Move the PERF_RECORD_STAT_ROUND event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-18-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ tools/perf/util/stat.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 7d1834f..34d365b 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -299,4 +299,10 @@ struct stat_event { }; }; +struct stat_round_event { + struct perf_event_header header; + __u64 type; + __u64 time; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index f3a02e0..ec76412 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,12 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -struct stat_round_event { - struct perf_event_header header; - u64 type; - u64 time; -}; - struct time_conv_event { struct perf_event_header header; u64 time_shift; diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index c0cd9f9..4c79574 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -418,7 +418,7 @@ size_t perf_event__fprintf_stat_round(union perf_event *event, FILE *fp) struct stat_round_event *rd = (struct stat_round_event *)event; size_t ret; - ret = fprintf(fp, "\n... time %" PRIu64 ", type %s\n", rd->time, + ret = fprintf(fp, "\n... time %" PRI_lu64 ", type %s\n", rd->time, rd->type == PERF_STAT_ROUND_TYPE__FINAL ? "FINAL" : "INTERVAL"); return ret; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 18/23] libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (16 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 17/23] libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 19/23] libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' " Jiri Olsa ` (5 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_TIME_CONV event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-dize9k67s0341vek7hs8vhty@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 7 +++++++ tools/perf/util/event.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 34d365bd2c5c..7600f53f6ad1 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -305,4 +305,11 @@ struct stat_round_event { __u64 time; }; +struct time_conv_event { + struct perf_event_header header; + __u64 time_shift; + __u64 time_mult; + __u64 time_zero; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index ec76412afba1..d758485956b3 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,13 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -struct time_conv_event { - struct perf_event_header header; - u64 time_shift; - u64 time_mult; - u64 time_zero; -}; - struct feature_event { struct perf_event_header header; u64 feat_id; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 18/23] libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' " Jiri Olsa @ 2019-08-29 19:01 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:01 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: bfd922d8f09a692f2a952a67451bc3eeaad3fb73 Gitweb: https://git.kernel.org/tip/bfd922d8f09a692f2a952a67451bc3eeaad3fb73 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:12 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:12 -03:00 libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' to perf/event.h Move the PERF_RECORD_TIME_CONV event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-19-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 7 +++++++ tools/perf/util/event.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 34d365b..7600f53 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -305,4 +305,11 @@ struct stat_round_event { __u64 time; }; +struct time_conv_event { + struct perf_event_header header; + __u64 time_shift; + __u64 time_mult; + __u64 time_zero; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index ec76412..d758485 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,13 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -struct time_conv_event { - struct perf_event_header header; - u64 time_shift; - u64 time_mult; - u64 time_zero; -}; - struct feature_event { struct perf_event_header header; u64 feat_id; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 19/23] libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (17 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 18/23] libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 20/23] libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' " Jiri Olsa ` (4 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_HEADER_FEATURE event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-adohmimljqrbq2i3dxhhrpnp@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/builtin-report.c | 2 +- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 318b0b95c14c..0d71f26a8a44 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -211,7 +211,7 @@ static int process_feature_event(struct perf_session *session, return perf_event__process_feature(session, event); if (event->feat.feat_id != HEADER_LAST_FEATURE) { - pr_err("failed: wrong feature ID: %" PRIu64 "\n", + pr_err("failed: wrong feature ID: %" PRI_lu64 "\n", event->feat.feat_id); return -1; } diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 7600f53f6ad1..ed1c22e650e2 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -312,4 +312,10 @@ struct time_conv_event { __u64 time_zero; }; +struct feature_event { + struct perf_event_header header; + __u64 feat_id; + char data[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index d758485956b3..94777ee435c2 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,12 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -struct feature_event { - struct perf_event_header header; - u64 feat_id; - char data[]; -}; - struct compressed_event { struct perf_event_header header; char data[]; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 19/23] libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' " Jiri Olsa @ 2019-08-29 19:02 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:02 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 1b8896fb296f4087c45c997c4b212544c639e272 Gitweb: https://git.kernel.org/tip/1b8896fb296f4087c45c997c4b212544c639e272 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:13 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:12 -03:00 libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' to perf/event.h Move the PERF_RECORD_HEADER_FEATURE event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-20-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/builtin-report.c | 2 +- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 0338916..33c20e2 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -212,7 +212,7 @@ static int process_feature_event(struct perf_session *session, return perf_event__process_feature(session, event); if (event->feat.feat_id != HEADER_LAST_FEATURE) { - pr_err("failed: wrong feature ID: %" PRIu64 "\n", + pr_err("failed: wrong feature ID: %" PRI_lu64 "\n", event->feat.feat_id); return -1; } diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 7600f53..ed1c22e 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -312,4 +312,10 @@ struct time_conv_event { __u64 time_zero; }; +struct feature_event { + struct perf_event_header header; + __u64 feat_id; + char data[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index d758485..94777ee 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,12 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -struct feature_event { - struct perf_event_header header; - u64 feat_id; - char data[]; -}; - struct compressed_event { struct perf_event_header header; char data[]; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 20/23] libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (18 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 19/23] libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 21/23] libperf: Add 'union perf_event' " Jiri Olsa ` (3 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Move the PERF_RECORD_COMPRESSED event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-czl9nuv0c9tpdkzby92lxii1@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 5 +++++ tools/perf/util/event.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ed1c22e650e2..ef7a46e82a6d 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -318,4 +318,9 @@ struct feature_event { char data[]; }; +struct compressed_event { + struct perf_event_header header; + char data[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 94777ee435c2..ee2ee23e4c46 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,11 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -struct compressed_event { - struct perf_event_header header; - char data[]; -}; - union perf_event { struct perf_event_header header; struct perf_record_mmap mmap; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 20/23] libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' " Jiri Olsa @ 2019-08-29 19:02 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:02 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: f5f684321791eb5ebb8c56d7d223e71fe08b5dd9 Gitweb: https://git.kernel.org/tip/f5f684321791eb5ebb8c56d7d223e71fe08b5dd9 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:14 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:12 -03:00 libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' to perf/event.h Move the PERF_RECORD_COMPRESSED event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-21-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 5 +++++ tools/perf/util/event.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ed1c22e..ef7a46e 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -318,4 +318,9 @@ struct feature_event { char data[]; }; +struct compressed_event { + struct perf_event_header header; + char data[]; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 94777ee..ee2ee23 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,11 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -struct compressed_event { - struct perf_event_header header; - char data[]; -}; - union perf_event { struct perf_event_header header; struct perf_record_mmap mmap; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 21/23] libperf: Add 'union perf_event' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (19 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 20/23] libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 22/23] libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix Jiri Olsa ` (2 subsequent siblings) 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan So it's available for libperf's users. Link: http://lkml.kernel.org/n/tip-2b9e9f0y7szdwtgnyua58b88@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 36 +++++++++++++++++++++++++++++ tools/perf/util/event.h | 36 ----------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ef7a46e82a6d..a5b08ef118a7 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -323,4 +323,40 @@ struct compressed_event { char data[]; }; +union perf_event { + struct perf_event_header header; + struct perf_record_mmap mmap; + struct perf_record_mmap2 mmap2; + struct perf_record_comm comm; + struct perf_record_namespaces namespaces; + struct perf_record_fork fork; + struct perf_record_lost lost; + struct perf_record_lost_samples lost_samples; + struct perf_record_read read; + struct perf_record_throttle throttle; + struct perf_record_sample sample; + struct perf_record_bpf_event bpf; + struct perf_record_ksymbol ksymbol; + struct attr_event attr; + struct event_update_event event_update; + struct event_type_event event_type; + struct tracing_data_event tracing_data; + struct build_id_event build_id; + struct id_index_event id_index; + struct auxtrace_info_event auxtrace_info; + struct auxtrace_event auxtrace; + struct auxtrace_error_event auxtrace_error; + struct aux_event aux; + struct itrace_start_event itrace_start; + struct context_switch_event context_switch; + struct thread_map_event thread_map; + struct cpu_map_event cpu_map; + struct stat_config_event stat_config; + struct stat_event stat; + struct stat_round_event stat_round; + struct time_conv_event time_conv; + struct feature_event feat; + struct compressed_event pack; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index ee2ee23e4c46..e15eed53ce90 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,42 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -union perf_event { - struct perf_event_header header; - struct perf_record_mmap mmap; - struct perf_record_mmap2 mmap2; - struct perf_record_comm comm; - struct perf_record_namespaces namespaces; - struct perf_record_fork fork; - struct perf_record_lost lost; - struct perf_record_lost_samples lost_samples; - struct perf_record_read read; - struct perf_record_throttle throttle; - struct perf_record_sample sample; - struct perf_record_bpf_event bpf; - struct perf_record_ksymbol ksymbol; - struct attr_event attr; - struct event_update_event event_update; - struct event_type_event event_type; - struct tracing_data_event tracing_data; - struct build_id_event build_id; - struct id_index_event id_index; - struct auxtrace_info_event auxtrace_info; - struct auxtrace_event auxtrace; - struct auxtrace_error_event auxtrace_error; - struct aux_event aux; - struct itrace_start_event itrace_start; - struct context_switch_event context_switch; - struct thread_map_event thread_map; - struct cpu_map_event cpu_map; - struct stat_config_event stat_config; - struct stat_event stat; - struct stat_round_event stat_round; - struct time_conv_event time_conv; - struct feature_event feat; - struct compressed_event pack; -}; - void perf_event__print_totals(void); struct perf_tool; -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Add 'union perf_event' to perf/event.h 2019-08-28 13:57 ` [PATCH 21/23] libperf: Add 'union perf_event' " Jiri Olsa @ 2019-08-29 19:02 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:02 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 7510410a38c71eb5d45217a4934e60eef88c04e1 Gitweb: https://git.kernel.org/tip/7510410a38c71eb5d45217a4934e60eef88c04e1 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:15 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:12 -03:00 libperf: Add 'union perf_event' to perf/event.h So it's available for libperf's users. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-22-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 36 ++++++++++++++++++++++++++++- tools/perf/util/event.h | 36 +---------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ef7a46e..a5b08ef 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -323,4 +323,40 @@ struct compressed_event { char data[]; }; +union perf_event { + struct perf_event_header header; + struct perf_record_mmap mmap; + struct perf_record_mmap2 mmap2; + struct perf_record_comm comm; + struct perf_record_namespaces namespaces; + struct perf_record_fork fork; + struct perf_record_lost lost; + struct perf_record_lost_samples lost_samples; + struct perf_record_read read; + struct perf_record_throttle throttle; + struct perf_record_sample sample; + struct perf_record_bpf_event bpf; + struct perf_record_ksymbol ksymbol; + struct attr_event attr; + struct event_update_event event_update; + struct event_type_event event_type; + struct tracing_data_event tracing_data; + struct build_id_event build_id; + struct id_index_event id_index; + struct auxtrace_info_event auxtrace_info; + struct auxtrace_event auxtrace; + struct auxtrace_error_event auxtrace_error; + struct aux_event aux; + struct itrace_start_event itrace_start; + struct context_switch_event context_switch; + struct thread_map_event thread_map; + struct cpu_map_event cpu_map; + struct stat_config_event stat_config; + struct stat_event stat; + struct stat_round_event stat_round; + struct time_conv_event time_conv; + struct feature_event feat; + struct compressed_event pack; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index ee2ee23..e15eed5 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,42 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -union perf_event { - struct perf_event_header header; - struct perf_record_mmap mmap; - struct perf_record_mmap2 mmap2; - struct perf_record_comm comm; - struct perf_record_namespaces namespaces; - struct perf_record_fork fork; - struct perf_record_lost lost; - struct perf_record_lost_samples lost_samples; - struct perf_record_read read; - struct perf_record_throttle throttle; - struct perf_record_sample sample; - struct perf_record_bpf_event bpf; - struct perf_record_ksymbol ksymbol; - struct attr_event attr; - struct event_update_event event_update; - struct event_type_event event_type; - struct tracing_data_event tracing_data; - struct build_id_event build_id; - struct id_index_event id_index; - struct auxtrace_info_event auxtrace_info; - struct auxtrace_event auxtrace; - struct auxtrace_error_event auxtrace_error; - struct aux_event aux; - struct itrace_start_event itrace_start; - struct context_switch_event context_switch; - struct thread_map_event thread_map; - struct cpu_map_event cpu_map; - struct stat_config_event stat_config; - struct stat_event stat; - struct stat_round_event stat_round; - struct time_conv_event time_conv; - struct feature_event feat; - struct compressed_event pack; -}; - void perf_event__print_totals(void); struct perf_tool; ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 22/23] libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (20 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 21/23] libperf: Add 'union perf_event' " Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 23/23] libperf: Move 'enum perf_user_event_type' to perf/event.h Jiri Olsa 2019-08-28 18:29 ` [PATCH 00/23] libperf: Add rest of events " Arnaldo Carvalho de Melo 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Even more, to have a "perf_record_" prefix, so that they match the PERF_RECORD_ enum they map to. Link: http://lkml.kernel.org/n/tip-rrypskxisy9mpmu96jtgpp0p@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/arch/arm/util/cs-etm.c | 4 +- tools/perf/arch/arm64/util/arm-spe.c | 2 +- tools/perf/arch/s390/util/auxtrace.c | 2 +- tools/perf/arch/x86/util/intel-bts.c | 2 +- tools/perf/arch/x86/util/intel-pt.c | 2 +- tools/perf/arch/x86/util/tsc.c | 2 +- tools/perf/builtin-record.c | 4 +- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-stat.c | 2 +- tools/perf/lib/include/perf/event.h | 136 +++++++++++++-------------- tools/perf/tests/cpumap.c | 12 +-- tools/perf/tests/event_update.c | 16 ++-- tools/perf/tests/stat.c | 8 +- tools/perf/tests/thread-map.c | 2 +- tools/perf/util/arm-spe.c | 4 +- tools/perf/util/auxtrace.c | 16 ++-- tools/perf/util/auxtrace.h | 8 +- tools/perf/util/build-id.c | 2 +- tools/perf/util/cpumap.c | 6 +- tools/perf/util/cpumap.h | 4 +- tools/perf/util/cs-etm.c | 2 +- tools/perf/util/event.c | 34 +++---- tools/perf/util/event.h | 4 +- tools/perf/util/header.c | 54 +++++------ tools/perf/util/intel-bts.c | 4 +- tools/perf/util/intel-pt.c | 8 +- tools/perf/util/python.c | 4 +- tools/perf/util/s390-cpumsf.c | 4 +- tools/perf/util/session.c | 20 ++-- tools/perf/util/session.h | 2 +- tools/perf/util/stat.c | 6 +- tools/perf/util/thread_map.c | 4 +- tools/perf/util/thread_map.h | 4 +- 33 files changed, 193 insertions(+), 193 deletions(-) diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c index a185dab2d903..a5a4632e1a78 100644 --- a/tools/perf/arch/arm/util/cs-etm.c +++ b/tools/perf/arch/arm/util/cs-etm.c @@ -564,7 +564,7 @@ static int cs_etm_get_ro(struct perf_pmu *pmu, int cpu, const char *path) static void cs_etm_get_metadata(int cpu, u32 *offset, struct auxtrace_record *itr, - struct auxtrace_info_event *info) + struct perf_record_auxtrace_info *info) { u32 increment; u64 magic; @@ -629,7 +629,7 @@ static void cs_etm_get_metadata(int cpu, u32 *offset, static int cs_etm_info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *info, + struct perf_record_auxtrace_info *info, size_t priv_size) { int i; diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index cdd5c0c84183..984da1f8151c 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -40,7 +40,7 @@ arm_spe_info_priv_size(struct auxtrace_record *itr __maybe_unused, static int arm_spe_info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size) { struct arm_spe_recording *sper = diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c index f32d7a72d039..b0fb70e38960 100644 --- a/tools/perf/arch/s390/util/auxtrace.c +++ b/tools/perf/arch/s390/util/auxtrace.c @@ -29,7 +29,7 @@ static size_t cpumsf_info_priv_size(struct auxtrace_record *itr __maybe_unused, static int cpumsf_info_fill(struct auxtrace_record *itr __maybe_unused, struct perf_session *session __maybe_unused, - struct auxtrace_info_event *auxtrace_info __maybe_unused, + struct perf_record_auxtrace_info *auxtrace_info __maybe_unused, size_t priv_size __maybe_unused) { auxtrace_info->type = PERF_AUXTRACE_S390_CPUMSF; diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/util/intel-bts.c index 1f2cf612bc9c..664377182ba8 100644 --- a/tools/perf/arch/x86/util/intel-bts.c +++ b/tools/perf/arch/x86/util/intel-bts.c @@ -58,7 +58,7 @@ intel_bts_info_priv_size(struct auxtrace_record *itr __maybe_unused, static int intel_bts_info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size) { struct intel_bts_recording *btsr = diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index d7125e331dda..ecf3068e980b 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -313,7 +313,7 @@ static void intel_pt_tsc_ctc_ratio(u32 *n, u32 *d) static int intel_pt_info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size) { struct intel_pt_recording *ptr = diff --git a/tools/perf/arch/x86/util/tsc.c b/tools/perf/arch/x86/util/tsc.c index b1eb963b4a6e..81720e27f8a3 100644 --- a/tools/perf/arch/x86/util/tsc.c +++ b/tools/perf/arch/x86/util/tsc.c @@ -57,7 +57,7 @@ int perf_event__synth_time_conv(const struct perf_event_mmap_page *pc, .time_conv = { .header = { .type = PERF_RECORD_TIME_CONV, - .size = sizeof(struct time_conv_event), + .size = sizeof(struct perf_record_time_conv), }, }, }; diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 359bb8f33e57..3c00be8cac71 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -898,7 +898,7 @@ static void record__adjust_affinity(struct record *rec, struct perf_mmap *map) static size_t process_comp_header(void *record, size_t increment) { - struct compressed_event *event = record; + struct perf_record_compressed *event = record; size_t size = sizeof(*event); if (increment) { @@ -916,7 +916,7 @@ static size_t zstd_compress(struct perf_session *session, void *dst, size_t dst_ void *src, size_t src_size) { size_t compressed; - size_t max_record_size = PERF_SAMPLE_MAX_SIZE - sizeof(struct compressed_event) - 1; + size_t max_record_size = PERF_SAMPLE_MAX_SIZE - sizeof(struct perf_record_compressed) - 1; compressed = zstd_compress_stream_to_records(&session->zstd_data, dst, dst_size, src, src_size, max_record_size, process_comp_header); diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 51e7e6d0eee6..948bd4e82248 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -3243,7 +3243,7 @@ static void script__setup_sample_type(struct perf_script *script) static int process_stat_round_event(struct perf_session *session, union perf_event *event) { - struct stat_round_event *round = &event->stat_round; + struct perf_record_stat_round *round = &event->stat_round; struct evsel *counter; evlist__for_each_entry(session->evlist, counter) { diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 6ab13f466827..a7e8c26635db 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1462,7 +1462,7 @@ static int __cmd_record(int argc, const char **argv) static int process_stat_round_event(struct perf_session *session, union perf_event *event) { - struct stat_round_event *stat_round = &event->stat_round; + struct perf_record_stat_round *stat_round = &event->stat_round; struct evsel *counter; struct timespec tsh, *ts = NULL; const char **argv = session->header.env.cmdline_argv; diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index a5b08ef118a7..1655c744ec2b 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -110,13 +110,13 @@ struct perf_record_sample { __u64 array[]; }; -struct context_switch_event { +struct perf_record_switch { struct perf_event_header header; __u32 next_prev_pid; __u32 next_prev_tid; }; -struct attr_event { +struct perf_record_header_attr { struct perf_event_header header; struct perf_event_attr attr; __u64 id[]; @@ -132,20 +132,20 @@ struct cpu_map_entries { __u16 cpu[]; }; -struct cpu_map_mask { +struct perf_record_record_cpu_map { __u16 nr; __u16 long_size; unsigned long mask[]; }; -struct cpu_map_data { +struct perf_record_cpu_map_data { __u16 type; char data[]; }; -struct cpu_map_event { - struct perf_event_header header; - struct cpu_map_data data; +struct perf_record_cpu_map { + struct perf_event_header header; + struct perf_record_cpu_map_data data; }; enum { @@ -155,15 +155,15 @@ enum { PERF_EVENT_UPDATE__CPUS = 3, }; -struct event_update_event_cpus { - struct cpu_map_data cpus; +struct perf_record_event_update_cpus { + struct perf_record_cpu_map_data cpus; }; -struct event_update_event_scale { +struct perf_record_event_update_scale { double scale; }; -struct event_update_event { +struct perf_record_event_update { struct perf_event_header header; __u64 type; __u64 id; @@ -177,17 +177,17 @@ struct perf_trace_event_type { char name[MAX_EVENT_NAME]; }; -struct event_type_event { +struct perf_record_header_event_type { struct perf_event_header header; struct perf_trace_event_type event_type; }; -struct tracing_data_event { +struct perf_record_header_tracing_data { struct perf_event_header header; __u32 size; }; -struct build_id_event { +struct perf_record_header_build_id { struct perf_event_header header; pid_t pid; __u8 build_id[24]; @@ -201,20 +201,20 @@ struct id_index_entry { __u64 tid; }; -struct id_index_event { +struct perf_record_id_index { struct perf_event_header header; __u64 nr; struct id_index_entry entries[0]; }; -struct auxtrace_info_event { +struct perf_record_auxtrace_info { struct perf_event_header header; __u32 type; __u32 reserved__; /* For alignment */ __u64 priv[]; }; -struct auxtrace_event { +struct perf_record_auxtrace { struct perf_event_header header; __u64 size; __u64 offset; @@ -227,7 +227,7 @@ struct auxtrace_event { #define MAX_AUXTRACE_ERROR_MSG 64 -struct auxtrace_error_event { +struct perf_record_auxtrace_error { struct perf_event_header header; __u32 type; __u32 code; @@ -240,28 +240,28 @@ struct auxtrace_error_event { char msg[MAX_AUXTRACE_ERROR_MSG]; }; -struct aux_event { +struct perf_record_aux { struct perf_event_header header; __u64 aux_offset; __u64 aux_size; __u64 flags; }; -struct itrace_start_event { +struct perf_record_itrace_start { struct perf_event_header header; __u32 pid; __u32 tid; }; -struct thread_map_event_entry { +struct perf_record_thread_map_entry { __u64 pid; char comm[16]; }; -struct thread_map_event { - struct perf_event_header header; - __u64 nr; - struct thread_map_event_entry entries[]; +struct perf_record_thread_map { + struct perf_event_header header; + __u64 nr; + struct perf_record_thread_map_entry entries[]; }; enum { @@ -271,18 +271,18 @@ enum { PERF_STAT_CONFIG_TERM__MAX = 3, }; -struct stat_config_event_entry { +struct perf_record_stat_config_entry { __u64 tag; __u64 val; }; -struct stat_config_event { - struct perf_event_header header; - __u64 nr; - struct stat_config_event_entry data[]; +struct perf_record_stat_config { + struct perf_event_header header; + __u64 nr; + struct perf_record_stat_config_entry data[]; }; -struct stat_event { +struct perf_record_stat { struct perf_event_header header; __u64 id; @@ -299,64 +299,64 @@ struct stat_event { }; }; -struct stat_round_event { +struct perf_record_stat_round { struct perf_event_header header; __u64 type; __u64 time; }; -struct time_conv_event { +struct perf_record_time_conv { struct perf_event_header header; __u64 time_shift; __u64 time_mult; __u64 time_zero; }; -struct feature_event { +struct perf_record_header_feature { struct perf_event_header header; __u64 feat_id; char data[]; }; -struct compressed_event { +struct perf_record_compressed { struct perf_event_header header; char data[]; }; union perf_event { - struct perf_event_header header; - struct perf_record_mmap mmap; - struct perf_record_mmap2 mmap2; - struct perf_record_comm comm; - struct perf_record_namespaces namespaces; - struct perf_record_fork fork; - struct perf_record_lost lost; - struct perf_record_lost_samples lost_samples; - struct perf_record_read read; - struct perf_record_throttle throttle; - struct perf_record_sample sample; - struct perf_record_bpf_event bpf; - struct perf_record_ksymbol ksymbol; - struct attr_event attr; - struct event_update_event event_update; - struct event_type_event event_type; - struct tracing_data_event tracing_data; - struct build_id_event build_id; - struct id_index_event id_index; - struct auxtrace_info_event auxtrace_info; - struct auxtrace_event auxtrace; - struct auxtrace_error_event auxtrace_error; - struct aux_event aux; - struct itrace_start_event itrace_start; - struct context_switch_event context_switch; - struct thread_map_event thread_map; - struct cpu_map_event cpu_map; - struct stat_config_event stat_config; - struct stat_event stat; - struct stat_round_event stat_round; - struct time_conv_event time_conv; - struct feature_event feat; - struct compressed_event pack; + struct perf_event_header header; + struct perf_record_mmap mmap; + struct perf_record_mmap2 mmap2; + struct perf_record_comm comm; + struct perf_record_namespaces namespaces; + struct perf_record_fork fork; + struct perf_record_lost lost; + struct perf_record_lost_samples lost_samples; + struct perf_record_read read; + struct perf_record_throttle throttle; + struct perf_record_sample sample; + struct perf_record_bpf_event bpf; + struct perf_record_ksymbol ksymbol; + struct perf_record_header_attr attr; + struct perf_record_event_update event_update; + struct perf_record_header_event_type event_type; + struct perf_record_header_tracing_data tracing_data; + struct perf_record_header_build_id build_id; + struct perf_record_id_index id_index; + struct perf_record_auxtrace_info auxtrace_info; + struct perf_record_auxtrace auxtrace; + struct perf_record_auxtrace_error auxtrace_error; + struct perf_record_aux aux; + struct perf_record_itrace_start itrace_start; + struct perf_record_switch context_switch; + struct perf_record_thread_map thread_map; + struct perf_record_cpu_map cpu_map; + struct perf_record_stat_config stat_config; + struct perf_record_stat stat; + struct perf_record_stat_round stat_round; + struct perf_record_time_conv time_conv; + struct perf_record_header_feature feat; + struct perf_record_compressed pack; }; #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/tests/cpumap.c b/tools/perf/tests/cpumap.c index b71fe09a8087..39493de50117 100644 --- a/tools/perf/tests/cpumap.c +++ b/tools/perf/tests/cpumap.c @@ -15,9 +15,9 @@ static int process_event_mask(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct cpu_map_event *map_event = &event->cpu_map; - struct cpu_map_mask *mask; - struct cpu_map_data *data; + struct perf_record_cpu_map *map_event = &event->cpu_map; + struct perf_record_record_cpu_map *mask; + struct perf_record_cpu_map_data *data; struct perf_cpu_map *map; int i; @@ -25,7 +25,7 @@ static int process_event_mask(struct perf_tool *tool __maybe_unused, TEST_ASSERT_VAL("wrong type", data->type == PERF_CPU_MAP__MASK); - mask = (struct cpu_map_mask *)data->data; + mask = (struct perf_record_record_cpu_map *)data->data; TEST_ASSERT_VAL("wrong nr", mask->nr == 1); @@ -49,9 +49,9 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct cpu_map_event *map_event = &event->cpu_map; + struct perf_record_cpu_map *map_event = &event->cpu_map; struct cpu_map_entries *cpus; - struct cpu_map_data *data; + struct perf_record_cpu_map_data *data; struct perf_cpu_map *map; data = &map_event->data; diff --git a/tools/perf/tests/event_update.c b/tools/perf/tests/event_update.c index c37ff49c07c7..fc04c0f7145b 100644 --- a/tools/perf/tests/event_update.c +++ b/tools/perf/tests/event_update.c @@ -12,7 +12,7 @@ static int process_event_unit(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct event_update_event *ev = (struct event_update_event *) event; + struct perf_record_event_update *ev = (struct perf_record_event_update *) event; TEST_ASSERT_VAL("wrong id", ev->id == 123); TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__UNIT); @@ -25,10 +25,10 @@ static int process_event_scale(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct event_update_event *ev = (struct event_update_event *) event; - struct event_update_event_scale *ev_data; + struct perf_record_event_update *ev = (struct perf_record_event_update *) event; + struct perf_record_event_update_scale *ev_data; - ev_data = (struct event_update_event_scale *) ev->data; + ev_data = (struct perf_record_event_update_scale *) ev->data; TEST_ASSERT_VAL("wrong id", ev->id == 123); TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__SCALE); @@ -47,7 +47,7 @@ static int process_event_name(struct perf_tool *tool, struct machine *machine __maybe_unused) { struct event_name *tmp = container_of(tool, struct event_name, tool); - struct event_update_event *ev = (struct event_update_event*) event; + struct perf_record_event_update *ev = (struct perf_record_event_update *) event; TEST_ASSERT_VAL("wrong id", ev->id == 123); TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__NAME); @@ -60,11 +60,11 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct event_update_event *ev = (struct event_update_event*) event; - struct event_update_event_cpus *ev_data; + struct perf_record_event_update *ev = (struct perf_record_event_update *) event; + struct perf_record_event_update_cpus *ev_data; struct perf_cpu_map *map; - ev_data = (struct event_update_event_cpus*) ev->data; + ev_data = (struct perf_record_event_update_cpus *) ev->data; map = cpu_map__new_data(&ev_data->cpus); diff --git a/tools/perf/tests/stat.c b/tools/perf/tests/stat.c index 94250024684a..cc10b4116c9f 100644 --- a/tools/perf/tests/stat.c +++ b/tools/perf/tests/stat.c @@ -6,7 +6,7 @@ #include "counts.h" #include "debug.h" -static bool has_term(struct stat_config_event *config, +static bool has_term(struct perf_record_stat_config *config, u64 tag, u64 val) { unsigned i; @@ -25,7 +25,7 @@ static int process_stat_config_event(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct stat_config_event *config = &event->stat_config; + struct perf_record_stat_config *config = &event->stat_config; struct perf_stat_config stat_config; #define HAS(term, val) \ @@ -65,7 +65,7 @@ static int process_stat_event(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct stat_event *st = &event->stat; + struct perf_record_stat *st = &event->stat; TEST_ASSERT_VAL("wrong cpu", st->cpu == 1); TEST_ASSERT_VAL("wrong thread", st->thread == 2); @@ -95,7 +95,7 @@ static int process_stat_round_event(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct stat_round_event *stat_round = &event->stat_round; + struct perf_record_stat_round *stat_round = &event->stat_round; TEST_ASSERT_VAL("wrong time", stat_round->time == 0xdeadbeef); TEST_ASSERT_VAL("wrong type", stat_round->type == PERF_STAT_ROUND_TYPE__INTERVAL); diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c index d803eafedc60..c19ec8849e77 100644 --- a/tools/perf/tests/thread-map.c +++ b/tools/perf/tests/thread-map.c @@ -56,7 +56,7 @@ static int process_event(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct thread_map_event *map = &event->thread_map; + struct perf_record_thread_map *map = &event->thread_map; struct perf_thread_map *threads; TEST_ASSERT_VAL("wrong nr", map->nr == 1); diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index cd26315bc9aa..d7c3fbb3694f 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -192,12 +192,12 @@ static void arm_spe_print_info(__u64 *arr) int arm_spe_process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; size_t min_sz = sizeof(u64) * ARM_SPE_PMU_TYPE; struct arm_spe *spe; int err; - if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) + + if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info) + min_sz) return -EINVAL; diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index cddf04c45a20..c1bf86911e71 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -385,7 +385,7 @@ static int auxtrace_queues__add_indexed_event(struct auxtrace_queues *queues, return err; if (event->header.type == PERF_RECORD_AUXTRACE) { - if (event->header.size < sizeof(struct auxtrace_event) || + if (event->header.size < sizeof(struct perf_record_auxtrace) || event->header.size != sz) { err = -EINVAL; goto out; @@ -518,7 +518,7 @@ static int auxtrace_not_supported(void) int auxtrace_record__info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size) { if (itr) @@ -858,13 +858,13 @@ void auxtrace_buffer__free(struct auxtrace_buffer *buffer) free(buffer); } -void auxtrace_synth_error(struct auxtrace_error_event *auxtrace_error, int type, +void auxtrace_synth_error(struct perf_record_auxtrace_error *auxtrace_error, int type, int code, int cpu, pid_t pid, pid_t tid, u64 ip, const char *msg, u64 timestamp) { size_t size; - memset(auxtrace_error, 0, sizeof(struct auxtrace_error_event)); + memset(auxtrace_error, 0, sizeof(struct perf_record_auxtrace_error)); auxtrace_error->header.type = PERF_RECORD_AUXTRACE_ERROR; auxtrace_error->type = type; @@ -893,12 +893,12 @@ int perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr, pr_debug2("Synthesizing auxtrace information\n"); priv_size = auxtrace_record__info_priv_size(itr, session->evlist); - ev = zalloc(sizeof(struct auxtrace_info_event) + priv_size); + ev = zalloc(sizeof(struct perf_record_auxtrace_info) + priv_size); if (!ev) return -ENOMEM; ev->auxtrace_info.header.type = PERF_RECORD_AUXTRACE_INFO; - ev->auxtrace_info.header.size = sizeof(struct auxtrace_info_event) + + ev->auxtrace_info.header.size = sizeof(struct perf_record_auxtrace_info) + priv_size; err = auxtrace_record__info_fill(itr, session, &ev->auxtrace_info, priv_size); @@ -1168,7 +1168,7 @@ static const char *auxtrace_error_name(int type) size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp) { - struct auxtrace_error_event *e = &event->auxtrace_error; + struct perf_record_auxtrace_error *e = &event->auxtrace_error; unsigned long long nsecs = e->time; const char *msg = e->msg; int ret; @@ -1196,7 +1196,7 @@ size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp) void perf_session__auxtrace_error_inc(struct perf_session *session, union perf_event *event) { - struct auxtrace_error_event *e = &event->auxtrace_error; + struct perf_record_auxtrace_error *e = &event->auxtrace_error; if (e->type < PERF_AUXTRACE_ERROR_MAX) session->evlist->stats.nr_auxtrace_errors[e->type] += 1; diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 8e637ac3918e..b213e6431d88 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -28,7 +28,7 @@ struct perf_tool; struct perf_mmap; struct option; struct record_opts; -struct auxtrace_info_event; +struct perf_record_auxtrace_info; struct events_stats; /* Auxtrace records must have the same alignment as perf event records */ @@ -318,7 +318,7 @@ struct auxtrace_record { struct evlist *evlist); int (*info_fill)(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size); void (*free)(struct auxtrace_record *itr); int (*snapshot_start)(struct auxtrace_record *itr); @@ -498,7 +498,7 @@ size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr, struct evlist *evlist); int auxtrace_record__info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size); void auxtrace_record__free(struct auxtrace_record *itr); int auxtrace_record__snapshot_start(struct auxtrace_record *itr); @@ -515,7 +515,7 @@ int auxtrace_index__process(int fd, u64 size, struct perf_session *session, bool needs_swap); void auxtrace_index__free(struct list_head *head); -void auxtrace_synth_error(struct auxtrace_error_event *auxtrace_error, int type, +void auxtrace_synth_error(struct perf_record_auxtrace_error *auxtrace_error, int type, int code, int cpu, pid_t pid, pid_t tid, u64 ip, const char *msg, u64 timestamp); diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index b98754863de9..4c96a33b09ff 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c @@ -295,7 +295,7 @@ static int write_buildid(const char *name, size_t name_len, u8 *build_id, pid_t pid, u16 misc, struct feat_fd *fd) { int err; - struct build_id_event b; + struct perf_record_header_build_id b; size_t len; len = name_len + 1; diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index f5c21184e1fc..b9301e7e9c76 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -43,7 +43,7 @@ static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus) return map; } -static struct perf_cpu_map *cpu_map__from_mask(struct cpu_map_mask *mask) +static struct perf_cpu_map *cpu_map__from_mask(struct perf_record_record_cpu_map *mask) { struct perf_cpu_map *map; int nr, nbits = mask->nr * mask->long_size * BITS_PER_BYTE; @@ -61,12 +61,12 @@ static struct perf_cpu_map *cpu_map__from_mask(struct cpu_map_mask *mask) } -struct perf_cpu_map *cpu_map__new_data(struct cpu_map_data *data) +struct perf_cpu_map *cpu_map__new_data(struct perf_record_cpu_map_data *data) { if (data->type == PERF_CPU_MAP__CPUS) return cpu_map__from_entries((struct cpu_map_entries *)data->data); else - return cpu_map__from_mask((struct cpu_map_mask *)data->data); + return cpu_map__from_mask((struct perf_record_record_cpu_map *)data->data); } size_t cpu_map__fprintf(struct perf_cpu_map *map, FILE *fp) diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index c2519e7ea958..2553bef1279d 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -7,10 +7,10 @@ #include <internal/cpumap.h> #include <perf/cpumap.h> -struct cpu_map_data; +struct perf_record_cpu_map_data; struct perf_cpu_map *perf_cpu_map__empty_new(int nr); -struct perf_cpu_map *cpu_map__new_data(struct cpu_map_data *data); +struct perf_cpu_map *cpu_map__new_data(struct perf_record_cpu_map_data *data); size_t cpu_map__snprint(struct perf_cpu_map *map, char *buf, size_t size); size_t cpu_map__snprint_mask(struct perf_cpu_map *map, char *buf, size_t size); size_t cpu_map__fprintf(struct perf_cpu_map *map, FILE *fp); diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index b3a5daaf1a8f..c84da56f5f7d 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -2393,7 +2393,7 @@ static void cs_etm__print_auxtrace_info(u64 *val, int num) int cs_etm__process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; struct cs_etm_auxtrace *etm = NULL; struct int_node *inode; unsigned int pmu_type; diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 2369333d61d8..742fba062746 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -991,7 +991,7 @@ int perf_event__synthesize_thread_map2(struct perf_tool *tool, event->thread_map.nr = threads->nr; for (i = 0; i < threads->nr; i++) { - struct thread_map_event_entry *entry = &event->thread_map.entries[i]; + struct perf_record_thread_map_entry *entry = &event->thread_map.entries[i]; char *comm = perf_thread_map__comm(threads, i); if (!comm) @@ -1018,7 +1018,7 @@ static void synthesize_cpus(struct cpu_map_entries *cpus, cpus->cpu[i] = map->map[i]; } -static void synthesize_mask(struct cpu_map_mask *mask, +static void synthesize_mask(struct perf_record_record_cpu_map *mask, struct perf_cpu_map *map, int max) { int i; @@ -1049,7 +1049,7 @@ static size_t mask_size(struct perf_cpu_map *map, int *max) *max = bit; } - return sizeof(struct cpu_map_mask) + BITS_TO_LONGS(*max) * sizeof(long); + return sizeof(struct perf_record_record_cpu_map) + BITS_TO_LONGS(*max) * sizeof(long); } void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *max) @@ -1060,15 +1060,15 @@ void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int /* * Both array and mask data have variable size based * on the number of cpus and their actual values. - * The size of the 'struct cpu_map_data' is: + * The size of the 'struct perf_record_cpu_map_data' is: * * array = size of 'struct cpu_map_entries' + * number of cpus * sizeof(u64) * - * mask = size of 'struct cpu_map_mask' + + * mask = size of 'struct perf_record_record_cpu_map' + * maximum cpu bit converted to size of longs * - * and finaly + the size of 'struct cpu_map_data'. + * and finaly + the size of 'struct perf_record_cpu_map_data'. */ size_cpus = cpus_size(map); size_mask = mask_size(map, max); @@ -1081,12 +1081,12 @@ void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *type = PERF_CPU_MAP__MASK; } - *size += sizeof(struct cpu_map_data); + *size += sizeof(struct perf_record_cpu_map_data); *size = PERF_ALIGN(*size, sizeof(u64)); return zalloc(*size); } -void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *map, +void cpu_map_data__synthesize(struct perf_record_cpu_map_data *data, struct perf_cpu_map *map, u16 type, int max) { data->type = type; @@ -1096,16 +1096,16 @@ void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *ma synthesize_cpus((struct cpu_map_entries *) data->data, map); break; case PERF_CPU_MAP__MASK: - synthesize_mask((struct cpu_map_mask *) data->data, map, max); + synthesize_mask((struct perf_record_record_cpu_map *) data->data, map, max); default: break; }; } -static struct cpu_map_event* cpu_map_event__new(struct perf_cpu_map *map) +static struct perf_record_cpu_map *cpu_map_event__new(struct perf_cpu_map *map) { - size_t size = sizeof(struct cpu_map_event); - struct cpu_map_event *event; + size_t size = sizeof(struct perf_record_cpu_map); + struct perf_record_cpu_map *event; int max; u16 type; @@ -1126,7 +1126,7 @@ int perf_event__synthesize_cpu_map(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine) { - struct cpu_map_event *event; + struct perf_record_cpu_map *event; int err; event = cpu_map_event__new(map); @@ -1144,7 +1144,7 @@ int perf_event__synthesize_stat_config(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine) { - struct stat_config_event *event; + struct perf_record_stat_config *event; int size, i = 0, err; size = sizeof(*event); @@ -1183,7 +1183,7 @@ int perf_event__synthesize_stat(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine) { - struct stat_event event; + struct perf_record_stat event; event.header.type = PERF_RECORD_STAT; event.header.size = sizeof(event); @@ -1204,7 +1204,7 @@ int perf_event__synthesize_stat_round(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine) { - struct stat_round_event event; + struct perf_record_stat_round event; event.header.type = PERF_RECORD_STAT_ROUND; event.header.size = sizeof(event); @@ -1217,7 +1217,7 @@ int perf_event__synthesize_stat_round(struct perf_tool *tool, } void perf_event__read_stat_config(struct perf_stat_config *config, - struct stat_config_event *event) + struct perf_record_stat_config *event) { unsigned i; diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index e15eed53ce90..a7341e14eb48 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -374,7 +374,7 @@ int perf_event__synthesize_stat_config(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine); void perf_event__read_stat_config(struct perf_stat_config *config, - struct stat_config_event *event); + struct perf_record_stat_config *event); int perf_event__synthesize_stat(struct perf_tool *tool, u32 cpu, u32 thread, u64 id, struct perf_counts_values *count, @@ -511,7 +511,7 @@ int kallsyms__get_function_start(const char *kallsyms_filename, const char *symbol_name, u64 *addr); void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *max); -void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *map, +void cpu_map_data__synthesize(struct perf_record_cpu_map_data *data, struct perf_cpu_map *map, u16 type, int max); void event_attr_init(struct perf_event_attr *attr); diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index cc4998fcf4ee..990f23ad46f3 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1877,7 +1877,7 @@ static void print_mem_topology(struct feat_fd *ff, FILE *fp) } } -static int __event_process_build_id(struct build_id_event *bev, +static int __event_process_build_id(struct perf_record_header_build_id *bev, char *filename, struct perf_session *session) { @@ -1946,7 +1946,7 @@ static int perf_header__read_build_ids_abi_quirk(struct perf_header *header, u8 build_id[PERF_ALIGN(BUILD_ID_SIZE, sizeof(u64))]; char filename[0]; } old_bev; - struct build_id_event bev; + struct perf_record_header_build_id bev; char filename[PATH_MAX]; u64 limit = offset + size; @@ -1987,7 +1987,7 @@ static int perf_header__read_build_ids(struct perf_header *header, int input, u64 offset, u64 size) { struct perf_session *session = container_of(header, struct perf_session, header); - struct build_id_event bev; + struct perf_record_header_build_id bev; char filename[PATH_MAX]; u64 limit = offset + size, orig_offset = offset; int err = -1; @@ -2009,7 +2009,7 @@ static int perf_header__read_build_ids(struct perf_header *header, * * "perf: 'perf kvm' tool for monitoring guest performance from host" * - * Added a field to struct build_id_event that broke the file + * Added a field to struct perf_record_header_build_id that broke the file * format. * * Since the kernel build-id is the first entry, process the @@ -3677,7 +3677,7 @@ int perf_event__synthesize_features(struct perf_tool *tool, { struct perf_header *header = &session->header; struct feat_fd ff; - struct feature_event *fe; + struct perf_record_header_feature *fe; size_t sz, sz_hdr; int feat, ret; @@ -3740,7 +3740,7 @@ int perf_event__process_feature(struct perf_session *session, { struct perf_tool *tool = session->tool; struct feat_fd ff = { .fd = 0 }; - struct feature_event *fe = (struct feature_event *)event; + struct perf_record_header_feature *fe = (struct perf_record_header_feature *)event; int type = fe->header.type; u64 feat = fe->feat_id; @@ -3777,10 +3777,10 @@ int perf_event__process_feature(struct perf_session *session, return 0; } -static struct event_update_event * +static struct perf_record_event_update * event_update_event__new(size_t size, u64 type, u64 id) { - struct event_update_event *ev; + struct perf_record_event_update *ev; size += sizeof(*ev); size = PERF_ALIGN(size, sizeof(u64)); @@ -3800,7 +3800,7 @@ perf_event__synthesize_event_update_unit(struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process) { - struct event_update_event *ev; + struct perf_record_event_update *ev; size_t size = strlen(evsel->unit); int err; @@ -3819,15 +3819,15 @@ perf_event__synthesize_event_update_scale(struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process) { - struct event_update_event *ev; - struct event_update_event_scale *ev_data; + struct perf_record_event_update *ev; + struct perf_record_event_update_scale *ev_data; int err; ev = event_update_event__new(sizeof(*ev_data), PERF_EVENT_UPDATE__SCALE, evsel->id[0]); if (ev == NULL) return -ENOMEM; - ev_data = (struct event_update_event_scale *) ev->data; + ev_data = (struct perf_record_event_update_scale *) ev->data; ev_data->scale = evsel->scale; err = process(tool, (union perf_event*) ev, NULL, NULL); free(ev); @@ -3839,7 +3839,7 @@ perf_event__synthesize_event_update_name(struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process) { - struct event_update_event *ev; + struct perf_record_event_update *ev; size_t len = strlen(evsel->name); int err; @@ -3858,8 +3858,8 @@ perf_event__synthesize_event_update_cpus(struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process) { - size_t size = sizeof(struct event_update_event); - struct event_update_event *ev; + size_t size = sizeof(struct perf_record_event_update); + struct perf_record_event_update *ev; int max, err; u16 type; @@ -3875,7 +3875,7 @@ perf_event__synthesize_event_update_cpus(struct perf_tool *tool, ev->type = PERF_EVENT_UPDATE__CPUS; ev->id = evsel->id[0]; - cpu_map_data__synthesize((struct cpu_map_data *) ev->data, + cpu_map_data__synthesize((struct perf_record_cpu_map_data *) ev->data, evsel->core.own_cpus, type, max); @@ -3886,9 +3886,9 @@ perf_event__synthesize_event_update_cpus(struct perf_tool *tool, size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) { - struct event_update_event *ev = &event->event_update; - struct event_update_event_scale *ev_scale; - struct event_update_event_cpus *ev_cpus; + struct perf_record_event_update *ev = &event->event_update; + struct perf_record_event_update_scale *ev_scale; + struct perf_record_event_update_cpus *ev_cpus; struct perf_cpu_map *map; size_t ret; @@ -3896,7 +3896,7 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) switch (ev->type) { case PERF_EVENT_UPDATE__SCALE: - ev_scale = (struct event_update_event_scale *) ev->data; + ev_scale = (struct perf_record_event_update_scale *) ev->data; ret += fprintf(fp, "... scale: %f\n", ev_scale->scale); break; case PERF_EVENT_UPDATE__UNIT: @@ -3906,7 +3906,7 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) ret += fprintf(fp, "... name: %s\n", ev->data); break; case PERF_EVENT_UPDATE__CPUS: - ev_cpus = (struct event_update_event_cpus *) ev->data; + ev_cpus = (struct perf_record_event_update_cpus *) ev->data; ret += fprintf(fp, "... "); map = cpu_map__new_data(&ev_cpus->cpus); @@ -4052,9 +4052,9 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused, union perf_event *event, struct evlist **pevlist) { - struct event_update_event *ev = &event->event_update; - struct event_update_event_scale *ev_scale; - struct event_update_event_cpus *ev_cpus; + struct perf_record_event_update *ev = &event->event_update; + struct perf_record_event_update_scale *ev_scale; + struct perf_record_event_update_cpus *ev_cpus; struct evlist *evlist; struct evsel *evsel; struct perf_cpu_map *map; @@ -4076,11 +4076,11 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused, evsel->name = strdup(ev->data); break; case PERF_EVENT_UPDATE__SCALE: - ev_scale = (struct event_update_event_scale *) ev->data; + ev_scale = (struct perf_record_event_update_scale *) ev->data; evsel->scale = ev_scale->scale; break; case PERF_EVENT_UPDATE__CPUS: - ev_cpus = (struct event_update_event_cpus *) ev->data; + ev_cpus = (struct perf_record_event_update_cpus *) ev->data; map = cpu_map__new_data(&ev_cpus->cpus); if (map) @@ -4152,7 +4152,7 @@ int perf_event__process_tracing_data(struct perf_session *session, char buf[BUFSIZ]; /* setup for reading amidst mmap */ - lseek(fd, offset + sizeof(struct tracing_data_event), + lseek(fd, offset + sizeof(struct perf_record_header_tracing_data), SEEK_SET); size_read = trace_report(fd, &session->tevent, diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c index 03c581a0d5d0..99dddb63dac1 100644 --- a/tools/perf/util/intel-bts.c +++ b/tools/perf/util/intel-bts.c @@ -848,12 +848,12 @@ static void intel_bts_print_info(__u64 *arr, int start, int finish) int intel_bts_process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; size_t min_sz = sizeof(u64) * INTEL_BTS_SNAPSHOT_MODE; struct intel_bts *bts; int err; - if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) + + if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info) + min_sz) return -EINVAL; diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index c83a9a718c03..825a6a3b03a1 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -3063,23 +3063,23 @@ static void intel_pt_print_info_str(const char *name, const char *str) fprintf(stdout, " %-20s%s\n", name, str ? str : ""); } -static bool intel_pt_has(struct auxtrace_info_event *auxtrace_info, int pos) +static bool intel_pt_has(struct perf_record_auxtrace_info *auxtrace_info, int pos) { return auxtrace_info->header.size >= - sizeof(struct auxtrace_info_event) + (sizeof(u64) * (pos + 1)); + sizeof(struct perf_record_auxtrace_info) + (sizeof(u64) * (pos + 1)); } int intel_pt_process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; size_t min_sz = sizeof(u64) * INTEL_PT_PER_CPU_MMAPS; struct intel_pt *pt; void *info_end; __u64 *info; int err; - if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) + + if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info) + min_sz) return -EINVAL; diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 59974e901232..11479a7ad1c7 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -431,8 +431,8 @@ static char pyrf_context_switch_event__doc[] = PyDoc_STR("perf context_switch ev static PyMemberDef pyrf_context_switch_event__members[] = { sample_members member_def(perf_event_header, type, T_UINT, "event type"), - member_def(context_switch_event, next_prev_pid, T_UINT, "next/prev pid"), - member_def(context_switch_event, next_prev_tid, T_UINT, "next/prev tid"), + member_def(perf_record_switch, next_prev_pid, T_UINT, "next/prev pid"), + member_def(perf_record_switch, next_prev_tid, T_UINT, "next/prev tid"), { .name = NULL, }, }; diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c index d078ae8353c8..4f6c1465998f 100644 --- a/tools/perf/util/s390-cpumsf.c +++ b/tools/perf/util/s390-cpumsf.c @@ -1109,11 +1109,11 @@ static int s390_cpumsf__config(const char *var, const char *value, void *cb) int s390_cpumsf_process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; struct s390_cpumsf *sf; int err; - if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event)) + if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info)) return -EINVAL; sf = zalloc(sizeof(struct s390_cpumsf)); diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index daa8aed27eae..cb584a87dc6e 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -63,8 +63,8 @@ static int perf_session__process_compressed_event(struct perf_session *session, decomp->size = decomp_last_rem; } - src = (void *)event + sizeof(struct compressed_event); - src_size = event->pack.header.size - sizeof(struct compressed_event); + src = (void *)event + sizeof(struct perf_record_compressed); + src_size = event->pack.header.size - sizeof(struct perf_record_compressed); decomp_size = zstd_decompress_stream(&(session->zstd_data), src, src_size, &(decomp->data[decomp_last_rem]), decomp_len - decomp_last_rem); @@ -835,9 +835,9 @@ static void perf_event__thread_map_swap(union perf_event *event, static void perf_event__cpu_map_swap(union perf_event *event, bool sample_id_all __maybe_unused) { - struct cpu_map_data *data = &event->cpu_map.data; + struct perf_record_cpu_map_data *data = &event->cpu_map.data; struct cpu_map_entries *cpus; - struct cpu_map_mask *mask; + struct perf_record_record_cpu_map *mask; unsigned i; data->type = bswap_64(data->type); @@ -852,7 +852,7 @@ static void perf_event__cpu_map_swap(union perf_event *event, cpus->cpu[i] = bswap_16(cpus->cpu[i]); break; case PERF_CPU_MAP__MASK: - mask = (struct cpu_map_mask *) data->data; + mask = (struct perf_record_record_cpu_map *) data->data; mask->nr = bswap_16(mask->nr); mask->long_size = bswap_16(mask->long_size); @@ -2375,10 +2375,10 @@ int perf_event__process_id_index(struct perf_session *session, union perf_event *event) { struct evlist *evlist = session->evlist; - struct id_index_event *ie = &event->id_index; + struct perf_record_id_index *ie = &event->id_index; size_t i, nr, max_nr; - max_nr = (ie->header.size - sizeof(struct id_index_event)) / + max_nr = (ie->header.size - sizeof(struct perf_record_id_index)) / sizeof(struct id_index_entry); nr = ie->nr; if (nr > max_nr) @@ -2420,14 +2420,14 @@ int perf_event__synthesize_id_index(struct perf_tool *tool, pr_debug2("Synthesizing id index\n"); - max_nr = (UINT16_MAX - sizeof(struct id_index_event)) / + max_nr = (UINT16_MAX - sizeof(struct perf_record_id_index)) / sizeof(struct id_index_entry); evlist__for_each_entry(evlist, evsel) nr += evsel->ids; n = nr > max_nr ? max_nr : nr; - sz = sizeof(struct id_index_event) + n * sizeof(struct id_index_entry); + sz = sizeof(struct perf_record_id_index) + n * sizeof(struct id_index_entry); ev = zalloc(sz); if (!ev) return -ENOMEM; @@ -2467,7 +2467,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool, } } - sz = sizeof(struct id_index_event) + nr * sizeof(struct id_index_entry); + sz = sizeof(struct perf_record_id_index) + nr * sizeof(struct id_index_entry); ev->id_index.header.size = sz; ev->id_index.nr = nr; diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 79e97d17ea04..b7aa076ab6fd 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -28,7 +28,7 @@ struct perf_session { struct itrace_synth_opts *itrace_synth_opts; struct list_head auxtrace_index; struct trace_event tevent; - struct time_conv_event time_conv; + struct perf_record_time_conv time_conv; bool repipe; bool one_mmap; void *one_mmap_addr; diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 4c7957496e7c..018c6d3ee01b 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -382,7 +382,7 @@ int perf_event__process_stat_event(struct perf_session *session, union perf_event *event) { struct perf_counts_values count; - struct stat_event *st = &event->stat; + struct perf_record_stat *st = &event->stat; struct evsel *counter; count.val = st->val; @@ -402,7 +402,7 @@ int perf_event__process_stat_event(struct perf_session *session, size_t perf_event__fprintf_stat(union perf_event *event, FILE *fp) { - struct stat_event *st = (struct stat_event *) event; + struct perf_record_stat *st = (struct perf_record_stat *) event; size_t ret; ret = fprintf(fp, "\n... id %" PRI_lu64 ", cpu %d, thread %d\n", @@ -415,7 +415,7 @@ size_t perf_event__fprintf_stat(union perf_event *event, FILE *fp) size_t perf_event__fprintf_stat_round(union perf_event *event, FILE *fp) { - struct stat_round_event *rd = (struct stat_round_event *)event; + struct perf_record_stat_round *rd = (struct perf_record_stat_round *)event; size_t ret; ret = fprintf(fp, "\n... time %" PRI_lu64 ", type %s\n", rd->time, diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c index 3e64525bf604..c9bfe4696943 100644 --- a/tools/perf/util/thread_map.c +++ b/tools/perf/util/thread_map.c @@ -369,7 +369,7 @@ void thread_map__read_comms(struct perf_thread_map *threads) } static void thread_map__copy_event(struct perf_thread_map *threads, - struct thread_map_event *event) + struct perf_record_thread_map *event) { unsigned i; @@ -383,7 +383,7 @@ static void thread_map__copy_event(struct perf_thread_map *threads, refcount_set(&threads->refcnt, 1); } -struct perf_thread_map *thread_map__new_event(struct thread_map_event *event) +struct perf_thread_map *thread_map__new_event(struct perf_record_thread_map *event) { struct perf_thread_map *threads; diff --git a/tools/perf/util/thread_map.h b/tools/perf/util/thread_map.h index ca165fdf6cb0..3bb860a32b8e 100644 --- a/tools/perf/util/thread_map.h +++ b/tools/perf/util/thread_map.h @@ -8,7 +8,7 @@ #include <internal/threadmap.h> #include <perf/threadmap.h> -struct thread_map_event; +struct perf_record_thread_map; struct perf_thread_map *thread_map__new_dummy(void); struct perf_thread_map *thread_map__new_by_pid(pid_t pid); @@ -16,7 +16,7 @@ struct perf_thread_map *thread_map__new_by_tid(pid_t tid); struct perf_thread_map *thread_map__new_by_uid(uid_t uid); struct perf_thread_map *thread_map__new_all_cpus(void); struct perf_thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid); -struct perf_thread_map *thread_map__new_event(struct thread_map_event *event); +struct perf_thread_map *thread_map__new_event(struct perf_record_thread_map *event); struct perf_thread_map *thread_map__new_str(const char *pid, const char *tid, uid_t uid, bool all_threads); -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix 2019-08-28 13:57 ` [PATCH 22/23] libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix Jiri Olsa @ 2019-08-29 19:02 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:02 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 72932371e78012cea96edb9e833d81f1c32dd892 Gitweb: https://git.kernel.org/tip/72932371e78012cea96edb9e833d81f1c32dd892 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:16 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:12 -03:00 libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix Even more, to have a "perf_record_" prefix, so that they match the PERF_RECORD_ enum they map to. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-23-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/arch/arm/util/cs-etm.c | 4 +- tools/perf/arch/arm64/util/arm-spe.c | 2 +- tools/perf/arch/s390/util/auxtrace.c | 2 +- tools/perf/arch/x86/util/intel-bts.c | 2 +- tools/perf/arch/x86/util/intel-pt.c | 2 +- tools/perf/arch/x86/util/tsc.c | 2 +- tools/perf/builtin-record.c | 4 +- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-stat.c | 2 +- tools/perf/lib/include/perf/event.h | 136 +++++++++++++------------- tools/perf/tests/cpumap.c | 12 +- tools/perf/tests/event_update.c | 16 +-- tools/perf/tests/stat.c | 8 +- tools/perf/tests/thread-map.c | 2 +- tools/perf/util/arm-spe.c | 4 +- tools/perf/util/auxtrace.c | 16 +-- tools/perf/util/auxtrace.h | 8 +- tools/perf/util/build-id.c | 2 +- tools/perf/util/cpumap.c | 6 +- tools/perf/util/cpumap.h | 4 +- tools/perf/util/cs-etm.c | 2 +- tools/perf/util/event.c | 34 +++---- tools/perf/util/event.h | 4 +- tools/perf/util/header.c | 54 +++++----- tools/perf/util/intel-bts.c | 4 +- tools/perf/util/intel-pt.c | 8 +- tools/perf/util/python.c | 4 +- tools/perf/util/s390-cpumsf.c | 4 +- tools/perf/util/session.c | 20 ++-- tools/perf/util/session.h | 2 +- tools/perf/util/stat.c | 6 +- tools/perf/util/thread_map.c | 4 +- tools/perf/util/thread_map.h | 4 +- 33 files changed, 193 insertions(+), 193 deletions(-) diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c index 5d856ed..9644e2d 100644 --- a/tools/perf/arch/arm/util/cs-etm.c +++ b/tools/perf/arch/arm/util/cs-etm.c @@ -565,7 +565,7 @@ static int cs_etm_get_ro(struct perf_pmu *pmu, int cpu, const char *path) static void cs_etm_get_metadata(int cpu, u32 *offset, struct auxtrace_record *itr, - struct auxtrace_info_event *info) + struct perf_record_auxtrace_info *info) { u32 increment; u64 magic; @@ -630,7 +630,7 @@ static void cs_etm_get_metadata(int cpu, u32 *offset, static int cs_etm_info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *info, + struct perf_record_auxtrace_info *info, size_t priv_size) { int i; diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index c7b38f0..4b36469 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -41,7 +41,7 @@ arm_spe_info_priv_size(struct auxtrace_record *itr __maybe_unused, static int arm_spe_info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size) { struct arm_spe_recording *sper = diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c index f32d7a7..b0fb70e 100644 --- a/tools/perf/arch/s390/util/auxtrace.c +++ b/tools/perf/arch/s390/util/auxtrace.c @@ -29,7 +29,7 @@ static size_t cpumsf_info_priv_size(struct auxtrace_record *itr __maybe_unused, static int cpumsf_info_fill(struct auxtrace_record *itr __maybe_unused, struct perf_session *session __maybe_unused, - struct auxtrace_info_event *auxtrace_info __maybe_unused, + struct perf_record_auxtrace_info *auxtrace_info __maybe_unused, size_t priv_size __maybe_unused) { auxtrace_info->type = PERF_AUXTRACE_S390_CPUMSF; diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/util/intel-bts.c index e4bb5df..d263430 100644 --- a/tools/perf/arch/x86/util/intel-bts.c +++ b/tools/perf/arch/x86/util/intel-bts.c @@ -60,7 +60,7 @@ intel_bts_info_priv_size(struct auxtrace_record *itr __maybe_unused, static int intel_bts_info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size) { struct intel_bts_recording *btsr = diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index 89fe30d..cb7cf16 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -314,7 +314,7 @@ static void intel_pt_tsc_ctc_ratio(u32 *n, u32 *d) static int intel_pt_info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size) { struct intel_pt_recording *ptr = diff --git a/tools/perf/arch/x86/util/tsc.c b/tools/perf/arch/x86/util/tsc.c index b1eb963..81720e2 100644 --- a/tools/perf/arch/x86/util/tsc.c +++ b/tools/perf/arch/x86/util/tsc.c @@ -57,7 +57,7 @@ int perf_event__synth_time_conv(const struct perf_event_mmap_page *pc, .time_conv = { .header = { .type = PERF_RECORD_TIME_CONV, - .size = sizeof(struct time_conv_event), + .size = sizeof(struct perf_record_time_conv), }, }, }; diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index afe5584..bd2a0cc 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -898,7 +898,7 @@ static void record__adjust_affinity(struct record *rec, struct perf_mmap *map) static size_t process_comp_header(void *record, size_t increment) { - struct compressed_event *event = record; + struct perf_record_compressed *event = record; size_t size = sizeof(*event); if (increment) { @@ -916,7 +916,7 @@ static size_t zstd_compress(struct perf_session *session, void *dst, size_t dst_ void *src, size_t src_size) { size_t compressed; - size_t max_record_size = PERF_SAMPLE_MAX_SIZE - sizeof(struct compressed_event) - 1; + size_t max_record_size = PERF_SAMPLE_MAX_SIZE - sizeof(struct perf_record_compressed) - 1; compressed = zstd_compress_stream_to_records(&session->zstd_data, dst, dst_size, src, src_size, max_record_size, process_comp_header); diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index e005be0..37297b6 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -3244,7 +3244,7 @@ static void script__setup_sample_type(struct perf_script *script) static int process_stat_round_event(struct perf_session *session, union perf_event *event) { - struct stat_round_event *round = &event->stat_round; + struct perf_record_stat_round *round = &event->stat_round; struct evsel *counter; evlist__for_each_entry(session->evlist, counter) { diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 6ab13f4..a7e8c26 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1462,7 +1462,7 @@ static int __cmd_record(int argc, const char **argv) static int process_stat_round_event(struct perf_session *session, union perf_event *event) { - struct stat_round_event *stat_round = &event->stat_round; + struct perf_record_stat_round *stat_round = &event->stat_round; struct evsel *counter; struct timespec tsh, *ts = NULL; const char **argv = session->header.env.cmdline_argv; diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index a5b08ef..1655c74 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -110,13 +110,13 @@ struct perf_record_sample { __u64 array[]; }; -struct context_switch_event { +struct perf_record_switch { struct perf_event_header header; __u32 next_prev_pid; __u32 next_prev_tid; }; -struct attr_event { +struct perf_record_header_attr { struct perf_event_header header; struct perf_event_attr attr; __u64 id[]; @@ -132,20 +132,20 @@ struct cpu_map_entries { __u16 cpu[]; }; -struct cpu_map_mask { +struct perf_record_record_cpu_map { __u16 nr; __u16 long_size; unsigned long mask[]; }; -struct cpu_map_data { +struct perf_record_cpu_map_data { __u16 type; char data[]; }; -struct cpu_map_event { - struct perf_event_header header; - struct cpu_map_data data; +struct perf_record_cpu_map { + struct perf_event_header header; + struct perf_record_cpu_map_data data; }; enum { @@ -155,15 +155,15 @@ enum { PERF_EVENT_UPDATE__CPUS = 3, }; -struct event_update_event_cpus { - struct cpu_map_data cpus; +struct perf_record_event_update_cpus { + struct perf_record_cpu_map_data cpus; }; -struct event_update_event_scale { +struct perf_record_event_update_scale { double scale; }; -struct event_update_event { +struct perf_record_event_update { struct perf_event_header header; __u64 type; __u64 id; @@ -177,17 +177,17 @@ struct perf_trace_event_type { char name[MAX_EVENT_NAME]; }; -struct event_type_event { +struct perf_record_header_event_type { struct perf_event_header header; struct perf_trace_event_type event_type; }; -struct tracing_data_event { +struct perf_record_header_tracing_data { struct perf_event_header header; __u32 size; }; -struct build_id_event { +struct perf_record_header_build_id { struct perf_event_header header; pid_t pid; __u8 build_id[24]; @@ -201,20 +201,20 @@ struct id_index_entry { __u64 tid; }; -struct id_index_event { +struct perf_record_id_index { struct perf_event_header header; __u64 nr; struct id_index_entry entries[0]; }; -struct auxtrace_info_event { +struct perf_record_auxtrace_info { struct perf_event_header header; __u32 type; __u32 reserved__; /* For alignment */ __u64 priv[]; }; -struct auxtrace_event { +struct perf_record_auxtrace { struct perf_event_header header; __u64 size; __u64 offset; @@ -227,7 +227,7 @@ struct auxtrace_event { #define MAX_AUXTRACE_ERROR_MSG 64 -struct auxtrace_error_event { +struct perf_record_auxtrace_error { struct perf_event_header header; __u32 type; __u32 code; @@ -240,28 +240,28 @@ struct auxtrace_error_event { char msg[MAX_AUXTRACE_ERROR_MSG]; }; -struct aux_event { +struct perf_record_aux { struct perf_event_header header; __u64 aux_offset; __u64 aux_size; __u64 flags; }; -struct itrace_start_event { +struct perf_record_itrace_start { struct perf_event_header header; __u32 pid; __u32 tid; }; -struct thread_map_event_entry { +struct perf_record_thread_map_entry { __u64 pid; char comm[16]; }; -struct thread_map_event { - struct perf_event_header header; - __u64 nr; - struct thread_map_event_entry entries[]; +struct perf_record_thread_map { + struct perf_event_header header; + __u64 nr; + struct perf_record_thread_map_entry entries[]; }; enum { @@ -271,18 +271,18 @@ enum { PERF_STAT_CONFIG_TERM__MAX = 3, }; -struct stat_config_event_entry { +struct perf_record_stat_config_entry { __u64 tag; __u64 val; }; -struct stat_config_event { - struct perf_event_header header; - __u64 nr; - struct stat_config_event_entry data[]; +struct perf_record_stat_config { + struct perf_event_header header; + __u64 nr; + struct perf_record_stat_config_entry data[]; }; -struct stat_event { +struct perf_record_stat { struct perf_event_header header; __u64 id; @@ -299,64 +299,64 @@ struct stat_event { }; }; -struct stat_round_event { +struct perf_record_stat_round { struct perf_event_header header; __u64 type; __u64 time; }; -struct time_conv_event { +struct perf_record_time_conv { struct perf_event_header header; __u64 time_shift; __u64 time_mult; __u64 time_zero; }; -struct feature_event { +struct perf_record_header_feature { struct perf_event_header header; __u64 feat_id; char data[]; }; -struct compressed_event { +struct perf_record_compressed { struct perf_event_header header; char data[]; }; union perf_event { - struct perf_event_header header; - struct perf_record_mmap mmap; - struct perf_record_mmap2 mmap2; - struct perf_record_comm comm; - struct perf_record_namespaces namespaces; - struct perf_record_fork fork; - struct perf_record_lost lost; - struct perf_record_lost_samples lost_samples; - struct perf_record_read read; - struct perf_record_throttle throttle; - struct perf_record_sample sample; - struct perf_record_bpf_event bpf; - struct perf_record_ksymbol ksymbol; - struct attr_event attr; - struct event_update_event event_update; - struct event_type_event event_type; - struct tracing_data_event tracing_data; - struct build_id_event build_id; - struct id_index_event id_index; - struct auxtrace_info_event auxtrace_info; - struct auxtrace_event auxtrace; - struct auxtrace_error_event auxtrace_error; - struct aux_event aux; - struct itrace_start_event itrace_start; - struct context_switch_event context_switch; - struct thread_map_event thread_map; - struct cpu_map_event cpu_map; - struct stat_config_event stat_config; - struct stat_event stat; - struct stat_round_event stat_round; - struct time_conv_event time_conv; - struct feature_event feat; - struct compressed_event pack; + struct perf_event_header header; + struct perf_record_mmap mmap; + struct perf_record_mmap2 mmap2; + struct perf_record_comm comm; + struct perf_record_namespaces namespaces; + struct perf_record_fork fork; + struct perf_record_lost lost; + struct perf_record_lost_samples lost_samples; + struct perf_record_read read; + struct perf_record_throttle throttle; + struct perf_record_sample sample; + struct perf_record_bpf_event bpf; + struct perf_record_ksymbol ksymbol; + struct perf_record_header_attr attr; + struct perf_record_event_update event_update; + struct perf_record_header_event_type event_type; + struct perf_record_header_tracing_data tracing_data; + struct perf_record_header_build_id build_id; + struct perf_record_id_index id_index; + struct perf_record_auxtrace_info auxtrace_info; + struct perf_record_auxtrace auxtrace; + struct perf_record_auxtrace_error auxtrace_error; + struct perf_record_aux aux; + struct perf_record_itrace_start itrace_start; + struct perf_record_switch context_switch; + struct perf_record_thread_map thread_map; + struct perf_record_cpu_map cpu_map; + struct perf_record_stat_config stat_config; + struct perf_record_stat stat; + struct perf_record_stat_round stat_round; + struct perf_record_time_conv time_conv; + struct perf_record_header_feature feat; + struct perf_record_compressed pack; }; #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/tests/cpumap.c b/tools/perf/tests/cpumap.c index b71fe09..39493de 100644 --- a/tools/perf/tests/cpumap.c +++ b/tools/perf/tests/cpumap.c @@ -15,9 +15,9 @@ static int process_event_mask(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct cpu_map_event *map_event = &event->cpu_map; - struct cpu_map_mask *mask; - struct cpu_map_data *data; + struct perf_record_cpu_map *map_event = &event->cpu_map; + struct perf_record_record_cpu_map *mask; + struct perf_record_cpu_map_data *data; struct perf_cpu_map *map; int i; @@ -25,7 +25,7 @@ static int process_event_mask(struct perf_tool *tool __maybe_unused, TEST_ASSERT_VAL("wrong type", data->type == PERF_CPU_MAP__MASK); - mask = (struct cpu_map_mask *)data->data; + mask = (struct perf_record_record_cpu_map *)data->data; TEST_ASSERT_VAL("wrong nr", mask->nr == 1); @@ -49,9 +49,9 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct cpu_map_event *map_event = &event->cpu_map; + struct perf_record_cpu_map *map_event = &event->cpu_map; struct cpu_map_entries *cpus; - struct cpu_map_data *data; + struct perf_record_cpu_map_data *data; struct perf_cpu_map *map; data = &map_event->data; diff --git a/tools/perf/tests/event_update.c b/tools/perf/tests/event_update.c index c37ff49..1411155 100644 --- a/tools/perf/tests/event_update.c +++ b/tools/perf/tests/event_update.c @@ -12,7 +12,7 @@ static int process_event_unit(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct event_update_event *ev = (struct event_update_event *) event; + struct perf_record_event_update *ev = (struct perf_record_event_update *)event; TEST_ASSERT_VAL("wrong id", ev->id == 123); TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__UNIT); @@ -25,10 +25,10 @@ static int process_event_scale(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct event_update_event *ev = (struct event_update_event *) event; - struct event_update_event_scale *ev_data; + struct perf_record_event_update *ev = (struct perf_record_event_update *)event; + struct perf_record_event_update_scale *ev_data; - ev_data = (struct event_update_event_scale *) ev->data; + ev_data = (struct perf_record_event_update_scale *)ev->data; TEST_ASSERT_VAL("wrong id", ev->id == 123); TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__SCALE); @@ -47,7 +47,7 @@ static int process_event_name(struct perf_tool *tool, struct machine *machine __maybe_unused) { struct event_name *tmp = container_of(tool, struct event_name, tool); - struct event_update_event *ev = (struct event_update_event*) event; + struct perf_record_event_update *ev = (struct perf_record_event_update *)event; TEST_ASSERT_VAL("wrong id", ev->id == 123); TEST_ASSERT_VAL("wrong id", ev->type == PERF_EVENT_UPDATE__NAME); @@ -60,11 +60,11 @@ static int process_event_cpus(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct event_update_event *ev = (struct event_update_event*) event; - struct event_update_event_cpus *ev_data; + struct perf_record_event_update *ev = (struct perf_record_event_update *)event; + struct perf_record_event_update_cpus *ev_data; struct perf_cpu_map *map; - ev_data = (struct event_update_event_cpus*) ev->data; + ev_data = (struct perf_record_event_update_cpus *) ev->data; map = cpu_map__new_data(&ev_data->cpus); diff --git a/tools/perf/tests/stat.c b/tools/perf/tests/stat.c index 9425002..cc10b41 100644 --- a/tools/perf/tests/stat.c +++ b/tools/perf/tests/stat.c @@ -6,7 +6,7 @@ #include "counts.h" #include "debug.h" -static bool has_term(struct stat_config_event *config, +static bool has_term(struct perf_record_stat_config *config, u64 tag, u64 val) { unsigned i; @@ -25,7 +25,7 @@ static int process_stat_config_event(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct stat_config_event *config = &event->stat_config; + struct perf_record_stat_config *config = &event->stat_config; struct perf_stat_config stat_config; #define HAS(term, val) \ @@ -65,7 +65,7 @@ static int process_stat_event(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct stat_event *st = &event->stat; + struct perf_record_stat *st = &event->stat; TEST_ASSERT_VAL("wrong cpu", st->cpu == 1); TEST_ASSERT_VAL("wrong thread", st->thread == 2); @@ -95,7 +95,7 @@ static int process_stat_round_event(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct stat_round_event *stat_round = &event->stat_round; + struct perf_record_stat_round *stat_round = &event->stat_round; TEST_ASSERT_VAL("wrong time", stat_round->time == 0xdeadbeef); TEST_ASSERT_VAL("wrong type", stat_round->type == PERF_STAT_ROUND_TYPE__INTERVAL); diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c index d803eaf..c19ec88 100644 --- a/tools/perf/tests/thread-map.c +++ b/tools/perf/tests/thread-map.c @@ -56,7 +56,7 @@ static int process_event(struct perf_tool *tool __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) { - struct thread_map_event *map = &event->thread_map; + struct perf_record_thread_map *map = &event->thread_map; struct perf_thread_map *threads; TEST_ASSERT_VAL("wrong nr", map->nr == 1); diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index cd26315..d7c3fbb 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -192,12 +192,12 @@ static void arm_spe_print_info(__u64 *arr) int arm_spe_process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; size_t min_sz = sizeof(u64) * ARM_SPE_PMU_TYPE; struct arm_spe *spe; int err; - if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) + + if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info) + min_sz) return -EINVAL; diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index c3da8a0..10c7077 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -386,7 +386,7 @@ static int auxtrace_queues__add_indexed_event(struct auxtrace_queues *queues, return err; if (event->header.type == PERF_RECORD_AUXTRACE) { - if (event->header.size < sizeof(struct auxtrace_event) || + if (event->header.size < sizeof(struct perf_record_auxtrace) || event->header.size != sz) { err = -EINVAL; goto out; @@ -519,7 +519,7 @@ static int auxtrace_not_supported(void) int auxtrace_record__info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size) { if (itr) @@ -859,13 +859,13 @@ void auxtrace_buffer__free(struct auxtrace_buffer *buffer) free(buffer); } -void auxtrace_synth_error(struct auxtrace_error_event *auxtrace_error, int type, +void auxtrace_synth_error(struct perf_record_auxtrace_error *auxtrace_error, int type, int code, int cpu, pid_t pid, pid_t tid, u64 ip, const char *msg, u64 timestamp) { size_t size; - memset(auxtrace_error, 0, sizeof(struct auxtrace_error_event)); + memset(auxtrace_error, 0, sizeof(struct perf_record_auxtrace_error)); auxtrace_error->header.type = PERF_RECORD_AUXTRACE_ERROR; auxtrace_error->type = type; @@ -894,12 +894,12 @@ int perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr, pr_debug2("Synthesizing auxtrace information\n"); priv_size = auxtrace_record__info_priv_size(itr, session->evlist); - ev = zalloc(sizeof(struct auxtrace_info_event) + priv_size); + ev = zalloc(sizeof(struct perf_record_auxtrace_info) + priv_size); if (!ev) return -ENOMEM; ev->auxtrace_info.header.type = PERF_RECORD_AUXTRACE_INFO; - ev->auxtrace_info.header.size = sizeof(struct auxtrace_info_event) + + ev->auxtrace_info.header.size = sizeof(struct perf_record_auxtrace_info) + priv_size; err = auxtrace_record__info_fill(itr, session, &ev->auxtrace_info, priv_size); @@ -1169,7 +1169,7 @@ static const char *auxtrace_error_name(int type) size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp) { - struct auxtrace_error_event *e = &event->auxtrace_error; + struct perf_record_auxtrace_error *e = &event->auxtrace_error; unsigned long long nsecs = e->time; const char *msg = e->msg; int ret; @@ -1197,7 +1197,7 @@ size_t perf_event__fprintf_auxtrace_error(union perf_event *event, FILE *fp) void perf_session__auxtrace_error_inc(struct perf_session *session, union perf_event *event) { - struct auxtrace_error_event *e = &event->auxtrace_error; + struct perf_record_auxtrace_error *e = &event->auxtrace_error; if (e->type < PERF_AUXTRACE_ERROR_MAX) session->evlist->stats.nr_auxtrace_errors[e->type] += 1; diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 8e637ac..b213e64 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -28,7 +28,7 @@ struct perf_tool; struct perf_mmap; struct option; struct record_opts; -struct auxtrace_info_event; +struct perf_record_auxtrace_info; struct events_stats; /* Auxtrace records must have the same alignment as perf event records */ @@ -318,7 +318,7 @@ struct auxtrace_record { struct evlist *evlist); int (*info_fill)(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size); void (*free)(struct auxtrace_record *itr); int (*snapshot_start)(struct auxtrace_record *itr); @@ -498,7 +498,7 @@ size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr, struct evlist *evlist); int auxtrace_record__info_fill(struct auxtrace_record *itr, struct perf_session *session, - struct auxtrace_info_event *auxtrace_info, + struct perf_record_auxtrace_info *auxtrace_info, size_t priv_size); void auxtrace_record__free(struct auxtrace_record *itr); int auxtrace_record__snapshot_start(struct auxtrace_record *itr); @@ -515,7 +515,7 @@ int auxtrace_index__process(int fd, u64 size, struct perf_session *session, bool needs_swap); void auxtrace_index__free(struct list_head *head); -void auxtrace_synth_error(struct auxtrace_error_event *auxtrace_error, int type, +void auxtrace_synth_error(struct perf_record_auxtrace_error *auxtrace_error, int type, int code, int cpu, pid_t pid, pid_t tid, u64 ip, const char *msg, u64 timestamp); diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index b987548..4c96a33 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c @@ -295,7 +295,7 @@ static int write_buildid(const char *name, size_t name_len, u8 *build_id, pid_t pid, u16 misc, struct feat_fd *fd) { int err; - struct build_id_event b; + struct perf_record_header_build_id b; size_t len; len = name_len + 1; diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index f5c2118..b9301e7 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -43,7 +43,7 @@ static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus) return map; } -static struct perf_cpu_map *cpu_map__from_mask(struct cpu_map_mask *mask) +static struct perf_cpu_map *cpu_map__from_mask(struct perf_record_record_cpu_map *mask) { struct perf_cpu_map *map; int nr, nbits = mask->nr * mask->long_size * BITS_PER_BYTE; @@ -61,12 +61,12 @@ static struct perf_cpu_map *cpu_map__from_mask(struct cpu_map_mask *mask) } -struct perf_cpu_map *cpu_map__new_data(struct cpu_map_data *data) +struct perf_cpu_map *cpu_map__new_data(struct perf_record_cpu_map_data *data) { if (data->type == PERF_CPU_MAP__CPUS) return cpu_map__from_entries((struct cpu_map_entries *)data->data); else - return cpu_map__from_mask((struct cpu_map_mask *)data->data); + return cpu_map__from_mask((struct perf_record_record_cpu_map *)data->data); } size_t cpu_map__fprintf(struct perf_cpu_map *map, FILE *fp) diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index c2519e7..2553bef 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -7,10 +7,10 @@ #include <internal/cpumap.h> #include <perf/cpumap.h> -struct cpu_map_data; +struct perf_record_cpu_map_data; struct perf_cpu_map *perf_cpu_map__empty_new(int nr); -struct perf_cpu_map *cpu_map__new_data(struct cpu_map_data *data); +struct perf_cpu_map *cpu_map__new_data(struct perf_record_cpu_map_data *data); size_t cpu_map__snprint(struct perf_cpu_map *map, char *buf, size_t size); size_t cpu_map__snprint_mask(struct perf_cpu_map *map, char *buf, size_t size); size_t cpu_map__fprintf(struct perf_cpu_map *map, FILE *fp); diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index e210c1d..d6de383 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -2393,7 +2393,7 @@ static void cs_etm__print_auxtrace_info(__u64 *val, int num) int cs_etm__process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; struct cs_etm_auxtrace *etm = NULL; struct int_node *inode; unsigned int pmu_type; diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index b711019..c9d1f83 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -992,7 +992,7 @@ int perf_event__synthesize_thread_map2(struct perf_tool *tool, event->thread_map.nr = threads->nr; for (i = 0; i < threads->nr; i++) { - struct thread_map_event_entry *entry = &event->thread_map.entries[i]; + struct perf_record_thread_map_entry *entry = &event->thread_map.entries[i]; char *comm = perf_thread_map__comm(threads, i); if (!comm) @@ -1019,7 +1019,7 @@ static void synthesize_cpus(struct cpu_map_entries *cpus, cpus->cpu[i] = map->map[i]; } -static void synthesize_mask(struct cpu_map_mask *mask, +static void synthesize_mask(struct perf_record_record_cpu_map *mask, struct perf_cpu_map *map, int max) { int i; @@ -1050,7 +1050,7 @@ static size_t mask_size(struct perf_cpu_map *map, int *max) *max = bit; } - return sizeof(struct cpu_map_mask) + BITS_TO_LONGS(*max) * sizeof(long); + return sizeof(struct perf_record_record_cpu_map) + BITS_TO_LONGS(*max) * sizeof(long); } void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *max) @@ -1061,15 +1061,15 @@ void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int /* * Both array and mask data have variable size based * on the number of cpus and their actual values. - * The size of the 'struct cpu_map_data' is: + * The size of the 'struct perf_record_cpu_map_data' is: * * array = size of 'struct cpu_map_entries' + * number of cpus * sizeof(u64) * - * mask = size of 'struct cpu_map_mask' + + * mask = size of 'struct perf_record_record_cpu_map' + * maximum cpu bit converted to size of longs * - * and finaly + the size of 'struct cpu_map_data'. + * and finaly + the size of 'struct perf_record_cpu_map_data'. */ size_cpus = cpus_size(map); size_mask = mask_size(map, max); @@ -1082,12 +1082,12 @@ void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *type = PERF_CPU_MAP__MASK; } - *size += sizeof(struct cpu_map_data); + *size += sizeof(struct perf_record_cpu_map_data); *size = PERF_ALIGN(*size, sizeof(u64)); return zalloc(*size); } -void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *map, +void cpu_map_data__synthesize(struct perf_record_cpu_map_data *data, struct perf_cpu_map *map, u16 type, int max) { data->type = type; @@ -1097,16 +1097,16 @@ void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *ma synthesize_cpus((struct cpu_map_entries *) data->data, map); break; case PERF_CPU_MAP__MASK: - synthesize_mask((struct cpu_map_mask *) data->data, map, max); + synthesize_mask((struct perf_record_record_cpu_map *)data->data, map, max); default: break; }; } -static struct cpu_map_event* cpu_map_event__new(struct perf_cpu_map *map) +static struct perf_record_cpu_map *cpu_map_event__new(struct perf_cpu_map *map) { - size_t size = sizeof(struct cpu_map_event); - struct cpu_map_event *event; + size_t size = sizeof(struct perf_record_cpu_map); + struct perf_record_cpu_map *event; int max; u16 type; @@ -1127,7 +1127,7 @@ int perf_event__synthesize_cpu_map(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine) { - struct cpu_map_event *event; + struct perf_record_cpu_map *event; int err; event = cpu_map_event__new(map); @@ -1145,7 +1145,7 @@ int perf_event__synthesize_stat_config(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine) { - struct stat_config_event *event; + struct perf_record_stat_config *event; int size, i = 0, err; size = sizeof(*event); @@ -1184,7 +1184,7 @@ int perf_event__synthesize_stat(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine) { - struct stat_event event; + struct perf_record_stat event; event.header.type = PERF_RECORD_STAT; event.header.size = sizeof(event); @@ -1205,7 +1205,7 @@ int perf_event__synthesize_stat_round(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine) { - struct stat_round_event event; + struct perf_record_stat_round event; event.header.type = PERF_RECORD_STAT_ROUND; event.header.size = sizeof(event); @@ -1218,7 +1218,7 @@ int perf_event__synthesize_stat_round(struct perf_tool *tool, } void perf_event__read_stat_config(struct perf_stat_config *config, - struct stat_config_event *event) + struct perf_record_stat_config *event) { unsigned i; diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index e15eed5..a7341e1 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -374,7 +374,7 @@ int perf_event__synthesize_stat_config(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine); void perf_event__read_stat_config(struct perf_stat_config *config, - struct stat_config_event *event); + struct perf_record_stat_config *event); int perf_event__synthesize_stat(struct perf_tool *tool, u32 cpu, u32 thread, u64 id, struct perf_counts_values *count, @@ -511,7 +511,7 @@ int kallsyms__get_function_start(const char *kallsyms_filename, const char *symbol_name, u64 *addr); void *cpu_map_data__alloc(struct perf_cpu_map *map, size_t *size, u16 *type, int *max); -void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *map, +void cpu_map_data__synthesize(struct perf_record_cpu_map_data *data, struct perf_cpu_map *map, u16 type, int max); void event_attr_init(struct perf_event_attr *attr); diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 629bdb1..0a842d9 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1878,7 +1878,7 @@ static void print_mem_topology(struct feat_fd *ff, FILE *fp) } } -static int __event_process_build_id(struct build_id_event *bev, +static int __event_process_build_id(struct perf_record_header_build_id *bev, char *filename, struct perf_session *session) { @@ -1947,7 +1947,7 @@ static int perf_header__read_build_ids_abi_quirk(struct perf_header *header, u8 build_id[PERF_ALIGN(BUILD_ID_SIZE, sizeof(u64))]; char filename[0]; } old_bev; - struct build_id_event bev; + struct perf_record_header_build_id bev; char filename[PATH_MAX]; u64 limit = offset + size; @@ -1988,7 +1988,7 @@ static int perf_header__read_build_ids(struct perf_header *header, int input, u64 offset, u64 size) { struct perf_session *session = container_of(header, struct perf_session, header); - struct build_id_event bev; + struct perf_record_header_build_id bev; char filename[PATH_MAX]; u64 limit = offset + size, orig_offset = offset; int err = -1; @@ -2010,7 +2010,7 @@ static int perf_header__read_build_ids(struct perf_header *header, * * "perf: 'perf kvm' tool for monitoring guest performance from host" * - * Added a field to struct build_id_event that broke the file + * Added a field to struct perf_record_header_build_id that broke the file * format. * * Since the kernel build-id is the first entry, process the @@ -3678,7 +3678,7 @@ int perf_event__synthesize_features(struct perf_tool *tool, { struct perf_header *header = &session->header; struct feat_fd ff; - struct feature_event *fe; + struct perf_record_header_feature *fe; size_t sz, sz_hdr; int feat, ret; @@ -3741,7 +3741,7 @@ int perf_event__process_feature(struct perf_session *session, { struct perf_tool *tool = session->tool; struct feat_fd ff = { .fd = 0 }; - struct feature_event *fe = (struct feature_event *)event; + struct perf_record_header_feature *fe = (struct perf_record_header_feature *)event; int type = fe->header.type; u64 feat = fe->feat_id; @@ -3778,10 +3778,10 @@ int perf_event__process_feature(struct perf_session *session, return 0; } -static struct event_update_event * +static struct perf_record_event_update * event_update_event__new(size_t size, u64 type, u64 id) { - struct event_update_event *ev; + struct perf_record_event_update *ev; size += sizeof(*ev); size = PERF_ALIGN(size, sizeof(u64)); @@ -3801,7 +3801,7 @@ perf_event__synthesize_event_update_unit(struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process) { - struct event_update_event *ev; + struct perf_record_event_update *ev; size_t size = strlen(evsel->unit); int err; @@ -3820,15 +3820,15 @@ perf_event__synthesize_event_update_scale(struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process) { - struct event_update_event *ev; - struct event_update_event_scale *ev_data; + struct perf_record_event_update *ev; + struct perf_record_event_update_scale *ev_data; int err; ev = event_update_event__new(sizeof(*ev_data), PERF_EVENT_UPDATE__SCALE, evsel->id[0]); if (ev == NULL) return -ENOMEM; - ev_data = (struct event_update_event_scale *) ev->data; + ev_data = (struct perf_record_event_update_scale *)ev->data; ev_data->scale = evsel->scale; err = process(tool, (union perf_event*) ev, NULL, NULL); free(ev); @@ -3840,7 +3840,7 @@ perf_event__synthesize_event_update_name(struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process) { - struct event_update_event *ev; + struct perf_record_event_update *ev; size_t len = strlen(evsel->name); int err; @@ -3859,8 +3859,8 @@ perf_event__synthesize_event_update_cpus(struct perf_tool *tool, struct evsel *evsel, perf_event__handler_t process) { - size_t size = sizeof(struct event_update_event); - struct event_update_event *ev; + size_t size = sizeof(struct perf_record_event_update); + struct perf_record_event_update *ev; int max, err; u16 type; @@ -3876,7 +3876,7 @@ perf_event__synthesize_event_update_cpus(struct perf_tool *tool, ev->type = PERF_EVENT_UPDATE__CPUS; ev->id = evsel->id[0]; - cpu_map_data__synthesize((struct cpu_map_data *) ev->data, + cpu_map_data__synthesize((struct perf_record_cpu_map_data *)ev->data, evsel->core.own_cpus, type, max); @@ -3887,9 +3887,9 @@ perf_event__synthesize_event_update_cpus(struct perf_tool *tool, size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) { - struct event_update_event *ev = &event->event_update; - struct event_update_event_scale *ev_scale; - struct event_update_event_cpus *ev_cpus; + struct perf_record_event_update *ev = &event->event_update; + struct perf_record_event_update_scale *ev_scale; + struct perf_record_event_update_cpus *ev_cpus; struct perf_cpu_map *map; size_t ret; @@ -3897,7 +3897,7 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) switch (ev->type) { case PERF_EVENT_UPDATE__SCALE: - ev_scale = (struct event_update_event_scale *) ev->data; + ev_scale = (struct perf_record_event_update_scale *)ev->data; ret += fprintf(fp, "... scale: %f\n", ev_scale->scale); break; case PERF_EVENT_UPDATE__UNIT: @@ -3907,7 +3907,7 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) ret += fprintf(fp, "... name: %s\n", ev->data); break; case PERF_EVENT_UPDATE__CPUS: - ev_cpus = (struct event_update_event_cpus *) ev->data; + ev_cpus = (struct perf_record_event_update_cpus *)ev->data; ret += fprintf(fp, "... "); map = cpu_map__new_data(&ev_cpus->cpus); @@ -4053,9 +4053,9 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused, union perf_event *event, struct evlist **pevlist) { - struct event_update_event *ev = &event->event_update; - struct event_update_event_scale *ev_scale; - struct event_update_event_cpus *ev_cpus; + struct perf_record_event_update *ev = &event->event_update; + struct perf_record_event_update_scale *ev_scale; + struct perf_record_event_update_cpus *ev_cpus; struct evlist *evlist; struct evsel *evsel; struct perf_cpu_map *map; @@ -4077,11 +4077,11 @@ int perf_event__process_event_update(struct perf_tool *tool __maybe_unused, evsel->name = strdup(ev->data); break; case PERF_EVENT_UPDATE__SCALE: - ev_scale = (struct event_update_event_scale *) ev->data; + ev_scale = (struct perf_record_event_update_scale *)ev->data; evsel->scale = ev_scale->scale; break; case PERF_EVENT_UPDATE__CPUS: - ev_cpus = (struct event_update_event_cpus *) ev->data; + ev_cpus = (struct perf_record_event_update_cpus *)ev->data; map = cpu_map__new_data(&ev_cpus->cpus); if (map) @@ -4153,7 +4153,7 @@ int perf_event__process_tracing_data(struct perf_session *session, char buf[BUFSIZ]; /* setup for reading amidst mmap */ - lseek(fd, offset + sizeof(struct tracing_data_event), + lseek(fd, offset + sizeof(struct perf_record_header_tracing_data), SEEK_SET); size_read = trace_report(fd, &session->tevent, diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c index 03c581a..99dddb6 100644 --- a/tools/perf/util/intel-bts.c +++ b/tools/perf/util/intel-bts.c @@ -848,12 +848,12 @@ static void intel_bts_print_info(__u64 *arr, int start, int finish) int intel_bts_process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; size_t min_sz = sizeof(u64) * INTEL_BTS_SNAPSHOT_MODE; struct intel_bts *bts; int err; - if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) + + if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info) + min_sz) return -EINVAL; diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index c83a9a7..825a6a3 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -3063,23 +3063,23 @@ static void intel_pt_print_info_str(const char *name, const char *str) fprintf(stdout, " %-20s%s\n", name, str ? str : ""); } -static bool intel_pt_has(struct auxtrace_info_event *auxtrace_info, int pos) +static bool intel_pt_has(struct perf_record_auxtrace_info *auxtrace_info, int pos) { return auxtrace_info->header.size >= - sizeof(struct auxtrace_info_event) + (sizeof(u64) * (pos + 1)); + sizeof(struct perf_record_auxtrace_info) + (sizeof(u64) * (pos + 1)); } int intel_pt_process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; size_t min_sz = sizeof(u64) * INTEL_PT_PER_CPU_MMAPS; struct intel_pt *pt; void *info_end; __u64 *info; int err; - if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) + + if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info) + min_sz) return -EINVAL; diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 59974e9..11479a7 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -431,8 +431,8 @@ static char pyrf_context_switch_event__doc[] = PyDoc_STR("perf context_switch ev static PyMemberDef pyrf_context_switch_event__members[] = { sample_members member_def(perf_event_header, type, T_UINT, "event type"), - member_def(context_switch_event, next_prev_pid, T_UINT, "next/prev pid"), - member_def(context_switch_event, next_prev_tid, T_UINT, "next/prev tid"), + member_def(perf_record_switch, next_prev_pid, T_UINT, "next/prev pid"), + member_def(perf_record_switch, next_prev_tid, T_UINT, "next/prev tid"), { .name = NULL, }, }; diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c index d078ae8..4f6c146 100644 --- a/tools/perf/util/s390-cpumsf.c +++ b/tools/perf/util/s390-cpumsf.c @@ -1109,11 +1109,11 @@ static int s390_cpumsf__config(const char *var, const char *value, void *cb) int s390_cpumsf_process_auxtrace_info(union perf_event *event, struct perf_session *session) { - struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info; struct s390_cpumsf *sf; int err; - if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event)) + if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info)) return -EINVAL; sf = zalloc(sizeof(struct s390_cpumsf)); diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index aa96674..7350b0d 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -64,8 +64,8 @@ static int perf_session__process_compressed_event(struct perf_session *session, decomp->size = decomp_last_rem; } - src = (void *)event + sizeof(struct compressed_event); - src_size = event->pack.header.size - sizeof(struct compressed_event); + src = (void *)event + sizeof(struct perf_record_compressed); + src_size = event->pack.header.size - sizeof(struct perf_record_compressed); decomp_size = zstd_decompress_stream(&(session->zstd_data), src, src_size, &(decomp->data[decomp_last_rem]), decomp_len - decomp_last_rem); @@ -836,9 +836,9 @@ static void perf_event__thread_map_swap(union perf_event *event, static void perf_event__cpu_map_swap(union perf_event *event, bool sample_id_all __maybe_unused) { - struct cpu_map_data *data = &event->cpu_map.data; + struct perf_record_cpu_map_data *data = &event->cpu_map.data; struct cpu_map_entries *cpus; - struct cpu_map_mask *mask; + struct perf_record_record_cpu_map *mask; unsigned i; data->type = bswap_64(data->type); @@ -853,7 +853,7 @@ static void perf_event__cpu_map_swap(union perf_event *event, cpus->cpu[i] = bswap_16(cpus->cpu[i]); break; case PERF_CPU_MAP__MASK: - mask = (struct cpu_map_mask *) data->data; + mask = (struct perf_record_record_cpu_map *)data->data; mask->nr = bswap_16(mask->nr); mask->long_size = bswap_16(mask->long_size); @@ -2376,10 +2376,10 @@ int perf_event__process_id_index(struct perf_session *session, union perf_event *event) { struct evlist *evlist = session->evlist; - struct id_index_event *ie = &event->id_index; + struct perf_record_id_index *ie = &event->id_index; size_t i, nr, max_nr; - max_nr = (ie->header.size - sizeof(struct id_index_event)) / + max_nr = (ie->header.size - sizeof(struct perf_record_id_index)) / sizeof(struct id_index_entry); nr = ie->nr; if (nr > max_nr) @@ -2421,14 +2421,14 @@ int perf_event__synthesize_id_index(struct perf_tool *tool, pr_debug2("Synthesizing id index\n"); - max_nr = (UINT16_MAX - sizeof(struct id_index_event)) / + max_nr = (UINT16_MAX - sizeof(struct perf_record_id_index)) / sizeof(struct id_index_entry); evlist__for_each_entry(evlist, evsel) nr += evsel->ids; n = nr > max_nr ? max_nr : nr; - sz = sizeof(struct id_index_event) + n * sizeof(struct id_index_entry); + sz = sizeof(struct perf_record_id_index) + n * sizeof(struct id_index_entry); ev = zalloc(sz); if (!ev) return -ENOMEM; @@ -2468,7 +2468,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool, } } - sz = sizeof(struct id_index_event) + nr * sizeof(struct id_index_entry); + sz = sizeof(struct perf_record_id_index) + nr * sizeof(struct id_index_entry); ev->id_index.header.size = sz; ev->id_index.nr = nr; diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 79e97d1..b7aa076 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -28,7 +28,7 @@ struct perf_session { struct itrace_synth_opts *itrace_synth_opts; struct list_head auxtrace_index; struct trace_event tevent; - struct time_conv_event time_conv; + struct perf_record_time_conv time_conv; bool repipe; bool one_mmap; void *one_mmap_addr; diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 4c79574..66f8808 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -382,7 +382,7 @@ int perf_event__process_stat_event(struct perf_session *session, union perf_event *event) { struct perf_counts_values count; - struct stat_event *st = &event->stat; + struct perf_record_stat *st = &event->stat; struct evsel *counter; count.val = st->val; @@ -402,7 +402,7 @@ int perf_event__process_stat_event(struct perf_session *session, size_t perf_event__fprintf_stat(union perf_event *event, FILE *fp) { - struct stat_event *st = (struct stat_event *) event; + struct perf_record_stat *st = (struct perf_record_stat *)event; size_t ret; ret = fprintf(fp, "\n... id %" PRI_lu64 ", cpu %d, thread %d\n", @@ -415,7 +415,7 @@ size_t perf_event__fprintf_stat(union perf_event *event, FILE *fp) size_t perf_event__fprintf_stat_round(union perf_event *event, FILE *fp) { - struct stat_round_event *rd = (struct stat_round_event *)event; + struct perf_record_stat_round *rd = (struct perf_record_stat_round *)event; size_t ret; ret = fprintf(fp, "\n... time %" PRI_lu64 ", type %s\n", rd->time, diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c index 3e64525..c9bfe46 100644 --- a/tools/perf/util/thread_map.c +++ b/tools/perf/util/thread_map.c @@ -369,7 +369,7 @@ void thread_map__read_comms(struct perf_thread_map *threads) } static void thread_map__copy_event(struct perf_thread_map *threads, - struct thread_map_event *event) + struct perf_record_thread_map *event) { unsigned i; @@ -383,7 +383,7 @@ static void thread_map__copy_event(struct perf_thread_map *threads, refcount_set(&threads->refcnt, 1); } -struct perf_thread_map *thread_map__new_event(struct thread_map_event *event) +struct perf_thread_map *thread_map__new_event(struct perf_record_thread_map *event) { struct perf_thread_map *threads; diff --git a/tools/perf/util/thread_map.h b/tools/perf/util/thread_map.h index ca165fd..3bb860a 100644 --- a/tools/perf/util/thread_map.h +++ b/tools/perf/util/thread_map.h @@ -8,7 +8,7 @@ #include <internal/threadmap.h> #include <perf/threadmap.h> -struct thread_map_event; +struct perf_record_thread_map; struct perf_thread_map *thread_map__new_dummy(void); struct perf_thread_map *thread_map__new_by_pid(pid_t pid); @@ -16,7 +16,7 @@ struct perf_thread_map *thread_map__new_by_tid(pid_t tid); struct perf_thread_map *thread_map__new_by_uid(uid_t uid); struct perf_thread_map *thread_map__new_all_cpus(void); struct perf_thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid); -struct perf_thread_map *thread_map__new_event(struct thread_map_event *event); +struct perf_thread_map *thread_map__new_event(struct perf_record_thread_map *event); struct perf_thread_map *thread_map__new_str(const char *pid, const char *tid, uid_t uid, bool all_threads); ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 23/23] libperf: Move 'enum perf_user_event_type' to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (21 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 22/23] libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix Jiri Olsa @ 2019-08-28 13:57 ` Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 18:29 ` [PATCH 00/23] libperf: Add rest of events " Arnaldo Carvalho de Melo 23 siblings, 1 reply; 48+ messages in thread From: Jiri Olsa @ 2019-08-28 13:57 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan So it's available for libperf's users. Link: http://lkml.kernel.org/n/tip-oci51ex7bb8gjuqzy9u1801z@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/lib/include/perf/event.h | 23 +++++++++++++++++++++++ tools/perf/util/event.h | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 1655c744ec2b..18106899cb4e 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -323,6 +323,29 @@ struct perf_record_compressed { char data[]; }; +enum perf_user_event_type { /* above any possible kernel type */ + PERF_RECORD_USER_TYPE_START = 64, + PERF_RECORD_HEADER_ATTR = 64, + PERF_RECORD_HEADER_EVENT_TYPE = 65, /* deprecated */ + PERF_RECORD_HEADER_TRACING_DATA = 66, + PERF_RECORD_HEADER_BUILD_ID = 67, + PERF_RECORD_FINISHED_ROUND = 68, + PERF_RECORD_ID_INDEX = 69, + PERF_RECORD_AUXTRACE_INFO = 70, + PERF_RECORD_AUXTRACE = 71, + PERF_RECORD_AUXTRACE_ERROR = 72, + PERF_RECORD_THREAD_MAP = 73, + PERF_RECORD_CPU_MAP = 74, + PERF_RECORD_STAT_CONFIG = 75, + PERF_RECORD_STAT = 76, + PERF_RECORD_STAT_ROUND = 77, + PERF_RECORD_EVENT_UPDATE = 78, + PERF_RECORD_TIME_CONV = 79, + PERF_RECORD_HEADER_FEATURE = 80, + PERF_RECORD_COMPRESSED = 81, + PERF_RECORD_HEADER_MAX +}; + union perf_event { struct perf_event_header header; struct perf_record_mmap mmap; diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index a7341e14eb48..4c0c5232bd41 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -146,29 +146,6 @@ struct perf_sample { PERF_MEM_S(LOCK, NA) |\ PERF_MEM_S(TLB, NA)) -enum perf_user_event_type { /* above any possible kernel type */ - PERF_RECORD_USER_TYPE_START = 64, - PERF_RECORD_HEADER_ATTR = 64, - PERF_RECORD_HEADER_EVENT_TYPE = 65, /* deprecated */ - PERF_RECORD_HEADER_TRACING_DATA = 66, - PERF_RECORD_HEADER_BUILD_ID = 67, - PERF_RECORD_FINISHED_ROUND = 68, - PERF_RECORD_ID_INDEX = 69, - PERF_RECORD_AUXTRACE_INFO = 70, - PERF_RECORD_AUXTRACE = 71, - PERF_RECORD_AUXTRACE_ERROR = 72, - PERF_RECORD_THREAD_MAP = 73, - PERF_RECORD_CPU_MAP = 74, - PERF_RECORD_STAT_CONFIG = 75, - PERF_RECORD_STAT = 76, - PERF_RECORD_STAT_ROUND = 77, - PERF_RECORD_EVENT_UPDATE = 78, - PERF_RECORD_TIME_CONV = 79, - PERF_RECORD_HEADER_FEATURE = 80, - PERF_RECORD_COMPRESSED = 81, - PERF_RECORD_HEADER_MAX -}; - enum auxtrace_error_type { PERF_AUXTRACE_ERROR_ITRACE = 1, PERF_AUXTRACE_ERROR_MAX -- 2.21.0 ^ permalink raw reply related [flat|nested] 48+ messages in thread
* [tip: perf/core] libperf: Move 'enum perf_user_event_type' to perf/event.h 2019-08-28 13:57 ` [PATCH 23/23] libperf: Move 'enum perf_user_event_type' to perf/event.h Jiri Olsa @ 2019-08-29 19:02 ` tip-bot2 for Jiri Olsa 0 siblings, 0 replies; 48+ messages in thread From: tip-bot2 for Jiri Olsa @ 2019-08-29 19:02 UTC (permalink / raw) To: linux-tip-commits Cc: Jiri Olsa, Alexander Shishkin, Michael Petlan, Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov, linux-kernel The following commit has been merged into the perf/core branch of tip: Commit-ID: 653dd8e6e8e46591f864b7ad98e10819079d5a88 Gitweb: https://git.kernel.org/tip/653dd8e6e8e46591f864b7ad98e10819079d5a88 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 28 Aug 2019 15:57:17 +02:00 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitterDate: Thu, 29 Aug 2019 08:36:12 -03:00 libperf: Move 'enum perf_user_event_type' to perf/event.h So it's available for libperf's users. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190828135717.7245-24-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/lib/include/perf/event.h | 23 +++++++++++++++++++++++ tools/perf/util/event.h | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 1655c74..1810689 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -323,6 +323,29 @@ struct perf_record_compressed { char data[]; }; +enum perf_user_event_type { /* above any possible kernel type */ + PERF_RECORD_USER_TYPE_START = 64, + PERF_RECORD_HEADER_ATTR = 64, + PERF_RECORD_HEADER_EVENT_TYPE = 65, /* deprecated */ + PERF_RECORD_HEADER_TRACING_DATA = 66, + PERF_RECORD_HEADER_BUILD_ID = 67, + PERF_RECORD_FINISHED_ROUND = 68, + PERF_RECORD_ID_INDEX = 69, + PERF_RECORD_AUXTRACE_INFO = 70, + PERF_RECORD_AUXTRACE = 71, + PERF_RECORD_AUXTRACE_ERROR = 72, + PERF_RECORD_THREAD_MAP = 73, + PERF_RECORD_CPU_MAP = 74, + PERF_RECORD_STAT_CONFIG = 75, + PERF_RECORD_STAT = 76, + PERF_RECORD_STAT_ROUND = 77, + PERF_RECORD_EVENT_UPDATE = 78, + PERF_RECORD_TIME_CONV = 79, + PERF_RECORD_HEADER_FEATURE = 80, + PERF_RECORD_COMPRESSED = 81, + PERF_RECORD_HEADER_MAX +}; + union perf_event { struct perf_event_header header; struct perf_record_mmap mmap; diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index a7341e1..4c0c523 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -146,29 +146,6 @@ struct perf_sample { PERF_MEM_S(LOCK, NA) |\ PERF_MEM_S(TLB, NA)) -enum perf_user_event_type { /* above any possible kernel type */ - PERF_RECORD_USER_TYPE_START = 64, - PERF_RECORD_HEADER_ATTR = 64, - PERF_RECORD_HEADER_EVENT_TYPE = 65, /* deprecated */ - PERF_RECORD_HEADER_TRACING_DATA = 66, - PERF_RECORD_HEADER_BUILD_ID = 67, - PERF_RECORD_FINISHED_ROUND = 68, - PERF_RECORD_ID_INDEX = 69, - PERF_RECORD_AUXTRACE_INFO = 70, - PERF_RECORD_AUXTRACE = 71, - PERF_RECORD_AUXTRACE_ERROR = 72, - PERF_RECORD_THREAD_MAP = 73, - PERF_RECORD_CPU_MAP = 74, - PERF_RECORD_STAT_CONFIG = 75, - PERF_RECORD_STAT = 76, - PERF_RECORD_STAT_ROUND = 77, - PERF_RECORD_EVENT_UPDATE = 78, - PERF_RECORD_TIME_CONV = 79, - PERF_RECORD_HEADER_FEATURE = 80, - PERF_RECORD_COMPRESSED = 81, - PERF_RECORD_HEADER_MAX -}; - enum auxtrace_error_type { PERF_AUXTRACE_ERROR_ITRACE = 1, PERF_AUXTRACE_ERROR_MAX ^ permalink raw reply related [flat|nested] 48+ messages in thread
* Re: [PATCH 00/23] libperf: Add rest of events to perf/event.h 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa ` (22 preceding siblings ...) 2019-08-28 13:57 ` [PATCH 23/23] libperf: Move 'enum perf_user_event_type' to perf/event.h Jiri Olsa @ 2019-08-28 18:29 ` Arnaldo Carvalho de Melo 23 siblings, 0 replies; 48+ messages in thread From: Arnaldo Carvalho de Melo @ 2019-08-28 18:29 UTC (permalink / raw) To: Jiri Olsa Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin, Peter Zijlstra, Michael Petlan Em Wed, Aug 28, 2019 at 03:56:54PM +0200, Jiri Olsa escreveu: > hi, > to export 'union perf_event' we need to export the rest of events. Thanks, applied to perf/core. - Arnaldo > It's also available in here: > git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git > perf/fixes > > thanks, > jirka > > > --- > Jiri Olsa (23): > libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' to perf/event.h > libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' to perf/event.h > libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' to perf/event.h > libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' to perf/event.h > libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' to perf/event.h > libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' to perf/event.h > libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' to perf/event.h > libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' to perf/event.h > libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' to perf/event.h > libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' to perf/event.h > libperf: Add PERF_RECORD_AUX 'struct aux_event' to perf/event.h > libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' to perf/event.h > libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' to perf/event.h > libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' to perf/event.h > libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' to perf/event.h > libperf: Add PERF_RECORD_STAT 'struct stat_event' to perf/event.h > libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' to perf/event.h > libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' to perf/event.h > libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' to perf/event.h > libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' to perf/event.h > libperf: Add 'union perf_event' to perf/event.h > libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix > libperf: Move 'enum perf_user_event_type' to perf/event.h > > tools/perf/arch/arm/util/cs-etm.c | 4 +-- > tools/perf/arch/arm64/util/arm-spe.c | 2 +- > tools/perf/arch/s390/util/auxtrace.c | 2 +- > tools/perf/arch/x86/util/intel-bts.c | 2 +- > tools/perf/arch/x86/util/intel-pt.c | 4 +-- > tools/perf/arch/x86/util/tsc.c | 2 +- > tools/perf/builtin-record.c | 4 +-- > tools/perf/builtin-report.c | 2 +- > tools/perf/builtin-script.c | 2 +- > tools/perf/builtin-stat.c | 2 +- > tools/perf/lib/include/perf/event.h | 273 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > tools/perf/tests/cpumap.c | 12 ++++---- > tools/perf/tests/event_update.c | 16 +++++----- > tools/perf/tests/stat.c | 8 ++--- > tools/perf/tests/thread-map.c | 2 +- > tools/perf/util/arm-spe.c | 6 ++-- > tools/perf/util/auxtrace.c | 20 ++++++------ > tools/perf/util/auxtrace.h | 8 ++--- > tools/perf/util/build-id.c | 2 +- > tools/perf/util/cpumap.c | 6 ++-- > tools/perf/util/cpumap.h | 4 +-- > tools/perf/util/cs-etm.c | 2 +- > tools/perf/util/event.c | 38 +++++++++++------------ > tools/perf/util/event.h | 278 +++-------------------------------------------------------------------------------------------------------------------------------------------------------------------- > tools/perf/util/header.c | 56 +++++++++++++++++----------------- > tools/perf/util/intel-bts.c | 6 ++-- > tools/perf/util/intel-pt.c | 12 ++++---- > tools/perf/util/python.c | 4 +-- > tools/perf/util/s390-cpumsf.c | 4 +-- > tools/perf/util/session.c | 28 ++++++++--------- > tools/perf/util/session.h | 2 +- > tools/perf/util/stat.c | 12 ++++---- > tools/perf/util/thread_map.c | 4 +-- > tools/perf/util/thread_map.h | 4 +-- > 34 files changed, 418 insertions(+), 415 deletions(-) -- - Arnaldo ^ permalink raw reply [flat|nested] 48+ messages in thread
end of thread, other threads:[~2019-08-29 19:04 UTC | newest] Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-08-28 13:56 [PATCH 00/23] libperf: Add rest of events to perf/event.h Jiri Olsa 2019-08-28 13:56 ` [PATCH 01/23] libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:56 ` [PATCH 02/23] libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:56 ` [PATCH 03/23] libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:56 ` [PATCH 04/23] libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:56 ` [PATCH 05/23] libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 06/23] libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 07/23] libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 08/23] libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 09/23] libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 10/23] libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 11/23] libperf: Add PERF_RECORD_AUX 'struct aux_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 12/23] libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 13/23] libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 14/23] libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 15/23] libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 16/23] libperf: Add PERF_RECORD_STAT 'struct stat_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 17/23] libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 18/23] libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' " Jiri Olsa 2019-08-29 19:01 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 19/23] libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' " Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 20/23] libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' " Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 21/23] libperf: Add 'union perf_event' " Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 22/23] libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 13:57 ` [PATCH 23/23] libperf: Move 'enum perf_user_event_type' to perf/event.h Jiri Olsa 2019-08-29 19:02 ` [tip: perf/core] " tip-bot2 for Jiri Olsa 2019-08-28 18:29 ` [PATCH 00/23] libperf: Add rest of events " Arnaldo Carvalho de Melo
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).