Skip to content

Commit bf121a0

Browse files
committed
Merge tag 'perf-tools-fixes-2020-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tooling fixes from Arnaldo Carvalho de Melo: - Fix libtraceevent build with binutils 2.35 - Fix memory leak in process_dynamic_array_len in libtraceevent - Fix 'perf test 68' zstd compression for s390 - Fix record failure when mixed with ARM SPE event * tag 'perf-tools-fixes-2020-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: libtraceevent: Fix build with binutils 2.35 perf tools: Fix record failure when mixed with ARM SPE event perf tests: Fix test 68 zstd compression for s390 tools lib traceevent: Fix memory leak in process_dynamic_array_len
2 parents d52daa8 + 39efdd9 commit bf121a0

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

tools/lib/traceevent/event-parse.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,6 +2861,7 @@ process_dynamic_array_len(struct tep_event *event, struct tep_print_arg *arg,
28612861
if (read_expected(TEP_EVENT_DELIM, ")") < 0)
28622862
goto out_err;
28632863

2864+
free_token(token);
28642865
type = read_token(&token);
28652866
*tok = token;
28662867

tools/lib/traceevent/plugins/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ define do_generate_dynamic_list_file
197197
xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
198198
if [ "$$symbol_type" = "U W" ];then \
199199
(echo '{'; \
200-
$(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
200+
$(NM) -u -D $1 | awk 'NF>1 {sub("@.*", "", $$2); print "\t"$$2";"}' | sort -u;\
201201
echo '};'; \
202202
) > $2; \
203203
else \

tools/perf/arch/arm/util/auxtrace.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct auxtrace_record
5656
struct perf_pmu *cs_etm_pmu;
5757
struct evsel *evsel;
5858
bool found_etm = false;
59-
bool found_spe = false;
59+
struct perf_pmu *found_spe = NULL;
6060
static struct perf_pmu **arm_spe_pmus = NULL;
6161
static int nr_spes = 0;
6262
int i = 0;
@@ -74,12 +74,12 @@ struct auxtrace_record
7474
evsel->core.attr.type == cs_etm_pmu->type)
7575
found_etm = true;
7676

77-
if (!nr_spes)
77+
if (!nr_spes || found_spe)
7878
continue;
7979

8080
for (i = 0; i < nr_spes; i++) {
8181
if (evsel->core.attr.type == arm_spe_pmus[i]->type) {
82-
found_spe = true;
82+
found_spe = arm_spe_pmus[i];
8383
break;
8484
}
8585
}
@@ -96,7 +96,7 @@ struct auxtrace_record
9696

9797
#if defined(__aarch64__)
9898
if (found_spe)
99-
return arm_spe_recording_init(err, arm_spe_pmus[i]);
99+
return arm_spe_recording_init(err, found_spe);
100100
#endif
101101

102102
/*

tools/perf/tests/shell/record+zstd_comp_decomp.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ skip_if_no_z_record() {
1212

1313
collect_z_record() {
1414
echo "Collecting compressed record file:"
15-
$perf_tool record -o $trace_file -g -z -F 5000 -- \
15+
[[ "$(uname -m)" != s390x ]] && gflag='-g'
16+
$perf_tool record -o $trace_file $gflag -z -F 5000 -- \
1617
dd count=500 if=/dev/urandom of=/dev/null
1718
}
1819

0 commit comments

Comments
 (0)