Skip to content

Commit 69581c7

Browse files
committed
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
2 parents b395456 + 505ee76 commit 69581c7

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

tools/include/uapi/drm/i915_drm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ struct drm_i915_gem_exec_fence {
829829

830830
#define I915_EXEC_FENCE_WAIT (1<<0)
831831
#define I915_EXEC_FENCE_SIGNAL (1<<1)
832+
#define __I915_EXEC_FENCE_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_SIGNAL << 1))
832833
__u32 flags;
833834
};
834835

tools/perf/builtin-trace.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,14 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
11381138
return err;
11391139
}
11401140

1141+
static void trace__symbols__exit(struct trace *trace)
1142+
{
1143+
machine__exit(trace->host);
1144+
trace->host = NULL;
1145+
1146+
symbol__exit();
1147+
}
1148+
11411149
static int syscall__alloc_arg_fmts(struct syscall *sc, int nr_args)
11421150
{
11431151
int idx;
@@ -2481,6 +2489,8 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
24812489
}
24822490

24832491
out_delete_evlist:
2492+
trace__symbols__exit(trace);
2493+
24842494
perf_evlist__delete(evlist);
24852495
trace->evlist = NULL;
24862496
trace->live = false;

tools/perf/util/parse-events.l

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
%option stack
66
%option bison-locations
77
%option yylineno
8+
%option reject
89

910
%{
1011
#include <errno.h>
@@ -339,8 +340,8 @@ r{num_raw_hex} { return raw(yyscanner); }
339340
{num_hex} { return value(yyscanner, 16); }
340341

341342
{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); }
342-
{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); }
343+
{bpf_object} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_OBJECT); }
344+
{bpf_source} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_SOURCE); }
344345
{name} { return pmu_str_check(yyscanner); }
345346
"/" { BEGIN(config); return '/'; }
346347
- { return '-'; }

0 commit comments

Comments
 (0)