History

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

Linus Torvalds committed 6 years ago

Commit bf121a02 parents d52daa8 39efdd94 files · +8 −6Browse files

Unified · Split

4 files
  1. tools/lib/traceevent/event-parse.c +1 −0
  2. tools/lib/traceevent/plugins/Makefile +1 −1
  3. tools/perf/arch/arm/util/auxtrace.c +4 −4
  4. tools/perf/tests/shell/record+zstd_comp_decomp.sh +2 −1
tools/lib/traceevent/event-parse.c+1−0
@@ -2861,6 +2861,7 @@ process_dynamic_array_len(struct tep_event *event, struct tep_print_arg *arg, · 2860 unmodified lines
2861 if (read_expected(TEP_EVENT_DELIM, ")") < 0)2861 if (read_expected(TEP_EVENT_DELIM, ")") < 0)
2862 goto out_err;2862 goto out_err;
2863 2863
2864 free_token(token);
2864 type = read_token(&token);2865 type = read_token(&token);
2865 *tok = token;2866 *tok = token;
2866 2867
tools/lib/traceevent/plugins/Makefile+1−1
@@ -197,7 +197,7 @@ define do_generate_dynamic_list_file · 196 unmodified lines
197 xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\197 xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
198 if [ "$$symbol_type" = "U W" ];then \198 if [ "$$symbol_type" = "U W" ];then \
199 (echo '{'; \199 (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;\
201 echo '};'; \201 echo '};'; \
202 ) > $2; \202 ) > $2; \
203 else \203 else \
tools/perf/arch/arm/util/auxtrace.c+4−4
@@ -56,7 +56,7 @@ struct auxtrace_record · 55 unmodified lines
56 struct perf_pmu *cs_etm_pmu;56 struct perf_pmu *cs_etm_pmu;
57 struct evsel *evsel;57 struct evsel *evsel;
58 bool found_etm = false;58 bool found_etm = false;
59 bool found_spe = false;59 struct perf_pmu *found_spe = NULL;
60 static struct perf_pmu **arm_spe_pmus = NULL;60 static struct perf_pmu **arm_spe_pmus = NULL;
61 static int nr_spes = 0;61 static int nr_spes = 0;
62 int i = 0;62 int i = 0;
@@ -74,12 +74,12 @@ struct auxtrace_record · 11 unmodified lines
74 evsel->core.attr.type == cs_etm_pmu->type)74 evsel->core.attr.type == cs_etm_pmu->type)
75 found_etm = true;75 found_etm = true;
76 76
77 if (!nr_spes)77 if (!nr_spes || found_spe)
78 continue;78 continue;
79 79
80 for (i = 0; i < nr_spes; i++) {80 for (i = 0; i < nr_spes; i++) {
81 if (evsel->core.attr.type == arm_spe_pmus[i]->type) {81 if (evsel->core.attr.type == arm_spe_pmus[i]->type) {
82 found_spe = true;82 found_spe = arm_spe_pmus[i];
83 break;83 break;
84 }84 }
85 }85 }
@@ -96,7 +96,7 @@ struct auxtrace_record · 10 unmodified lines
96 96
97#if defined(__aarch64__)97#if defined(__aarch64__)
98 if (found_spe)98 if (found_spe)
99 return arm_spe_recording_init(err, arm_spe_pmus[i]);99 return arm_spe_recording_init(err, found_spe);
100#endif100#endif
101 101
102 /*102 /*
tools/perf/tests/shell/record+zstd_comp_decomp.sh+2−1
@@ -12,7 +12,8 @@ skip_if_no_z_record() { · 11 unmodified lines
12 12
13collect_z_record() {13collect_z_record() {
14 echo "Collecting compressed record file:"14 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 -- \
16 dd count=500 if=/dev/urandom of=/dev/null17 dd count=500 if=/dev/urandom of=/dev/null
17}18}
18 19