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:
parent
2446042c93
commit
4dc0a04bb1
5 changed files with 70 additions and 40 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue