aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-12 12:43:53 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-12 12:43:53 -0500
commit69581c74721f40b2e21667197a135120844c03b7 (patch)
tree8fc2b3e655d93546d42fcc6c899266b92d6d3aa5
parentb39545684a90ef3374abc0969d64c7bc540d128d (diff)
parent505ee76761062a1872b024140e886b7136a6c1d5 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf tool fixes from Thomas Gleixner: "A small set of fixes for perf tool: - synchronize the i915 drm header to avoid the 'out of date' warning - make sure that perf trace cleans up its temporary files on exit - unbreak the build with newer flex versions - add missing braces in the eBPF parsing rules" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tooling/headers: Sync the tools/include/uapi/drm/i915_drm.h UAPI header perf trace: Call machine__exit() at exit perf tools: Fix eBPF event specification parsing perf tools: Add "reject" option for parse-events.l
-rw-r--r--tools/include/uapi/drm/i915_drm.h1
-rw-r--r--tools/perf/builtin-trace.c10
-rw-r--r--tools/perf/util/parse-events.l5
3 files changed, 14 insertions, 2 deletions
diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h
index 6598fb76d2c2..9816590d3ad2 100644
--- a/tools/include/uapi/drm/i915_drm.h
+++ b/tools/include/uapi/drm/i915_drm.h
@@ -829,6 +829,7 @@ struct drm_i915_gem_exec_fence {
829 829
830#define I915_EXEC_FENCE_WAIT (1<<0) 830#define I915_EXEC_FENCE_WAIT (1<<0)
831#define I915_EXEC_FENCE_SIGNAL (1<<1) 831#define I915_EXEC_FENCE_SIGNAL (1<<1)
832#define __I915_EXEC_FENCE_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_SIGNAL << 1))
832 __u32 flags; 833 __u32 flags;
833}; 834};
834 835
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 771ddab94bb0..d5d7fff1c211 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1138,6 +1138,14 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
1138 return err; 1138 return err;
1139} 1139}
1140 1140
1141static void trace__symbols__exit(struct trace *trace)
1142{
1143 machine__exit(trace->host);
1144 trace->host = NULL;
1145
1146 symbol__exit();
1147}
1148
1141static int syscall__alloc_arg_fmts(struct syscall *sc, int nr_args) 1149static int syscall__alloc_arg_fmts(struct syscall *sc, int nr_args)
1142{ 1150{
1143 int idx; 1151 int idx;
@@ -2481,6 +2489,8 @@ out_disable:
2481 } 2489 }
2482 2490
2483out_delete_evlist: 2491out_delete_evlist:
2492 trace__symbols__exit(trace);
2493
2484 perf_evlist__delete(evlist); 2494 perf_evlist__delete(evlist);
2485 trace->evlist = NULL; 2495 trace->evlist = NULL;
2486 trace->live = false; 2496 trace->live = false;
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 6680e4fb7967..025729510525 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -5,6 +5,7 @@
5%option stack 5%option stack
6%option bison-locations 6%option bison-locations
7%option yylineno 7%option yylineno
8%option reject
8 9
9%{ 10%{
10#include <errno.h> 11#include <errno.h>
@@ -339,8 +340,8 @@ r{num_raw_hex} { return raw(yyscanner); }
339{num_hex} { return value(yyscanner, 16); } 340{num_hex} { return value(yyscanner, 16); }
340 341
341{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); } 342{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); }
342{bpf_object} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_OBJECT); } 343{bpf_object} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_OBJECT); }
343{bpf_source} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); } 344{bpf_source} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_SOURCE); }
344{name} { return pmu_str_check(yyscanner); } 345{name} { return pmu_str_check(yyscanner); }
345"/" { BEGIN(config); return '/'; } 346"/" { BEGIN(config); return '/'; }
346- { return '-'; } 347- { return '-'; }