[PATCH 0/4] perf tools: Allow adding --filter to BPF object

From: Wang Nan
Date: Fri Aug 28 2015 - 02:21:31 EST


This 4 patches will be appended into my next perf BPF pull request.
Without them, current perf BPF implementation has a small problem that,
if passing '--filter' after '--event test_bpf.o' event selection, the
filter won't be correctly applied.

Patch 1/4 append a new function to libbpf which allow fetching
object name from bpf_object.

Patch 2/4 add a safety check to avoid access invalid memory if the list
is empty during event parsing.

Patch 3/4 introduces a dummy evsel mechanism.

Patch 4/4 utilizes dummy evsel mechanism, make BPF event collect filter
options by dummy evsel and sync with them after real evsel generated.

The 4th patch should be applied after patch 'perf tools: Add bpf_fd
field to evsel and config it'. Patch 'perf tools: Enable passing bpf
object file to --event' should also be modified to utilize dummy evsel.
Please see my following pull request.

Thank you.

--
1.8.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/