Skip to content

Commit 14df923

Browse files
committed
Merge tag 'perf-tools-fixes-for-v5.15-2021-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix plugin static linking with libopencsd on ARM and ARM64 - Add missing -lstdc++ when linking with libopencsd - Add missing topdown metrics events to 'perf test attr' - Plug leak sys_event_tables list after processing JSON vendor events entries - Sync sound/asound.h copy with the kernel sources * tag 'perf-tools-fixes-for-v5.15-2021-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf tests attr: Add missing topdown metrics events tools include UAPI: Sync sound/asound.h copy with the kernel sources perf build: Fix plugin static linking with libopencsd on ARM and ARM64 perf build: Add missing -lstdc++ when linking with libopencsd perf jevents: Free the sys_event_tables list after processing entries
2 parents 4a16df5 + 0b6c537 commit 14df923

File tree

8 files changed

+445
-54
lines changed

8 files changed

+445
-54
lines changed

tools/include/uapi/sound/asound.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ struct snd_rawmidi_status {
784784

785785
#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
786786
#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
787+
#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int)
787788
#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
788789
#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
789790
#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)

tools/perf/Makefile.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ FEATURE_CHECK_LDFLAGS-libcrypto = -lcrypto
143143
ifdef CSINCLUDES
144144
LIBOPENCSD_CFLAGS := -I$(CSINCLUDES)
145145
endif
146-
OPENCSDLIBS := -lopencsd_c_api -lopencsd
146+
OPENCSDLIBS := -lopencsd_c_api -lopencsd -lstdc++
147147
ifdef CSLIBS
148148
LIBOPENCSD_LDFLAGS := -L$(CSLIBS)
149149
endif

tools/perf/Makefile.perf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ endif
802802

803803
$(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h)
804804

805-
LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) 'EXTRA_CFLAGS=$(EXTRA_CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
805+
LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) 'EXTRA_CFLAGS=$(EXTRA_CFLAGS)' 'LDFLAGS=$(filter-out -static,$(LDFLAGS))'
806806

807807
$(LIBTRACEEVENT): FORCE
808808
$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a

tools/perf/pmu-events/jevents.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,7 @@ int main(int argc, char *argv[])
12851285
}
12861286

12871287
free_arch_std_events();
1288+
free_sys_event_tables();
12881289
free(mapfile);
12891290
return 0;
12901291

@@ -1306,6 +1307,7 @@ int main(int argc, char *argv[])
13061307
create_empty_mapping(output_file);
13071308
err_out:
13081309
free_arch_std_events();
1310+
free_sys_event_tables();
13091311
free(mapfile);
13101312
return ret;
13111313
}

tools/perf/tests/attr/test-stat-default

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,100 @@ fd=10
6868
type=0
6969
config=5
7070
optional=1
71+
72+
# PERF_TYPE_RAW / slots (0x400)
73+
[event11:base-stat]
74+
fd=11
75+
group_fd=-1
76+
type=4
77+
config=1024
78+
read_format=15
79+
optional=1
80+
81+
# PERF_TYPE_RAW / topdown-retiring (0x8000)
82+
[event12:base-stat]
83+
fd=12
84+
group_fd=11
85+
type=4
86+
config=32768
87+
disabled=0
88+
enable_on_exec=0
89+
read_format=15
90+
optional=1
91+
92+
# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
93+
[event13:base-stat]
94+
fd=13
95+
group_fd=11
96+
type=4
97+
config=33024
98+
disabled=0
99+
enable_on_exec=0
100+
read_format=15
101+
optional=1
102+
103+
# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
104+
[event14:base-stat]
105+
fd=14
106+
group_fd=11
107+
type=4
108+
config=33280
109+
disabled=0
110+
enable_on_exec=0
111+
read_format=15
112+
optional=1
113+
114+
# PERF_TYPE_RAW / topdown-be-bound (0x8300)
115+
[event15:base-stat]
116+
fd=15
117+
group_fd=11
118+
type=4
119+
config=33536
120+
disabled=0
121+
enable_on_exec=0
122+
read_format=15
123+
optional=1
124+
125+
# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
126+
[event16:base-stat]
127+
fd=16
128+
group_fd=11
129+
type=4
130+
config=33792
131+
disabled=0
132+
enable_on_exec=0
133+
read_format=15
134+
optional=1
135+
136+
# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
137+
[event17:base-stat]
138+
fd=17
139+
group_fd=11
140+
type=4
141+
config=34048
142+
disabled=0
143+
enable_on_exec=0
144+
read_format=15
145+
optional=1
146+
147+
# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
148+
[event18:base-stat]
149+
fd=18
150+
group_fd=11
151+
type=4
152+
config=34304
153+
disabled=0
154+
enable_on_exec=0
155+
read_format=15
156+
optional=1
157+
158+
# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
159+
[event19:base-stat]
160+
fd=19
161+
group_fd=11
162+
type=4
163+
config=34560
164+
disabled=0
165+
enable_on_exec=0
166+
read_format=15
167+
optional=1

