mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 10:26:42 +07:00
perf/urgent fixes:
- Fix segfault when processing unknown threads in cs-etm (Leo Yan) - Fix "perf test inet_pton" on s390 failing due to missing inline (Thomas Richter) - Display all available events on 'perf annotate --stdio' (Jin Yao) - Add missing newline when parsing empty BPF proggie (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEELb9bqkb7Te0zijNb1lAW81NSqkAFAlr5fx4ACgkQ1lAW81NS qkCmfQ//ZbpL9ezoBuAfX61jv2n44ksqUV9NK+MZMfXr7hMQwY0ny2i8C9r/yhv4 W5pEDLcCyfEGRryEQgJSGw7w792WPFt2CT4NG/0dBqlKjzo+yaCXtbCrzfBqPgzs G8x95JhONDVe5bwlRHscI7k5dEp/Rics1x46gtCGNgeHrHaTm/RfGxXdR/Fp09id JaiO0czT2JxrtaLqim5v2Rm7k47Vc0i34BQwVQ/Tx0eRlGpyyUGMEM/6EWP355gO wG2lTtY24RMX9wEPBiEpxUz5mCZibZSOFSnn2AWYnhV1pDoyrG7j3A3PG4nIzZ4/ UuOsKQWA6ojgpbnk5S7Z7RUIZLy+OpzYAvExsF4zCleoNZ+BdcxyxZHwKDB1wEW1 9YJ3mWdeE4fJqWnJaRxzUpPChdW9VCOTcks6lIlFKfABjdB3+nfCjShbiSg7l/bU V8umQCFKxe5j+ZJomrZXGZldX6k1CslXuipYB+aAaGlR8wUl0Z50KW9cWWBHN5pJ 3tVKLpedxm2KAsFG119m+aA/stpq3z2idtOMU+A6k/bjCHYplKn/NLnDWPbXti5N ac09fDrjBaPPerHhAcZ742H3Ttt8hJgWe7COR4Rv5q9PZoU+NT//38eFR/8NtAIY 1ngk0KlrNM7bR6Muzgqr9zINX7aB5vi3fCeWTB2yKZXo9sZ9sqk= =FXHV -----END PGP SIGNATURE----- Merge tag 'perf-urgent-for-mingo-4.17-20180514' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fix segfault when processing unknown threads in cs-etm (Leo Yan) - Fix "perf test inet_pton" on s390 failing due to missing inline (Thomas Richter) - Display all available events on 'perf annotate --stdio' (Jin Yao) - Add missing newline when parsing empty BPF proggie (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
f3903c9161
@ -16,7 +16,7 @@ nm -g $libc 2>/dev/null | fgrep -q inet_pton || exit 254
|
||||
trace_libc_inet_pton_backtrace() {
|
||||
idx=0
|
||||
expected[0]="ping[][0-9 \.:]+probe_libc:inet_pton: \([[:xdigit:]]+\)"
|
||||
expected[1]=".*inet_pton[[:space:]]\($libc\)$"
|
||||
expected[1]=".*inet_pton[[:space:]]\($libc|inlined\)$"
|
||||
case "$(uname -m)" in
|
||||
s390x)
|
||||
eventattr='call-graph=dwarf,max-stack=4'
|
||||
|
@ -1263,6 +1263,9 @@ annotation_line__print(struct annotation_line *al, struct symbol *sym, u64 start
|
||||
max_percent = sample->percent;
|
||||
}
|
||||
|
||||
if (al->samples_nr > nr_percent)
|
||||
nr_percent = al->samples_nr;
|
||||
|
||||
if (max_percent < min_pcnt)
|
||||
return -1;
|
||||
|
||||
|
@ -239,6 +239,7 @@ static void cs_etm__free(struct perf_session *session)
|
||||
for (i = 0; i < aux->num_cpu; i++)
|
||||
zfree(&aux->metadata[i]);
|
||||
|
||||
thread__zput(aux->unknown_thread);
|
||||
zfree(&aux->metadata);
|
||||
zfree(&aux);
|
||||
}
|
||||
@ -612,8 +613,8 @@ cs_etm__get_trace(struct cs_etm_buffer *buff, struct cs_etm_queue *etmq)
|
||||
return buff->len;
|
||||
}
|
||||
|
||||
static void cs_etm__set_pid_tid_cpu(struct cs_etm_auxtrace *etm,
|
||||
struct auxtrace_queue *queue)
|
||||
static void cs_etm__set_pid_tid_cpu(struct cs_etm_auxtrace *etm,
|
||||
struct auxtrace_queue *queue)
|
||||
{
|
||||
struct cs_etm_queue *etmq = queue->priv;
|
||||
|
||||
@ -1357,6 +1358,23 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
|
||||
etm->auxtrace.free = cs_etm__free;
|
||||
session->auxtrace = &etm->auxtrace;
|
||||
|
||||
etm->unknown_thread = thread__new(999999999, 999999999);
|
||||
if (!etm->unknown_thread)
|
||||
goto err_free_queues;
|
||||
|
||||
/*
|
||||
* Initialize list node so that at thread__zput() we can avoid
|
||||
* segmentation fault at list_del_init().
|
||||
*/
|
||||
INIT_LIST_HEAD(&etm->unknown_thread->node);
|
||||
|
||||
err = thread__set_comm(etm->unknown_thread, "unknown", 0);
|
||||
if (err)
|
||||
goto err_delete_thread;
|
||||
|
||||
if (thread__init_map_groups(etm->unknown_thread, etm->machine))
|
||||
goto err_delete_thread;
|
||||
|
||||
if (dump_trace) {
|
||||
cs_etm__print_auxtrace_info(auxtrace_info->priv, num_cpu);
|
||||
return 0;
|
||||
@ -1371,16 +1389,18 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
|
||||
|
||||
err = cs_etm__synth_events(etm, session);
|
||||
if (err)
|
||||
goto err_free_queues;
|
||||
goto err_delete_thread;
|
||||
|
||||
err = auxtrace_queues__process_index(&etm->queues, session);
|
||||
if (err)
|
||||
goto err_free_queues;
|
||||
goto err_delete_thread;
|
||||
|
||||
etm->data_queued = etm->queues.populated;
|
||||
|
||||
return 0;
|
||||
|
||||
err_delete_thread:
|
||||
thread__zput(etm->unknown_thread);
|
||||
err_free_queues:
|
||||
auxtrace_queues__free(&etm->queues);
|
||||
session->auxtrace = NULL;
|
||||
|
@ -1715,7 +1715,7 @@ int parse_events(struct perf_evlist *evlist, const char *str,
|
||||
struct perf_evsel *last;
|
||||
|
||||
if (list_empty(&parse_state.list)) {
|
||||
WARN_ONCE(true, "WARNING: event parser found nothing");
|
||||
WARN_ONCE(true, "WARNING: event parser found nothing\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user