summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-09-18 21:08:52 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-20 15:28:21 +0200
commit055c67ed39887c5563e9540470a4617c1b772aec (patch)
tree35105bd4733cc9fcf489de6c0d230fb0cda90748 /tools/perf/util/header.h
parentperf memswap: Adopt 'struct u64_swap' from evsel.h (diff)
downloadlinux-055c67ed39887c5563e9540470a4617c1b772aec.tar.xz
linux-055c67ed39887c5563e9540470a4617c1b772aec.zip
perf tools: Move event synthesizing routines to separate .c file
For better grouping, in time we may end up making most of these static, i.e. generalizing the 'perf record' synthesizing code so that based on the target it can do the right thing and call the needed synthesizers. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-s9zxxhk40s95pjng9panet16@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.h')
-rw-r--r--tools/perf/util/header.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index 999dac41871e..ca53a929e9fd 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -92,6 +92,24 @@ struct perf_header {
struct perf_env env;
};
+struct feat_fd {
+ struct perf_header *ph;
+ int fd;
+ void *buf; /* Either buf != NULL or fd >= 0 */
+ ssize_t offset;
+ size_t size;
+ struct evsel *events;
+};
+
+struct perf_header_feature_ops {
+ int (*write)(struct feat_fd *ff, struct evlist *evlist);
+ void (*print)(struct feat_fd *ff, FILE *fp);
+ int (*process)(struct feat_fd *ff, void *data);
+ const char *name;
+ bool full_only;
+ bool synthesize;
+};
+
struct evlist;
struct perf_session;
struct perf_tool;