Messages in this thread | | | From | KOSAKI Motohiro <> | Subject | Re: [PATCH 4/7] tracing: new format for specialized trace points | Date | Tue, 10 Mar 2009 14:50:28 +0900 (JST) |
| |
Hi Steven,
> TRACE_EVENT(sched_switch, > > TP_PROTO(struct rq *rq, struct task_struct *prev, > struct task_struct *next), > > TP_ARGS(rq, prev, next), > > TP_STRUCT__entry( > __array( char, prev_comm, TASK_COMM_LEN ) > __field( pid_t, prev_pid ) > __field( int, prev_prio ) > __array( char, next_comm, TASK_COMM_LEN ) > __field( pid_t, next_pid ) > __field( int, next_prio ) > ), > > TP_printk("task %s:%d [%d] ==> %s:%d [%d]", > __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, > __entry->next_comm, __entry->next_pid, __entry->next_prio), > > TP_fast_assign( > memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); > __entry->prev_pid = prev->pid; > __entry->prev_prio = prev->prio; > memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); > __entry->next_pid = next->pid; > __entry->next_prio = next->prio; > ) > );
Could you please write the documentation how to make new tracepont and use various TP_ macro? Some developer (include me) plan to add new tracepoint. but these macro usage is a bit difficult.
| |