diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 21:31:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 21:31:30 -0400 |
commit | a926021cb1f8a99a275eaf6eb546102e9469dc59 (patch) | |
tree | c6d0300cd4b1a1fd658708476db4577b68b4de31 /tools/perf/util/event.h | |
parent | 0586bed3e8563c2eb89bc7256e30ce633ae06cfb (diff) | |
parent | 5e814dd597c42daeb8d2a276e64a6ec986ad0e2a (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (184 commits)
perf probe: Clean up probe_point_lazy_walker() return value
tracing: Fix irqoff selftest expanding max buffer
tracing: Align 4 byte ints together in struct tracer
tracing: Export trace_set_clr_event()
tracing: Explain about unstable clock on resume with ring buffer warning
ftrace/graph: Trace function entry before updating index
ftrace: Add .ref.text as one of the safe areas to trace
tracing: Adjust conditional expression latency formatting.
tracing: Fix event alignment: skb:kfree_skb
tracing: Fix event alignment: mce:mce_record
tracing: Fix event alignment: kvm:kvm_hv_hypercall
tracing: Fix event alignment: module:module_request
tracing: Fix event alignment: ftrace:context_switch and ftrace:wakeup
tracing: Remove lock_depth from event entry
perf header: Stop using 'self'
perf session: Use evlist/evsel for managing perf.data attributes
perf top: Don't let events to eat up whole header line
perf top: Fix events overflow in top command
ring-buffer: Remove unused #include <linux/trace_irq.h>
tracing: Add an 'overwrite' trace_option.
...
Diffstat (limited to 'tools/perf/util/event.h')
-rw-r--r-- | tools/perf/util/event.h | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index cc7b52f9b492..9c35170fb379 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -61,7 +61,7 @@ struct sample_event { | |||
61 | u64 array[]; | 61 | u64 array[]; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | struct sample_data { | 64 | struct perf_sample { |
65 | u64 ip; | 65 | u64 ip; |
66 | u32 pid, tid; | 66 | u32 pid, tid; |
67 | u64 time; | 67 | u64 time; |
@@ -117,7 +117,7 @@ struct tracing_data_event { | |||
117 | u32 size; | 117 | u32 size; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | typedef union event_union { | 120 | union perf_event { |
121 | struct perf_event_header header; | 121 | struct perf_event_header header; |
122 | struct ip_event ip; | 122 | struct ip_event ip; |
123 | struct mmap_event mmap; | 123 | struct mmap_event mmap; |
@@ -130,50 +130,54 @@ typedef union event_union { | |||
130 | struct event_type_event event_type; | 130 | struct event_type_event event_type; |
131 | struct tracing_data_event tracing_data; | 131 | struct tracing_data_event tracing_data; |
132 | struct build_id_event build_id; | 132 | struct build_id_event build_id; |
133 | } event_t; | 133 | }; |
134 | 134 | ||
135 | void event__print_totals(void); | 135 | void perf_event__print_totals(void); |
136 | 136 | ||
137 | struct perf_session; | 137 | struct perf_session; |
138 | struct thread_map; | 138 | struct thread_map; |
139 | 139 | ||
140 | typedef int (*event__handler_synth_t)(event_t *event, | 140 | typedef int (*perf_event__handler_synth_t)(union perf_event *event, |
141 | struct perf_session *session); | ||
142 | typedef int (*perf_event__handler_t)(union perf_event *event, | ||
143 | struct perf_sample *sample, | ||
141 | struct perf_session *session); | 144 | struct perf_session *session); |
142 | typedef int (*event__handler_t)(event_t *event, struct sample_data *sample, | 145 | |
143 | struct perf_session *session); | 146 | int perf_event__synthesize_thread_map(struct thread_map *threads, |
144 | 147 | perf_event__handler_t process, | |
145 | int event__synthesize_thread_map(struct thread_map *threads, | 148 | struct perf_session *session); |
146 | event__handler_t process, | 149 | int perf_event__synthesize_threads(perf_event__handler_t process, |
147 | struct perf_session *session); | 150 | struct perf_session *session); |
148 | int event__synthesize_threads(event__handler_t process, | 151 | int perf_event__synthesize_kernel_mmap(perf_event__handler_t process, |
149 | struct perf_session *session); | 152 | struct perf_session *session, |
150 | int event__synthesize_kernel_mmap(event__handler_t process, | 153 | struct machine *machine, |
151 | struct perf_session *session, | 154 | const char *symbol_name); |
152 | struct machine *machine, | 155 | |
153 | const char *symbol_name); | 156 | int perf_event__synthesize_modules(perf_event__handler_t process, |
154 | 157 | struct perf_session *session, | |
155 | int event__synthesize_modules(event__handler_t process, | 158 | struct machine *machine); |
156 | struct perf_session *session, | 159 | |
157 | struct machine *machine); | 160 | int perf_event__process_comm(union perf_event *event, struct perf_sample *sample, |
158 | 161 | struct perf_session *session); | |
159 | int event__process_comm(event_t *self, struct sample_data *sample, | 162 | int perf_event__process_lost(union perf_event *event, struct perf_sample *sample, |
160 | struct perf_session *session); | 163 | struct perf_session *session); |
161 | int event__process_lost(event_t *self, struct sample_data *sample, | 164 | int perf_event__process_mmap(union perf_event *event, struct perf_sample *sample, |
162 | struct perf_session *session); | 165 | struct perf_session *session); |
163 | int event__process_mmap(event_t *self, struct sample_data *sample, | 166 | int perf_event__process_task(union perf_event *event, struct perf_sample *sample, |
164 | struct perf_session *session); | 167 | struct perf_session *session); |
165 | int event__process_task(event_t *self, struct sample_data *sample, | 168 | int perf_event__process(union perf_event *event, struct perf_sample *sample, |
166 | struct perf_session *session); | 169 | struct perf_session *session); |
167 | int event__process(event_t *event, struct sample_data *sample, | ||
168 | struct perf_session *session); | ||
169 | 170 | ||
170 | struct addr_location; | 171 | struct addr_location; |
171 | int event__preprocess_sample(const event_t *self, struct perf_session *session, | 172 | int perf_event__preprocess_sample(const union perf_event *self, |
172 | struct addr_location *al, struct sample_data *data, | 173 | struct perf_session *session, |
173 | symbol_filter_t filter); | 174 | struct addr_location *al, |
174 | int event__parse_sample(const event_t *event, struct perf_session *session, | 175 | struct perf_sample *sample, |
175 | struct sample_data *sample); | 176 | symbol_filter_t filter); |
177 | |||
178 | const char *perf_event__name(unsigned int id); | ||
176 | 179 | ||
177 | const char *event__get_event_name(unsigned int id); | 180 | int perf_event__parse_sample(const union perf_event *event, u64 type, |
181 | bool sample_id_all, struct perf_sample *sample); | ||
178 | 182 | ||
179 | #endif /* __PERF_RECORD_H */ | 183 | #endif /* __PERF_RECORD_H */ |