diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-11-19 11:55:55 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-19 12:47:17 -0500 |
commit | 4dc0a04bb18fe9b80cefa08694f46a3a19ebfe50 (patch) | |
tree | 6d3ff5b79e71985ef4691df2d47202a4f6c3bd53 /tools/perf/util/header.h | |
parent | 2446042c93bfc6eeebfc89e88fdef2435d2bb5c4 (diff) |
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.h | 7 |
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 { | |||
55 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); | 55 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); |
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct perf_header *perf_header__read(int fd); | 58 | struct perf_header *perf_header__new(void); |
59 | void perf_header__delete(struct perf_header *self); | ||
60 | |||
61 | int perf_header__read(struct perf_header *self, int fd); | ||
59 | void perf_header__write(struct perf_header *self, int fd, bool at_exit); | 62 | void perf_header__write(struct perf_header *self, int fd, bool at_exit); |
60 | 63 | ||
61 | int perf_header__add_attr(struct perf_header *self, | 64 | int perf_header__add_attr(struct perf_header *self, |
@@ -75,8 +78,6 @@ perf_header__find_attr(u64 id, struct perf_header *header); | |||
75 | void perf_header__set_feat(struct perf_header *self, int feat); | 78 | void perf_header__set_feat(struct perf_header *self, int feat); |
76 | bool perf_header__has_feat(const struct perf_header *self, int feat); | 79 | bool perf_header__has_feat(const struct perf_header *self, int feat); |
77 | 80 | ||
78 | struct perf_header *perf_header__new(void); | ||
79 | |||
80 | int perf_header__process_sections(struct perf_header *self, int fd, | 81 | int perf_header__process_sections(struct perf_header *self, int fd, |
81 | int (*process)(struct perf_file_section *self, | 82 | int (*process)(struct perf_file_section *self, |
82 | int feat, int fd)); | 83 | int feat, int fd)); |