mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-03 15:04:49 -05:00
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
This commit is contained in:
@@ -2861,6 +2861,7 @@ process_dynamic_array_len(struct tep_event *event, struct tep_print_arg *arg,
|
||||
if (read_expected(TEP_EVENT_DELIM, ")") < 0)
|
||||
goto out_err;
|
||||
|
||||
free_token(token);
|
||||
type = read_token(&token);
|
||||
*tok = token;
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ define do_generate_dynamic_list_file
|
||||
xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
|
||||
if [ "$$symbol_type" = "U W" ];then \
|
||||
(echo '{'; \
|
||||
$(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
|
||||
$(NM) -u -D $1 | awk 'NF>1 {sub("@.*", "", $$2); print "\t"$$2";"}' | sort -u;\
|
||||
echo '};'; \
|
||||
) > $2; \
|
||||
else \
|
||||
|
||||
@@ -56,7 +56,7 @@ struct auxtrace_record
|
||||
struct perf_pmu *cs_etm_pmu;
|
||||
struct evsel *evsel;
|
||||
bool found_etm = false;
|
||||
bool found_spe = false;
|
||||
struct perf_pmu *found_spe = NULL;
|
||||
static struct perf_pmu **arm_spe_pmus = NULL;
|
||||
static int nr_spes = 0;
|
||||
int i = 0;
|
||||
@@ -74,12 +74,12 @@ struct auxtrace_record
|
||||
evsel->core.attr.type == cs_etm_pmu->type)
|
||||
found_etm = true;
|
||||
|
||||
if (!nr_spes)
|
||||
if (!nr_spes || found_spe)
|
||||
continue;
|
||||
|
||||
for (i = 0; i < nr_spes; i++) {
|
||||
if (evsel->core.attr.type == arm_spe_pmus[i]->type) {
|
||||
found_spe = true;
|
||||
found_spe = arm_spe_pmus[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -96,7 +96,7 @@ struct auxtrace_record
|
||||
|
||||
#if defined(__aarch64__)
|
||||
if (found_spe)
|
||||
return arm_spe_recording_init(err, arm_spe_pmus[i]);
|
||||
return arm_spe_recording_init(err, found_spe);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -12,7 +12,8 @@ skip_if_no_z_record() {
|
||||
|
||||
collect_z_record() {
|
||||
echo "Collecting compressed record file:"
|
||||
$perf_tool record -o $trace_file -g -z -F 5000 -- \
|
||||
[[ "$(uname -m)" != s390x ]] && gflag='-g'
|
||||
$perf_tool record -o $trace_file $gflag -z -F 5000 -- \
|
||||
dd count=500 if=/dev/urandom of=/dev/null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user