Re: [PATCH 04/12] perf tools: Allow BPF program attach to modules

2015-11-13 Thread Arnaldo Carvalho de Melo
Em Fri, Nov 13, 2015 at 12:29:13PM +, Wang Nan escreveu: > By extending the syntax of BPF object section names, this patch allows > user to attach BPF programs to symbol in modules. For example: > > SEC("module=i915\n" > "parse_cmds=i915_parse_cmds") > int parse_cmds(void *ctx) > { >

[PATCH 04/12] perf tools: Allow BPF program attach to modules

2015-11-13 Thread Wang Nan
By extending the syntax of BPF object section names, this patch allows user to attach BPF programs to symbol in modules. For example: SEC("module=i915\n" "parse_cmds=i915_parse_cmds") int parse_cmds(void *ctx) { return 1; } Implementation is very simple: like what 'perf probe' does,