diff options
Diffstat (limited to 'tools/perf/util/session.h')
| -rw-r--r-- | tools/perf/util/session.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 9fa0fc2a863f..decd83f274fd 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h | |||
| @@ -17,8 +17,12 @@ struct ordered_samples { | |||
| 17 | u64 last_flush; | 17 | u64 last_flush; |
| 18 | u64 next_flush; | 18 | u64 next_flush; |
| 19 | u64 max_timestamp; | 19 | u64 max_timestamp; |
| 20 | struct list_head samples_head; | 20 | struct list_head samples; |
| 21 | struct sample_queue *last_inserted; | 21 | struct list_head sample_cache; |
| 22 | struct list_head to_free; | ||
| 23 | struct sample_queue *sample_buffer; | ||
| 24 | struct sample_queue *last_sample; | ||
| 25 | int sample_buffer_idx; | ||
| 22 | }; | 26 | }; |
| 23 | 27 | ||
| 24 | struct perf_session { | 28 | struct perf_session { |
| @@ -42,6 +46,8 @@ struct perf_session { | |||
| 42 | int fd; | 46 | int fd; |
| 43 | bool fd_pipe; | 47 | bool fd_pipe; |
| 44 | bool repipe; | 48 | bool repipe; |
| 49 | bool sample_id_all; | ||
| 50 | u16 id_hdr_size; | ||
| 45 | int cwdlen; | 51 | int cwdlen; |
| 46 | char *cwd; | 52 | char *cwd; |
| 47 | struct ordered_samples ordered_samples; | 53 | struct ordered_samples ordered_samples; |
| @@ -50,7 +56,9 @@ struct perf_session { | |||
| 50 | 56 | ||
| 51 | struct perf_event_ops; | 57 | struct perf_event_ops; |
| 52 | 58 | ||
| 53 | typedef int (*event_op)(event_t *self, struct perf_session *session); | 59 | typedef int (*event_op)(event_t *self, struct sample_data *sample, |
| 60 | struct perf_session *session); | ||
| 61 | typedef int (*event_synth_op)(event_t *self, struct perf_session *session); | ||
| 54 | typedef int (*event_op2)(event_t *self, struct perf_session *session, | 62 | typedef int (*event_op2)(event_t *self, struct perf_session *session, |
| 55 | struct perf_event_ops *ops); | 63 | struct perf_event_ops *ops); |
| 56 | 64 | ||
| @@ -63,16 +71,19 @@ struct perf_event_ops { | |||
| 63 | lost, | 71 | lost, |
| 64 | read, | 72 | read, |
| 65 | throttle, | 73 | throttle, |
| 66 | unthrottle, | 74 | unthrottle; |
| 67 | attr, | 75 | event_synth_op attr, |
| 68 | event_type, | 76 | event_type, |
| 69 | tracing_data, | 77 | tracing_data, |
| 70 | build_id; | 78 | build_id; |
| 71 | event_op2 finished_round; | 79 | event_op2 finished_round; |
| 72 | bool ordered_samples; | 80 | bool ordered_samples; |
| 81 | bool ordering_requires_timestamps; | ||
| 73 | }; | 82 | }; |
| 74 | 83 | ||
| 75 | struct perf_session *perf_session__new(const char *filename, int mode, bool force, bool repipe); | 84 | struct perf_session *perf_session__new(const char *filename, int mode, |
| 85 | bool force, bool repipe, | ||
| 86 | struct perf_event_ops *ops); | ||
| 76 | void perf_session__delete(struct perf_session *self); | 87 | void perf_session__delete(struct perf_session *self); |
| 77 | 88 | ||
| 78 | void perf_event_header__bswap(struct perf_event_header *self); | 89 | void perf_event_header__bswap(struct perf_event_header *self); |
| @@ -98,8 +109,9 @@ void mem_bswap_64(void *src, int byte_size); | |||
| 98 | 109 | ||
| 99 | int perf_session__create_kernel_maps(struct perf_session *self); | 110 | int perf_session__create_kernel_maps(struct perf_session *self); |
| 100 | 111 | ||
| 101 | int do_read(int fd, void *buf, size_t size); | ||
| 102 | void perf_session__update_sample_type(struct perf_session *self); | 112 | void perf_session__update_sample_type(struct perf_session *self); |
| 113 | void perf_session__set_sample_id_all(struct perf_session *session, bool value); | ||
| 114 | void perf_session__set_sample_type(struct perf_session *session, u64 type); | ||
| 103 | void perf_session__remove_thread(struct perf_session *self, struct thread *th); | 115 | void perf_session__remove_thread(struct perf_session *self, struct thread *th); |
| 104 | 116 | ||
| 105 | static inline | 117 | static inline |
