summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-11-28 07:56:39 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-11-28 10:39:12 -0200
commit743eb868657bdb1b26c7b24077ca21c67c82c777 (patch)
tree4803b557725213043ccd5d3f83d2eec796a49f69 /tools/perf/util/session.h
parentd20deb64e0490ee9442b5181bc08a62d2cadcb90 (diff)
perf tools: Resolve machine earlier and pass it to perf_event_ops
Reducing the exposure of perf_session further, so that we can use the classes in cases where no perf.data file is created. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-stua66dcscsezzrcdugvbmvd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.h')
-rw-r--r--tools/perf/util/session.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 6de3d136890..1c5823c7d6d 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -58,32 +58,34 @@ struct perf_event_ops;
typedef int (*event_sample)(struct perf_event_ops *ops,
union perf_event *event, struct perf_sample *sample,
- struct perf_evsel *evsel, struct perf_session *session);
+ struct perf_evsel *evsel, struct machine *machine);
typedef int (*event_op)(struct perf_event_ops *ops, union perf_event *event,
struct perf_sample *sample,
- struct perf_session *session);
+ struct machine *machine);
typedef int (*event_synth_op)(union perf_event *self,
struct perf_session *session);
typedef int (*event_attr_op)(union perf_event *event,
struct perf_evlist **pevlist);
+typedef int (*event_simple_op)(struct perf_event_ops *ops,
+ union perf_event *event);
typedef int (*event_op2)(struct perf_event_ops *ops, union perf_event *event,
struct perf_session *session);
struct perf_event_ops {
- event_sample sample;
+ event_sample sample,
+ read;
event_op mmap,
comm,
fork,
exit,
lost,
- read,
throttle,
unthrottle;
event_attr_op attr;
event_synth_op tracing_data;
- event_op2 event_type,
- build_id,
- finished_round;
+ event_simple_op event_type;
+ event_op2 finished_round,
+ build_id;
bool ordered_samples;
bool ordering_requires_timestamps;
};
@@ -108,10 +110,6 @@ int perf_session__resolve_callchain(struct perf_session *self, struct perf_evsel
bool perf_session__has_traces(struct perf_session *self, const char *msg);
-int perf_session__set_kallsyms_ref_reloc_sym(struct map **maps,
- const char *symbol_name,
- u64 addr);
-
void mem_bswap_64(void *src, int byte_size);
void perf_event__attr_swap(struct perf_event_attr *attr);
@@ -151,6 +149,9 @@ void perf_session__process_machines(struct perf_session *self,
return machines__process(&self->machines, process, ops);
}
+struct thread *perf_session__findnew(struct perf_session *self, pid_t pid);
+size_t perf_session__fprintf(struct perf_session *self, FILE *fp);
+
size_t perf_session__fprintf_dsos(struct perf_session *self, FILE *fp);
size_t perf_session__fprintf_dsos_buildid(struct perf_session *self,
@@ -171,10 +172,9 @@ static inline int perf_session__parse_sample(struct perf_session *session,
struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session,
unsigned int type);
-void perf_session__print_ip(union perf_event *event, struct perf_evsel *evsel,
- struct perf_sample *sample,
- struct perf_session *session,
- int print_sym, int print_dso);
+void perf_event__print_ip(union perf_event *event, struct perf_sample *sample,
+ struct machine *machine, struct perf_evsel *evsel,
+ int print_sym, int print_dso);
int perf_session__cpu_bitmap(struct perf_session *session,
const char *cpu_list, unsigned long *cpu_bitmap);