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 fixes from Thomas Gleixner:
"A series of fixes for perf tooling:

- Make xyarray return the X/Y size correctly which fixes a crash in
the exit code.

- Fix the libc path in test so it works not only on Debian/Ubuntu
correctly

- Check for eBPF file existance and output a useful error message
instead of failing to compile a non existant file

- Make sure perf_hpp_fmt is not longer references before freeing it

- Use list_del_init() in the histogram code to prevent a crash when
the already deleted element is deleted again

- Remove the leftovers of the removed '-l' option

- Add reviewer entries to the MAINTAINERS file"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf test shell trace+probe_libc_inet_pton.sh: Be compatible with Debian/Ubuntu
perf xyarray: Fix wrong processing when closing evsel fd
perf buildid-list: Fix crash when processing PERF_RECORD_NAMESPACE
perf record: Fix documentation for a inexistent option '-l'
perf tools: Add long time reviewers to MAINTAINERS
perf tools: Check wether the eBPF file exists in event parsing
perf hists: Add extra integrity checks to fmt_free()
perf hists: Fix crash in perf_hpp__reset_output_field()

+37 -10
+2
MAINTAINERS
··· 10560 10560 M: Ingo Molnar <mingo@redhat.com> 10561 10561 M: Arnaldo Carvalho de Melo <acme@kernel.org> 10562 10562 R: Alexander Shishkin <alexander.shishkin@linux.intel.com> 10563 + R: Jiri Olsa <jolsa@redhat.com> 10564 + R: Namhyung Kim <namhyung@kernel.org> 10563 10565 L: linux-kernel@vger.kernel.org 10564 10566 T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core 10565 10567 S: Supported
+2 -2
tools/perf/Documentation/perf-record.txt
··· 8 8 SYNOPSIS 9 9 -------- 10 10 [verse] 11 - 'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] <command> 12 - 'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>] 11 + 'perf record' [-e <EVENT> | --event=EVENT] [-a] <command> 12 + 'perf record' [-e <EVENT> | --event=EVENT] [-a] -- <command> [<options>] 13 13 14 14 DESCRIPTION 15 15 -----------
+6 -3
tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
··· 10 10 11 11 . $(dirname $0)/lib/probe.sh 12 12 13 + ld=$(realpath /lib64/ld*.so.* | uniq) 14 + libc=$(echo $ld | sed 's/ld/libc/g') 15 + 13 16 trace_libc_inet_pton_backtrace() { 14 17 idx=0 15 18 expected[0]="PING.*bytes" ··· 21 18 expected[3]=".*packets transmitted.*" 22 19 expected[4]="rtt min.*" 23 20 expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)" 24 - expected[6]=".*inet_pton[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$" 25 - expected[7]="getaddrinfo[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$" 21 + expected[6]=".*inet_pton[[:space:]]\($libc\)$" 22 + expected[7]="getaddrinfo[[:space:]]\($libc\)$" 26 23 expected[8]=".*\(.*/bin/ping.*\)$" 27 24 28 25 perf trace --no-syscalls -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do ··· 38 35 } 39 36 40 37 skip_if_no_perf_probe && \ 41 - perf probe -q /lib64/libc-*.so inet_pton && \ 38 + perf probe -q $libc inet_pton && \ 42 39 trace_libc_inet_pton_backtrace 43 40 err=$? 44 41 rm -f ${file}
+8 -1
tools/perf/ui/hist.c
··· 532 532 533 533 void perf_hpp__column_unregister(struct perf_hpp_fmt *format) 534 534 { 535 - list_del(&format->list); 535 + list_del_init(&format->list); 536 536 } 537 537 538 538 void perf_hpp__cancel_cumulate(void) ··· 606 606 607 607 static void fmt_free(struct perf_hpp_fmt *fmt) 608 608 { 609 + /* 610 + * At this point fmt should be completely 611 + * unhooked, if not it's a bug. 612 + */ 613 + BUG_ON(!list_empty(&fmt->list)); 614 + BUG_ON(!list_empty(&fmt->sort_list)); 615 + 609 616 if (fmt->free) 610 617 fmt->free(fmt); 611 618 }
+15 -2
tools/perf/util/parse-events.l
··· 8 8 9 9 %{ 10 10 #include <errno.h> 11 + #include <sys/types.h> 12 + #include <sys/stat.h> 13 + #include <unistd.h> 11 14 #include "../perf.h" 12 15 #include "parse-events.h" 13 16 #include "parse-events-bison.h" ··· 56 53 return token; 57 54 } 58 55 59 - static bool isbpf(yyscan_t scanner) 56 + static bool isbpf_suffix(char *text) 60 57 { 61 - char *text = parse_events_get_text(scanner); 62 58 int len = strlen(text); 63 59 64 60 if (len < 2) ··· 68 66 if (len > 4 && !strcmp(text + len - 4, ".obj")) 69 67 return true; 70 68 return false; 69 + } 70 + 71 + static bool isbpf(yyscan_t scanner) 72 + { 73 + char *text = parse_events_get_text(scanner); 74 + struct stat st; 75 + 76 + if (!isbpf_suffix(text)) 77 + return false; 78 + 79 + return stat(text, &st) == 0; 71 80 } 72 81 73 82 /*
+2
tools/perf/util/session.c
··· 374 374 tool->mmap2 = process_event_stub; 375 375 if (tool->comm == NULL) 376 376 tool->comm = process_event_stub; 377 + if (tool->namespaces == NULL) 378 + tool->namespaces = process_event_stub; 377 379 if (tool->fork == NULL) 378 380 tool->fork = process_event_stub; 379 381 if (tool->exit == NULL)
+2 -2
tools/perf/util/xyarray.h
··· 23 23 24 24 static inline int xyarray__max_y(struct xyarray *xy) 25 25 { 26 - return xy->max_x; 26 + return xy->max_y; 27 27 } 28 28 29 29 static inline int xyarray__max_x(struct xyarray *xy) 30 30 { 31 - return xy->max_y; 31 + return xy->max_x; 32 32 } 33 33 34 34 #endif /* _PERF_XYARRAY_H_ */