Commit 275d34b8 authored by Ingo Molnar's avatar Ingo Molnar

Merge tag 'perf-urgent-for-mingo-4.14-20171019' of...

Merge tag 'perf-urgent-for-mingo-4.14-20171019' 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 crash in perf_hpp__reset_output_field() (Jiri Olsa)

- Fix eBPF file/vendor events ambiguity in event specification (Jiri Olsa)

- Fix closing evsel fd in 'perf stat' (Jin Yao)

- Make perf test shell trace+probe_libc_inet_pton.sh pass in Debian/Ubuntu (Li Zhijian)

- Fix 'perf buildid-list --with-hits' crash when processing PERF_RECORD_NAMESPACE (Namhyung Kim)

- Fix documentation for an inexistent option 'perf record -l' (Taeung Song)

- Add long time reviewers to MAINTAINERS (Arnaldo Carvalho de Melo)
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents ce43f4fd 74f8e22c
...@@ -10560,6 +10560,8 @@ M: Peter Zijlstra <peterz@infradead.org> ...@@ -10560,6 +10560,8 @@ M: Peter Zijlstra <peterz@infradead.org>
M: Ingo Molnar <mingo@redhat.com> M: Ingo Molnar <mingo@redhat.com>
M: Arnaldo Carvalho de Melo <acme@kernel.org> M: Arnaldo Carvalho de Melo <acme@kernel.org>
R: Alexander Shishkin <alexander.shishkin@linux.intel.com> R: Alexander Shishkin <alexander.shishkin@linux.intel.com>
R: Jiri Olsa <jolsa@redhat.com>
R: Namhyung Kim <namhyung@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
S: Supported S: Supported
......
...@@ -8,8 +8,8 @@ perf-record - Run a command and record its profile into perf.data ...@@ -8,8 +8,8 @@ perf-record - Run a command and record its profile into perf.data
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] <command> 'perf record' [-e <EVENT> | --event=EVENT] [-a] <command>
'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>] 'perf record' [-e <EVENT> | --event=EVENT] [-a] -- <command> [<options>]
DESCRIPTION DESCRIPTION
----------- -----------
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
. $(dirname $0)/lib/probe.sh . $(dirname $0)/lib/probe.sh
ld=$(realpath /lib64/ld*.so.* | uniq)
libc=$(echo $ld | sed 's/ld/libc/g')
trace_libc_inet_pton_backtrace() { trace_libc_inet_pton_backtrace() {
idx=0 idx=0
expected[0]="PING.*bytes" expected[0]="PING.*bytes"
...@@ -18,8 +21,8 @@ trace_libc_inet_pton_backtrace() { ...@@ -18,8 +21,8 @@ trace_libc_inet_pton_backtrace() {
expected[3]=".*packets transmitted.*" expected[3]=".*packets transmitted.*"
expected[4]="rtt min.*" expected[4]="rtt min.*"
expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)" expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)"
expected[6]=".*inet_pton[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$" expected[6]=".*inet_pton[[:space:]]\($libc\)$"
expected[7]="getaddrinfo[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$" expected[7]="getaddrinfo[[:space:]]\($libc\)$"
expected[8]=".*\(.*/bin/ping.*\)$" expected[8]=".*\(.*/bin/ping.*\)$"
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 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
...@@ -35,7 +38,7 @@ trace_libc_inet_pton_backtrace() { ...@@ -35,7 +38,7 @@ trace_libc_inet_pton_backtrace() {
} }
skip_if_no_perf_probe && \ skip_if_no_perf_probe && \
perf probe -q /lib64/libc-*.so inet_pton && \ perf probe -q $libc inet_pton && \
trace_libc_inet_pton_backtrace trace_libc_inet_pton_backtrace
err=$? err=$?
rm -f ${file} rm -f ${file}
......
...@@ -532,7 +532,7 @@ void perf_hpp_list__prepend_sort_field(struct perf_hpp_list *list, ...@@ -532,7 +532,7 @@ void perf_hpp_list__prepend_sort_field(struct perf_hpp_list *list,
void perf_hpp__column_unregister(struct perf_hpp_fmt *format) void perf_hpp__column_unregister(struct perf_hpp_fmt *format)
{ {
list_del(&format->list); list_del_init(&format->list);
} }
void perf_hpp__cancel_cumulate(void) void perf_hpp__cancel_cumulate(void)
...@@ -606,6 +606,13 @@ void perf_hpp__append_sort_keys(struct perf_hpp_list *list) ...@@ -606,6 +606,13 @@ void perf_hpp__append_sort_keys(struct perf_hpp_list *list)
static void fmt_free(struct perf_hpp_fmt *fmt) static void fmt_free(struct perf_hpp_fmt *fmt)
{ {
/*
* At this point fmt should be completely
* unhooked, if not it's a bug.
*/
BUG_ON(!list_empty(&fmt->list));
BUG_ON(!list_empty(&fmt->sort_list));
if (fmt->free) if (fmt->free)
fmt->free(fmt); fmt->free(fmt);
} }
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
%{ %{
#include <errno.h> #include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "../perf.h" #include "../perf.h"
#include "parse-events.h" #include "parse-events.h"
#include "parse-events-bison.h" #include "parse-events-bison.h"
...@@ -53,9 +56,8 @@ static int str(yyscan_t scanner, int token) ...@@ -53,9 +56,8 @@ static int str(yyscan_t scanner, int token)
return token; return token;
} }
static bool isbpf(yyscan_t scanner) static bool isbpf_suffix(char *text)
{ {
char *text = parse_events_get_text(scanner);
int len = strlen(text); int len = strlen(text);
if (len < 2) if (len < 2)
...@@ -68,6 +70,17 @@ static bool isbpf(yyscan_t scanner) ...@@ -68,6 +70,17 @@ static bool isbpf(yyscan_t scanner)
return false; return false;
} }
static bool isbpf(yyscan_t scanner)
{
char *text = parse_events_get_text(scanner);
struct stat st;
if (!isbpf_suffix(text))
return false;
return stat(text, &st) == 0;
}
/* /*
* This function is called when the parser gets two kind of input: * This function is called when the parser gets two kind of input:
* *
......
...@@ -374,6 +374,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool) ...@@ -374,6 +374,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
tool->mmap2 = process_event_stub; tool->mmap2 = process_event_stub;
if (tool->comm == NULL) if (tool->comm == NULL)
tool->comm = process_event_stub; tool->comm = process_event_stub;
if (tool->namespaces == NULL)
tool->namespaces = process_event_stub;
if (tool->fork == NULL) if (tool->fork == NULL)
tool->fork = process_event_stub; tool->fork = process_event_stub;
if (tool->exit == NULL) if (tool->exit == NULL)
......
...@@ -23,12 +23,12 @@ static inline void *xyarray__entry(struct xyarray *xy, int x, int y) ...@@ -23,12 +23,12 @@ static inline void *xyarray__entry(struct xyarray *xy, int x, int y)
static inline int xyarray__max_y(struct xyarray *xy) static inline int xyarray__max_y(struct xyarray *xy)
{ {
return xy->max_x; return xy->max_y;
} }
static inline int xyarray__max_x(struct xyarray *xy) static inline int xyarray__max_x(struct xyarray *xy)
{ {
return xy->max_y; return xy->max_x;
} }
#endif /* _PERF_XYARRAY_H_ */ #endif /* _PERF_XYARRAY_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment