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>
This commit is contained in:
Arnaldo Carvalho de Melo 2009-11-19 14:55:55 -02:00 committed by Ingo Molnar
commit 4dc0a04bb1
5 changed files with 70 additions and 40 deletions

View file

@ -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));