diff options
Diffstat (limited to 'tools/perf/builtin-script.c')
| -rw-r--r-- | tools/perf/builtin-script.c | 15 | 
1 files changed, 13 insertions, 2 deletions
| diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 6c3bf74dd78c..4001e621b6cb 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -38,6 +38,7 @@  #include "print_insn.h"  #include "archinsn.h"  #include <linux/bitmap.h> +#include <linux/compiler.h>  #include <linux/kernel.h>  #include <linux/stringify.h>  #include <linux/time64.h> @@ -50,6 +51,7 @@  #include <errno.h>  #include <inttypes.h>  #include <signal.h> +#include <stdio.h>  #include <sys/param.h>  #include <sys/types.h>  #include <sys/stat.h> @@ -2755,6 +2757,14 @@ process_bpf_events(const struct perf_tool *tool __maybe_unused,  			   sample->tid);  } +static int +process_bpf_metadata_event(struct perf_session *session __maybe_unused, +			   union perf_event *event) +{ +	perf_event__fprintf(event, NULL, stdout); +	return 0; +} +  static int process_text_poke_events(const struct perf_tool *tool,  				    union perf_event *event,  				    struct perf_sample *sample, @@ -2877,8 +2887,9 @@ static int __cmd_script(struct perf_script *script)  		script->tool.finished_round = process_finished_round_event;  	}  	if (script->show_bpf_events) { -		script->tool.ksymbol = process_bpf_events; -		script->tool.bpf     = process_bpf_events; +		script->tool.ksymbol	  = process_bpf_events; +		script->tool.bpf	  = process_bpf_events; +		script->tool.bpf_metadata = process_bpf_metadata_event;  	}  	if (script->show_text_poke_events) {  		script->tool.ksymbol   = process_bpf_events; | 
