perf evswitch: Introduce init() method to set the on/off evsels from the command line
Another step in having all the boilerplate in just one place to then use in the other tools. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Florian Weimer <fweimer@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: William Cohen <wcohen@redhat.com> Link: https://lkml.kernel.org/n/tip-snreb1wmwyjei3eefwotxp1l@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -4,8 +4,10 @@
|
||||
#define __PERF_EVSWITCH_H 1
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct evsel;
|
||||
struct evlist;
|
||||
|
||||
struct evswitch {
|
||||
struct evsel *on, *off;
|
||||
@@ -14,6 +16,8 @@ struct evswitch {
|
||||
bool show_on_off_events;
|
||||
};
|
||||
|
||||
int evswitch__init(struct evswitch *evswitch, struct evlist *evlist, FILE *fp);
|
||||
|
||||
bool evswitch__discard(struct evswitch *evswitch, struct evsel *evsel);
|
||||
|
||||
#define OPTS_EVSWITCH(evswitch) \
|
||||
|
||||
Reference in New Issue
Block a user