94c744b6c0
That does all the initialization boilerplate, opening the file, reading the header, checking if it is valid, etc. And that will as well have the threads list, kmap (now) global variable, etc, so that we can handle two (or more) perf.data files describing sessions to compare. 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: <1260573842-19720-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 lines
347 B
C
17 lines
347 B
C
#ifndef __PERF_SESSION_H
|
|
#define __PERF_SESSION_H
|
|
|
|
#include "header.h"
|
|
|
|
struct perf_session {
|
|
struct perf_header header;
|
|
unsigned long size;
|
|
int fd;
|
|
char filename[0];
|
|
};
|
|
|
|
struct perf_session *perf_session__new(const char *filename, int mode, bool force);
|
|
void perf_session__delete(struct perf_session *self);
|
|
|
|
#endif /* __PERF_SESSION_H */
|