libperf: Add rest of events to perf/event.h
Jiri Olsa
reviewercover libperf: Add rest of events to perf/event.h
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(-)
Jiri Olsa
reviewerPATCH 1/23 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.
--- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
tools/perf/lib/include/perf/event.h +6 -0
@@ -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 */
tools/perf/util/event.h +0 -6
@@ -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 ,
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_HEADER_ATTR 'struct attr_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:56:55 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
tools/perf/lib/include/perf/event.h +6 -0
@@ -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 */
tools/perf/util/event.h +0 -6
@@ -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 ,
Jiri Olsa
reviewerPATCH 2/23 libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 26 ++++++++++++++++++++++++++ tools/perf/util/event.h | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-)
tools/perf/lib/include/perf/event.h +26 -0
@@ -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 */
tools/perf/util/event.h +0 -26
@@ -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 ,
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_CPU_MAP 'struct cpu_map_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:56:56 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 26 ++++++++++++++++++++++++++ tools/perf/util/event.h | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-)
tools/perf/lib/include/perf/event.h +26 -0
@@ -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 */
tools/perf/util/event.h +0 -26
@@ -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 ,
Jiri Olsa
reviewerPATCH 3/23 libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +22 -0
@@ -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 */
tools/perf/util/event.h +0 -23
@@ -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 64struct perf_trace_event_type {
tools/perf/util/header.c +1 -1
@@ -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 :
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_EVENT_UPDATE 'struct event_update_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:56:57 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +22 -0
@@ -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 */
tools/perf/util/event.h +0 -23
@@ -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 64struct perf_trace_event_type {
tools/perf/util/header.c +1 -1
@@ -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 :
Jiri Olsa
reviewerPATCH 4/23 libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 12 ++++++++++++ tools/perf/util/event.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-)
tools/perf/lib/include/perf/event.h +12 -0
@@ -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 */
tools/perf/util/event.h +0 -12
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_HEADER_EVENT_TYPE 'struct event_type_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:56:58 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 12 ++++++++++++ tools/perf/util/event.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-)
tools/perf/lib/include/perf/event.h +12 -0
@@ -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 */
tools/perf/util/event.h +0 -12
@@ -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;
Jiri Olsa
reviewerPATCH 5/23 libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 5 +++++ tools/perf/util/event.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)
tools/perf/lib/include/perf/event.h +5 -0
@@ -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 */
tools/perf/util/event.h +0 -5
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_HEADER_TRACING_DATA 'struct tracing_data_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:56:59 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 5 +++++ tools/perf/util/event.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)
tools/perf/lib/include/perf/event.h +5 -0
@@ -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 */
tools/perf/util/event.h +0 -5
@@ -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;
Jiri Olsa
reviewerPATCH 6/23 libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 8 ++++++++ tools/perf/util/event.h | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-)
tools/perf/lib/include/perf/event.h +8 -0
@@ -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 */
tools/perf/util/event.h +0 -7
@@ -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,
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_HEADER_BUILD_ID 'struct build_id_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:00 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 8 ++++++++ tools/perf/util/event.h | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-)
tools/perf/lib/include/perf/event.h +8 -0
@@ -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 */
tools/perf/util/event.h +0 -7
@@ -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,
Jiri Olsa
reviewerPATCH 7/23 libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +13 -0
@@ -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 */
tools/perf/util/event.h +2 -13
@@ -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;
tools/perf/util/session.c +4 -4
@@ -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);
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_ID_INDEX 'struct id_index_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:01 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +13 -0
@@ -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 */
tools/perf/util/event.h +2 -13
@@ -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;
tools/perf/util/session.c +4 -4
@@ -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);
Jiri Olsa
reviewerPATCH 8/23 libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/arch/x86/util/intel-pt.c +1 -1
@@ -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)
tools/perf/lib/include/perf/event.h +7 -0
@@ -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 */
tools/perf/util/arm-spe.c +1 -1
@@ -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 ;
tools/perf/util/event.h +0 -7
@@ -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;
tools/perf/util/intel-bts.c +1 -1
@@ -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;
tools/perf/util/intel-pt.c +2 -2
@@ -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) +
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_AUXTRACE_INFO 'struct auxtrace_info_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:02 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/arch/x86/util/intel-pt.c +1 -1
@@ -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)
tools/perf/lib/include/perf/event.h +7 -0
@@ -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 */
tools/perf/util/arm-spe.c +1 -1
@@ -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 ;
tools/perf/util/cs-etm.c +1 -1
@@ -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 ;
tools/perf/util/event.h +0 -7
@@ -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;
tools/perf/util/intel-bts.c +1 -1
@@ -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;
tools/perf/util/intel-pt.c +2 -2
@@ -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) +
Jiri Olsa
reviewerPATCH 9/23 libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +11 -0
@@ -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 */
tools/perf/util/auxtrace.c +1 -1
@@ -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);
tools/perf/util/event.h +0 -11
@@ -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 64struct auxtrace_error_event {
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:03 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +11 -0
@@ -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 */
tools/perf/util/auxtrace.c +1 -1
@@ -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);
tools/perf/util/event.h +0 -11
@@ -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 64struct auxtrace_error_event {
Jiri Olsa
reviewerPATCH 10/23 libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +15 -0
@@ -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 */
tools/perf/util/auxtrace.c +1 -1
@@ -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; }
tools/perf/util/event.h +0 -15
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_AUXTRACE_ERROR 'struct auxtrace_error_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:04 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +15 -0
@@ -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 */
tools/perf/util/auxtrace.c +1 -1
@@ -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; }
tools/perf/util/event.h +0 -15
@@ -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;
Jiri Olsa
reviewerPATCH 11/23 libperf: Add PERF_RECORD_AUX 'struct aux_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +7 -0
@@ -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 */
tools/perf/util/event.c +1 -1
@@ -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" : "",
tools/perf/util/event.h +0 -7
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_AUX 'struct aux_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:05 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +7 -0
@@ -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 */
tools/perf/util/event.c +1 -1
@@ -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" : "",
tools/perf/util/event.h +0 -7
@@ -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;
Jiri Olsa
reviewerPATCH 12/23 libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-)
tools/perf/lib/include/perf/event.h +6 -0
@@ -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 */
tools/perf/util/event.h +0 -5
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_ITRACE_START 'struct itrace_start_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:06 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-)
tools/perf/lib/include/perf/event.h +6 -0
@@ -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 */
tools/perf/util/event.h +0 -5
@@ -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;
Jiri Olsa
reviewerPATCH 13/23 libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
tools/perf/lib/include/perf/event.h +6 -0
@@ -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;
tools/perf/util/event.h +0 -6
@@ -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 ];
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_SWITCH 'struct context_switch_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:07 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 6 ++++++ tools/perf/util/event.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
tools/perf/lib/include/perf/event.h +6 -0
@@ -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;
tools/perf/util/event.h +0 -6
@@ -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 ];
Jiri Olsa
reviewerPATCH 14/23 libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 11 +++++++++++ tools/perf/util/event.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-)
tools/perf/lib/include/perf/event.h +11 -0
@@ -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 */
tools/perf/util/event.h +0 -11
@@ -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 ,
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_THREAD_MAP 'struct thread_map_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:08 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 11 +++++++++++ tools/perf/util/event.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-)
tools/perf/lib/include/perf/event.h +11 -0
@@ -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 */
tools/perf/util/event.h +0 -11
@@ -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 ,
Jiri Olsa
reviewerPATCH 15/23 libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +18 -0
@@ -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 */
tools/perf/util/event.c +1 -1
@@ -1234,7 +1234,7 @@ void perf_event__read_stat_config(struct perf_stat_config *config, CASE(INTERVAL, interval)#undef CASEdefault : -pr_warning ("unknown stat config term %" PRIu64"\n" , +pr_warning ("unknown stat config term %" PRI_lu64"\n" , event->data[i].tag); } }
tools/perf/util/event.h +0 -18
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_STAT_CONFIG 'struct stat_config_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:09 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +18 -0
@@ -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 */
tools/perf/util/event.c +1 -1
@@ -1235,7 +1235,7 @@ void perf_event__read_stat_config(struct perf_stat_config *config, CASE(INTERVAL, interval)#undef CASEdefault : -pr_warning ("unknown stat config term %" PRIu64"\n" , +pr_warning ("unknown stat config term %" PRI_lu64"\n" , event->data[i].tag); } }
tools/perf/util/event.h +0 -18
@@ -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;
Jiri Olsa
reviewerPATCH 16/23 libperf: Add PERF_RECORD_STAT 'struct stat_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +17 -0
@@ -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 */
tools/perf/util/event.h +0 -17
@@ -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 ,
tools/perf/util/stat.c +2 -2
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_STAT 'struct stat_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:10 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +17 -0
@@ -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 */
tools/perf/util/event.h +0 -17
@@ -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 ,
tools/perf/util/stat.c +2 -2
@@ -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;
Jiri Olsa
reviewerPATCH 17/23 libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +6 -0
@@ -299,4 +299,10 @@ struct stat_event { }; }; +struct stat_round_event { +struct perf_event_header header; +__u64 type; +__u64 time; +}; +#endif /* __LIBPERF_EVENT_H */
tools/perf/util/event.h +0 -6
@@ -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;
tools/perf/util/stat.c +1 -1
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_STAT_ROUND 'struct stat_round_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:11 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/lib/include/perf/event.h +6 -0
@@ -299,4 +299,10 @@ struct stat_event { }; }; +struct stat_round_event { +struct perf_event_header header; +__u64 type; +__u64 time; +}; +#endif /* __LIBPERF_EVENT_H */
tools/perf/util/event.h +0 -6
@@ -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;
tools/perf/util/stat.c +1 -1
@@ -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;
Jiri Olsa
reviewerPATCH 18/23 libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 7 +++++++ tools/perf/util/event.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-)
tools/perf/lib/include/perf/event.h +7 -0
@@ -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 */
tools/perf/util/event.h +0 -7
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_TIME_CONV 'struct time_conv_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:12 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 7 +++++++ tools/perf/util/event.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-)
tools/perf/lib/include/perf/event.h +7 -0
@@ -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 */
tools/perf/util/event.h +0 -7
@@ -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;
Jiri Olsa
reviewerPATCH 19/23 libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- 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(-)
tools/perf/builtin-report.c +1 -1
@@ -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 ; }
tools/perf/lib/include/perf/event.h +6 -0
@@ -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 */
tools/perf/util/event.h +0 -6
@@ -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[];
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_HEADER_FEATURE 'struct feature_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:13 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/builtin-report.c +1 -1
@@ -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 ; }
tools/perf/lib/include/perf/event.h +6 -0
@@ -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 */
tools/perf/util/event.h +0 -6
@@ -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[];
Jiri Olsa
reviewerPATCH 20/23 libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' to perf/event.h
In reply to Jiri OlsaMove 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.
--- tools/perf/lib/include/perf/event.h | 5 +++++ tools/perf/util/event.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)
tools/perf/lib/include/perf/event.h +5 -0
@@ -318,4 +318,9 @@ struct feature_event { char data[]; }; +struct compressed_event { +struct perf_event_header header; +char data[]; +}; +#endif /* __LIBPERF_EVENT_H */
tools/perf/util/event.h +0 -5
@@ -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;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add PERF_RECORD_COMPRESSED 'struct compressed_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:14 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 5 +++++ tools/perf/util/event.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)
tools/perf/lib/include/perf/event.h +5 -0
@@ -318,4 +318,9 @@ struct feature_event { char data[]; }; +struct compressed_event { +struct perf_event_header header; +char data[]; +}; +#endif /* __LIBPERF_EVENT_H */
tools/perf/util/event.h +0 -5
@@ -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;
Jiri Olsa
reviewerPATCH 21/23 libperf: Add 'union perf_event' to perf/event.h
In reply to Jiri OlsaSo it's available for libperf's users.
--- tools/perf/lib/include/perf/event.h | 36 +++++++++++++++++++++++++++++ tools/perf/util/event.h | 36 ----------------------------- 2 files changed, 36 insertions(+), 36 deletions(-)
tools/perf/lib/include/perf/event.h +36 -0
@@ -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 */
tools/perf/util/event.h +0 -36
@@ -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 ;
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Add 'union perf_event' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:15 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 36 ++++++++++++++++++++++++++++- tools/perf/util/event.h | 36 +---------------------------- 2 files changed, 36 insertions(+), 36 deletions(-)
tools/perf/lib/include/perf/event.h +36 -0
@@ -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 */
tools/perf/util/event.h +0 -36
@@ -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 ;
Jiri Olsa
reviewerPATCH 22/23 libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix
In reply to Jiri OlsaEven more, to have a "perf_record_" prefix, so that they match the PERF_RECORD_ enum they map to.
--- 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(-)
tools/perf/arch/arm/util/cs-etm.c +2 -2
@@ -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;
tools/perf/arch/arm64/util/arm-spe.c +1 -1
@@ -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 =
tools/perf/arch/s390/util/auxtrace.c +1 -1
@@ -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 ;
tools/perf/arch/x86/util/intel-bts.c +1 -1
@@ -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 =
tools/perf/arch/x86/util/intel-pt.c +1 -1
@@ -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 =
tools/perf/arch/x86/util/tsc.c +1 -1
@@ -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), }, }, };
tools/perf/builtin-record.c +2 -2
@@ -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);
tools/perf/builtin-script.c +1 -1
@@ -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) {
tools/perf/builtin-stat.c +1 -1
@@ -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;
tools/perf/lib/include/perf/event.h +68 -68
270 lines not on this page · raw message
tools/perf/tests/cpumap.c +6 -6
@@ -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;
tools/perf/tests/event_update.c +8 -8
@@ -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);
tools/perf/tests/stat.c +4 -4
@@ -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 );
tools/perf/tests/thread-map.c +1 -1
@@ -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 );
tools/perf/util/arm-spe.c +2 -2
@@ -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 ;
tools/perf/util/auxtrace.c +8 -8
@@ -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 ;
tools/perf/util/auxtrace.h +4 -4
@@ -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);
tools/perf/util/build-id.c +1 -1
@@ -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 ;
tools/perf/util/cpumap.c +3 -3
@@ -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)
tools/perf/util/cpumap.h +2 -2
@@ -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);
tools/perf/util/cs-etm.c +1 -1
@@ -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;
tools/perf/util/event.c +17 -17
@@ -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 *masynthesize_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;
tools/perf/util/event.h +2 -2
@@ -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);
tools/perf/util/header.c +27 -27
173 lines not on this page · raw message
tools/perf/util/intel-bts.c +2 -2
@@ -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 ;
tools/perf/util/intel-pt.c +4 -4
@@ -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 ;
tools/perf/util/python.c +2 -2
@@ -431,8 +431,8 @@ static char pyrf_context_switch_event__doc[] = PyDoc_STR("perf context_switch evstatic PyMemberDef pyrf_context_switch_event__members[] = { sample_membersmember_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 , }, };
tools/perf/util/s390-cpumsf.c +2 -2
@@ -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 ));
tools/perf/util/session.c +10 -10
@@ -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;
tools/perf/util/session.h +1 -1
@@ -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;
tools/perf/util/stat.c +3 -3
@@ -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,
tools/perf/util/thread_map.c +2 -2
@@ -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;
tools/perf/util/thread_map.h +2 -2
@@ -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);
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Rename the PERF_RECORD_ structs to have a "perf" prefix
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:16 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- 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(-)
tools/perf/arch/arm/util/cs-etm.c +2 -2
@@ -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;
tools/perf/arch/arm64/util/arm-spe.c +1 -1
@@ -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 =
tools/perf/arch/s390/util/auxtrace.c +1 -1
@@ -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 ;
tools/perf/arch/x86/util/intel-bts.c +1 -1
@@ -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 =
tools/perf/arch/x86/util/intel-pt.c +1 -1
@@ -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 =
tools/perf/arch/x86/util/tsc.c +1 -1
@@ -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), }, }, };
tools/perf/builtin-record.c +2 -2
@@ -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);
tools/perf/builtin-script.c +1 -1
@@ -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) {
tools/perf/builtin-stat.c +1 -1
@@ -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;
tools/perf/lib/include/perf/event.h +68 -68
270 lines not on this page · raw message
tools/perf/tests/cpumap.c +6 -6
@@ -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;
tools/perf/tests/event_update.c +8 -8
@@ -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);
tools/perf/tests/stat.c +4 -4
@@ -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 );
tools/perf/tests/thread-map.c +1 -1
@@ -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 );
tools/perf/util/arm-spe.c +2 -2
@@ -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 ;
tools/perf/util/auxtrace.c +8 -8
@@ -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 ;
tools/perf/util/auxtrace.h +4 -4
@@ -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);
tools/perf/util/build-id.c +1 -1
@@ -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 ;
tools/perf/util/cpumap.c +3 -3
@@ -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)
tools/perf/util/cpumap.h +2 -2
@@ -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);
tools/perf/util/cs-etm.c +1 -1
@@ -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;
tools/perf/util/event.c +17 -17
@@ -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 *masynthesize_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;
tools/perf/util/event.h +2 -2
@@ -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);
tools/perf/util/header.c +27 -27
173 lines not on this page · raw message
tools/perf/util/intel-bts.c +2 -2
@@ -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 ;
tools/perf/util/intel-pt.c +4 -4
@@ -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 ;
tools/perf/util/python.c +2 -2
@@ -431,8 +431,8 @@ static char pyrf_context_switch_event__doc[] = PyDoc_STR("perf context_switch evstatic PyMemberDef pyrf_context_switch_event__members[] = { sample_membersmember_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 , }, };
tools/perf/util/s390-cpumsf.c +2 -2
@@ -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 ));
tools/perf/util/session.c +10 -10
@@ -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;
tools/perf/util/session.h +1 -1
@@ -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;
tools/perf/util/stat.c +3 -3
@@ -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,
tools/perf/util/thread_map.c +2 -2
@@ -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;
tools/perf/util/thread_map.h +2 -2
@@ -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);
Jiri Olsa
reviewerPATCH 23/23 libperf: Move 'enum perf_user_event_type' to perf/event.h
In reply to Jiri OlsaSo it's available for libperf's users.
--- tools/perf/lib/include/perf/event.h | 23 +++++++++++++++++++++++ tools/perf/util/event.h | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-)
tools/perf/lib/include/perf/event.h +23 -0
@@ -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;
tools/perf/util/event.h +0 -23
@@ -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
Signature · 1 line
2.21.0
[tip: perf/core] libperf: Move 'enum perf_user_event_type' to perf/event.h
The following commit has been merged into the perf/core branch of tip:
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 <[email protected]> AuthorDate: Wed, 28 Aug 2019 15:57:17 +02:00 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/lib/include/perf/event.h | 23 +++++++++++++++++++++++ tools/perf/util/event.h | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-)
tools/perf/lib/include/perf/event.h +23 -0
@@ -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;
tools/perf/util/event.h +0 -23
@@ -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
Arnaldo Carvalho de Melo
AppliedEm Wed, Aug 28, 2019 at 03:56:54PM +0200, Jiri Olsa escreveu:
Quoted 2 lines
hi,
to export 'unionperf_event' we need to export the rest of events.
Thanks, applied to perf/core.
- Arnaldo
Quoted 69 lines
It's also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/fixesthanks,
jirka---
Jiri Olsa (23):
libperf: AddPERF_RECORD_HEADER_ATTR'structattr_event' toperf/event.h
libperf: AddPERF_RECORD_CPU_MAP'structcpu_map_event' toperf/event.h
libperf: AddPERF_RECORD_EVENT_UPDATE'structevent_update_event' toperf/event.h
libperf: AddPERF_RECORD_HEADER_EVENT_TYPE'structevent_type_event' toperf/event.h
libperf: AddPERF_RECORD_HEADER_TRACING_DATA'structtracing_data_event' toperf/event.h
libperf: AddPERF_RECORD_HEADER_BUILD_ID'structbuild_id_event' toperf/event.h
libperf: AddPERF_RECORD_ID_INDEX'structid_index_event' toperf/event.h
libperf: AddPERF_RECORD_AUXTRACE_INFO'structauxtrace_info_event' toperf/event.h
libperf: AddPERF_RECORD_AUXTRACE'structauxtrace_event' toperf/event.h
libperf: AddPERF_RECORD_AUXTRACE_ERROR'structauxtrace_error_event' toperf/event.h
libperf: AddPERF_RECORD_AUX'structaux_event' toperf/event.h
libperf: AddPERF_RECORD_ITRACE_START'structitrace_start_event' toperf/event.h
libperf: AddPERF_RECORD_SWITCH'structcontext_switch_event' toperf/event.h
libperf: AddPERF_RECORD_THREAD_MAP'structthread_map_event' toperf/event.h
libperf: AddPERF_RECORD_STAT_CONFIG'structstat_config_event' toperf/event.h
libperf: AddPERF_RECORD_STAT'structstat_event' toperf/event.h
libperf: AddPERF_RECORD_STAT_ROUND'structstat_round_event' toperf/event.h
libperf: AddPERF_RECORD_TIME_CONV'structtime_conv_event' toperf/event.h
libperf: AddPERF_RECORD_HEADER_FEATURE'structfeature_event' toperf/event.h
libperf: AddPERF_RECORD_COMPRESSED'structcompressed_event' toperf/event.h
libperf: Add 'unionperf_event' toperf/event.h
libperf: Rename thePERF_RECORD_structs to have a "perf" prefix
libperf: Move 'enumperf_user_event_type' toperf/event.htools/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(-)
Signature · 1 line
- Arnaldo