Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf tooling fixes from Thomas Gleixner:

- fix segfault when processing unknown threads in cs-etm

- fix "perf test inet_pton" on s390 failing due to missing inline

- display all available events on 'perf annotate --stdio'

- add missing newline when parsing an empty BPF program

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf tools: Add missing newline when parsing empty BPF proggie
perf cs-etm: Remove redundant space
perf cs-etm: Support unknown_thread in cs_etm_auxtrace
perf annotate: Display all available events on --stdio
perf test: "probe libc's inet_pton" fails on s390 due to missing inline

+29 -6
+1 -1
tools/perf/tests/shell/record+probe_libc_inet_pton.sh
··· 16 16 trace_libc_inet_pton_backtrace() { 17 17 idx=0 18 18 expected[0]="ping[][0-9 \.:]+probe_libc:inet_pton: \([[:xdigit:]]+\)" 19 - expected[1]=".*inet_pton[[:space:]]\($libc\)$" 19 + expected[1]=".*inet_pton[[:space:]]\($libc|inlined\)$" 20 20 case "$(uname -m)" in 21 21 s390x) 22 22 eventattr='call-graph=dwarf,max-stack=4'
+3
tools/perf/util/annotate.c
··· 1263 1263 max_percent = sample->percent; 1264 1264 } 1265 1265 1266 + if (al->samples_nr > nr_percent) 1267 + nr_percent = al->samples_nr; 1268 + 1266 1269 if (max_percent < min_pcnt) 1267 1270 return -1; 1268 1271
+24 -4
tools/perf/util/cs-etm.c
··· 239 239 for (i = 0; i < aux->num_cpu; i++) 240 240 zfree(&aux->metadata[i]); 241 241 242 + thread__zput(aux->unknown_thread); 242 243 zfree(&aux->metadata); 243 244 zfree(&aux); 244 245 } ··· 613 612 return buff->len; 614 613 } 615 614 616 - static void cs_etm__set_pid_tid_cpu(struct cs_etm_auxtrace *etm, 617 - struct auxtrace_queue *queue) 615 + static void cs_etm__set_pid_tid_cpu(struct cs_etm_auxtrace *etm, 616 + struct auxtrace_queue *queue) 618 617 { 619 618 struct cs_etm_queue *etmq = queue->priv; 620 619 ··· 1358 1357 etm->auxtrace.free = cs_etm__free; 1359 1358 session->auxtrace = &etm->auxtrace; 1360 1359 1360 + etm->unknown_thread = thread__new(999999999, 999999999); 1361 + if (!etm->unknown_thread) 1362 + goto err_free_queues; 1363 + 1364 + /* 1365 + * Initialize list node so that at thread__zput() we can avoid 1366 + * segmentation fault at list_del_init(). 1367 + */ 1368 + INIT_LIST_HEAD(&etm->unknown_thread->node); 1369 + 1370 + err = thread__set_comm(etm->unknown_thread, "unknown", 0); 1371 + if (err) 1372 + goto err_delete_thread; 1373 + 1374 + if (thread__init_map_groups(etm->unknown_thread, etm->machine)) 1375 + goto err_delete_thread; 1376 + 1361 1377 if (dump_trace) { 1362 1378 cs_etm__print_auxtrace_info(auxtrace_info->priv, num_cpu); 1363 1379 return 0; ··· 1389 1371 1390 1372 err = cs_etm__synth_events(etm, session); 1391 1373 if (err) 1392 - goto err_free_queues; 1374 + goto err_delete_thread; 1393 1375 1394 1376 err = auxtrace_queues__process_index(&etm->queues, session); 1395 1377 if (err) 1396 - goto err_free_queues; 1378 + goto err_delete_thread; 1397 1379 1398 1380 etm->data_queued = etm->queues.populated; 1399 1381 1400 1382 return 0; 1401 1383 1384 + err_delete_thread: 1385 + thread__zput(etm->unknown_thread); 1402 1386 err_free_queues: 1403 1387 auxtrace_queues__free(&etm->queues); 1404 1388 session->auxtrace = NULL;
+1 -1
tools/perf/util/parse-events.c
··· 1715 1715 struct perf_evsel *last; 1716 1716 1717 1717 if (list_empty(&parse_state.list)) { 1718 - WARN_ONCE(true, "WARNING: event parser found nothing"); 1718 + WARN_ONCE(true, "WARNING: event parser found nothing\n"); 1719 1719 return -1; 1720 1720 } 1721 1721