summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-19 17:55:55 +0100
committerIngo Molnar <mingo@elte.hu>2009-11-19 18:47:17 +0100
commit4dc0a04bb18fe9b80cefa08694f46a3a19ebfe50 (patch)
tree6d3ff5b79e71985ef4691df2d47202a4f6c3bd53 /tools/perf/util/header.h
parentperf symbols: Capture the running kernel buildid too (diff)
downloadlinux-4dc0a04bb18fe9b80cefa08694f46a3a19ebfe50.tar.xz
linux-4dc0a04bb18fe9b80cefa08694f46a3a19ebfe50.zip
perf tools: perf_header__read() shouldn't die()
And also don't call the constructor in it, this way it adheres to the model the other methods follow. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1258649757-17554-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/header.h')
-rw-r--r--tools/perf/util/header.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index f46a94e09eea..dc8fedb066ab 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -55,7 +55,10 @@ struct perf_header {
DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS);
};
-struct perf_header *perf_header__read(int fd);
+struct perf_header *perf_header__new(void);
+void perf_header__delete(struct perf_header *self);
+
+int perf_header__read(struct perf_header *self, int fd);
void perf_header__write(struct perf_header *self, int fd, bool at_exit);
int perf_header__add_attr(struct perf_header *self,
@@ -75,8 +78,6 @@ perf_header__find_attr(u64 id, struct perf_header *header);
void perf_header__set_feat(struct perf_header *self, int feat);
bool perf_header__has_feat(const struct perf_header *self, int feat);
-struct perf_header *perf_header__new(void);
-
int perf_header__process_sections(struct perf_header *self, int fd,
int (*process)(struct perf_file_section *self,
int feat, int fd));