1 2 /* call.c */ 3 void put_endpoint(struct trace_proc *proc, const char *name, endpoint_t endpt); 4 void put_equals(struct trace_proc *proc); 5 void put_result(struct trace_proc *proc); 6 int default_out(struct trace_proc *proc, const message *m_out); 7 void default_in(struct trace_proc *proc, const message *m_out, 8 const message *m_in, int failed); 9 int call_enter(struct trace_proc *proc, int show_stack); 10 void call_leave(struct trace_proc *proc, int skip); 11 void call_replay(struct trace_proc *proc); 12 const char *call_name(struct trace_proc *proc); 13 14 /* error.c */ 15 const char *get_error_name(int err); 16 17 /* escape.c */ 18 const char *get_escape(char c); 19 20 /* format.c */ 21 void format_reset(struct trace_proc *proc); 22 void format_set_sep(struct trace_proc *proc, const char *sep); 23 void format_push_sep(struct trace_proc *proc); 24 void put_field(struct trace_proc *proc, const char *name, const char *text); 25 void put_open(struct trace_proc *proc, const char *name, int flags, 26 const char *string, const char *separator); 27 void put_close(struct trace_proc *proc, const char *string); 28 void put_fmt(struct trace_proc *proc, const char *fmt, ...) 29 __attribute__((__format__(__printf__, 2, 3))); 30 void put_value(struct trace_proc *proc, const char *name, const char *fmt, ...) 31 __attribute__((__format__(__printf__, 3, 4))); 32 int put_open_struct(struct trace_proc *proc, const char *name, int flags, 33 vir_bytes addr, void *ptr, size_t size); 34 void put_close_struct(struct trace_proc *proc, int all); 35 void put_ptr(struct trace_proc *proc, const char *name, vir_bytes addr); 36 void put_buf(struct trace_proc *proc, const char *name, int flags, 37 vir_bytes addr, ssize_t size); 38 void put_flags(struct trace_proc *proc, const char *name, 39 const struct flags *fp, unsigned int num, const char *fmt, 40 unsigned int value); 41 void put_tail(struct trace_proc * proc, unsigned int count, 42 unsigned int printed); 43 44 /* ioctl.c */ 45 void put_ioctl_req(struct trace_proc *proc, const char *name, 46 unsigned long req, int is_svrctl); 47 int put_ioctl_arg_out(struct trace_proc *proc, const char *name, 48 unsigned long req, vir_bytes addr, int is_svrctl); 49 void put_ioctl_arg_in(struct trace_proc *proc, const char *name, int failed, 50 unsigned long req, vir_bytes addr, int is_svrctl); 51 52 /* kernel.c */ 53 int kernel_check(pid_t pid); 54 int kernel_get_name(pid_t pid, char *name, size_t size); 55 int kernel_is_service(pid_t pid); 56 int kernel_get_syscall(pid_t pid, reg_t reg[3]); 57 int kernel_get_retreg(pid_t pid, reg_t *retreg); 58 vir_bytes kernel_get_stacktop(void); 59 int kernel_get_context(pid_t pid, reg_t *pc, reg_t *sp, reg_t *fp); 60 void kernel_put_stacktrace(struct trace_proc * proc); 61 62 /* mem.c */ 63 int mem_get_data(pid_t pid, vir_bytes addr, void *ptr, size_t len); 64 int mem_get_user(pid_t pid, vir_bytes addr, void *ptr, size_t len); 65 66 /* pm.c */ 67 void put_struct_timeval(struct trace_proc *proc, const char *name, int flags, 68 vir_bytes addr); 69 void put_time(struct trace_proc *proc, const char *name, time_t time); 70 void put_groups(struct trace_proc * proc, const char * name, int flags, 71 vir_bytes addr, int count); 72 73 /* output.c */ 74 int output_init(const char *file); 75 int output_error(void); 76 void output_flush(void); 77 void record_start(struct trace_proc *proc); 78 void record_stop(struct trace_proc *proc); 79 void record_clear(struct trace_proc *proc); 80 int record_replay(struct trace_proc *proc); 81 void put_newline(void); 82 void put_text(struct trace_proc *proc, const char *text); 83 void put_space(struct trace_proc *proc); 84 void put_align(struct trace_proc *proc); 85 86 /* proc.c */ 87 void proc_init(void); 88 struct trace_proc *proc_add(pid_t pid); 89 struct trace_proc *proc_get(pid_t pid); 90 void proc_del(struct trace_proc *proc); 91 struct trace_proc *proc_next(struct trace_proc *last); 92 unsigned int proc_count(void); 93 94 /* signal.c */ 95 const char *get_signal_name(int sig); 96 97 /* trace.c */ 98 extern int allnames; 99 extern unsigned int verbose; 100 extern unsigned int valuesonly; 101 102 /* vfs.c */ 103 void put_fd(struct trace_proc *proc, const char *name, int fd); 104 void put_dev(struct trace_proc *proc, const char *name, dev_t dev); 105 106 /* service */ 107 const struct calls pm_calls; 108 const struct calls vfs_calls; 109 const struct calls rs_calls; 110 const struct calls vm_calls; 111 const struct calls ipc_calls; 112 113 /* ioctl/block.c */ 114 const char *block_ioctl_name(unsigned long req); 115 int block_ioctl_arg(struct trace_proc *proc, unsigned long req, void *ptr, 116 int dir); 117 118 /* ioctl/char.c */ 119 const char *char_ioctl_name(unsigned long req); 120 int char_ioctl_arg(struct trace_proc *proc, unsigned long req, void *ptr, 121 int dir); 122 123 /* ioctl/net.c */ 124 const char *net_ioctl_name(unsigned long req); 125 int net_ioctl_arg(struct trace_proc *proc, unsigned long req, void *ptr, 126 int dir); 127 128 /* ioctl/svrctl.c */ 129 const char *svrctl_name(unsigned long req); 130 int svrctl_arg(struct trace_proc *proc, unsigned long req, void *ptr, int dir); 131