OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 3 * Distributed under the terms of the GNU General Public License v2 |
| 4 */ |
| 5 #ifndef _COLLECTOR_H_ |
| 6 #define _COLLECTOR_H_ |
| 7 |
| 8 #ifndef _STYLE_H_ |
| 9 #include <style.h> |
| 10 #endif |
| 11 |
| 12 #ifndef _KTOP_H_ |
| 13 #include <ktop.h> |
| 14 #endif |
| 15 |
| 16 enum { BUF_SIZE = 1 << 12, |
| 17 SMALL_READ = BUF_SIZE >> 2 }; |
| 18 |
| 19 typedef struct ring_header_s { |
| 20 u64 time_stamp; |
| 21 unint commit; |
| 22 u8 data[]; |
| 23 } ring_header_s; |
| 24 |
| 25 typedef struct ring_event_s { |
| 26 u32 type_len : 5, |
| 27 time_delta : 27; |
| 28 u32 array[]; |
| 29 } ring_event_s; |
| 30 |
| 31 typedef struct event_s { |
| 32 u16 type; |
| 33 u8 flags; |
| 34 u8 preempt_count; |
| 35 s32 pid; |
| 36 s32 lock_depth; |
| 37 } event_s; |
| 38 |
| 39 typedef struct sys_enter_s { |
| 40 event_s ev; |
| 41 snint id; |
| 42 unint arg[NUM_ARGS]; |
| 43 } sys_enter_s; |
| 44 |
| 45 typedef struct sys_exit_s { |
| 46 event_s ev; |
| 47 snint id; |
| 48 snint ret; |
| 49 } sys_exit_s; |
| 50 |
| 51 typedef struct Collector_args_s { |
| 52 int cpu_id; |
| 53 } Collector_args_s; |
| 54 |
| 55 int open_raw(int cpu); |
| 56 void *dump_collector(void *args); |
| 57 |
| 58 #endif |
OLD | NEW |