tools/perf/tests/attr/test-stat-detailed-1

Lines changed: 105 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,109 @@ type=0
7070
config=5
7171
optional=1
7272

73+
# PERF_TYPE_RAW / slots (0x400)
74+
[event11:base-stat]
75+
fd=11
76+
group_fd=-1
77+
type=4
78+
config=1024
79+
read_format=15
80+
optional=1
81+
82+
# PERF_TYPE_RAW / topdown-retiring (0x8000)
83+
[event12:base-stat]
84+
fd=12
85+
group_fd=11
86+
type=4
87+
config=32768
88+
disabled=0
89+
enable_on_exec=0
90+
read_format=15
91+
optional=1
92+
93+
# PERF_TYPE_RAW / topdown-bad-spec (0x8100)
94+
[event13:base-stat]
95+
fd=13
96+
group_fd=11
97+
type=4
98+
config=33024
99+
disabled=0
100+
enable_on_exec=0
101+
read_format=15
102+
optional=1
103+
104+
# PERF_TYPE_RAW / topdown-fe-bound (0x8200)
105+
[event14:base-stat]
106+
fd=14
107+
group_fd=11
108+
type=4
109+
config=33280
110+
disabled=0
111+
enable_on_exec=0
112+
read_format=15
113+
optional=1
114+
115+
# PERF_TYPE_RAW / topdown-be-bound (0x8300)
116+
[event15:base-stat]
117+
fd=15
118+
group_fd=11
119+
type=4
120+
config=33536
121+
disabled=0
122+
enable_on_exec=0
123+
read_format=15
124+
optional=1
125+
126+
# PERF_TYPE_RAW / topdown-heavy-ops (0x8400)
127+
[event16:base-stat]
128+
fd=16
129+
group_fd=11
130+
type=4
131+
config=33792
132+
disabled=0
133+
enable_on_exec=0
134+
read_format=15
135+
optional=1
136+
137+
# PERF_TYPE_RAW / topdown-br-mispredict (0x8500)
138+
[event17:base-stat]
139+
fd=17
140+
group_fd=11
141+
type=4
142+
config=34048
143+
disabled=0
144+
enable_on_exec=0
145+
read_format=15
146+
optional=1
147+
148+
# PERF_TYPE_RAW / topdown-fetch-lat (0x8600)
149+
[event18:base-stat]
150+
fd=18
151+
group_fd=11
152+
type=4
153+
config=34304
154+
disabled=0
155+
enable_on_exec=0
156+
read_format=15
157+
optional=1
158+
159+
# PERF_TYPE_RAW / topdown-mem-bound (0x8700)
160+
[event19:base-stat]
161+
fd=19
162+
group_fd=11
163+
type=4
164+
config=34560
165+
disabled=0
166+
enable_on_exec=0
167+
read_format=15
168+
optional=1
169+
73170
# PERF_TYPE_HW_CACHE /
74171
# PERF_COUNT_HW_CACHE_L1D << 0 |
75172
# (PERF_COUNT_HW_CACHE_OP_READ << 8) |
76173
# (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16)
77-
[event11:base-stat]
78-
fd=11
174+
[event20:base-stat]
175+
fd=20
79176
type=3
80177
config=0
81178
optional=1
@@ -84,8 +181,8 @@ optional=1
84181
# PERF_COUNT_HW_CACHE_L1D << 0 |
85182
# (PERF_COUNT_HW_CACHE_OP_READ << 8) |
86183
# (PERF_COUNT_HW_CACHE_RESULT_MISS << 16)
87-
[event12:base-stat]
88-
fd=12
184+
[event21:base-stat]
185+
fd=21
89186
type=3
90187
config=65536
91188
optional=1
@@ -94,8 +191,8 @@ optional=1
94191
# PERF_COUNT_HW_CACHE_LL << 0 |
95192
# (PERF_COUNT_HW_CACHE_OP_READ << 8) |
96193
# (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16)
97-
[event13:base-stat]
98-
fd=13
194+
[event22:base-stat]
195+
fd=22
99196
type=3
100197
config=2
101198
optional=1
@@ -104,8 +201,8 @@ optional=1
104201
# PERF_COUNT_HW_CACHE_LL << 0 |
105202
# (PERF_COUNT_HW_CACHE_OP_READ << 8) |
106203
# (PERF_COUNT_HW_CACHE_RESULT_MISS << 16)
107-
[event14:base-stat]
108-
fd=14
204+
[event23:base-stat]
205+
fd=23
109206
type=3
110207
config=65538
111208
optional=1

0 commit comments

Comments
 (0)