Re: [PATCH] tracing/filters: add filter Documentation

From: Ingo Molnar
Date: Thu Sep 10 2009 - 01:30:19 EST



* Tom Zanussi <tzanussi@xxxxxxxxx> wrote:

> +# cat /debug/tracing/events/sched/sched_wakeup/format
> +
> +name: sched_wakeup
> +ID: 60
> +format:
> + field:unsigned short common_type; offset:0; size:2;
> + field:unsigned char common_flags; offset:2; size:1;
> + field:unsigned char common_preempt_count; offset:3; size:1;
> + field:int common_pid; offset:4; size:4;
> + field:int common_tgid; offset:8; size:4;
> +
> + field:char comm[TASK_COMM_LEN]; offset:12; size:16;
> + field:pid_t pid; offset:28; size:4;
> + field:int prio; offset:32; size:4;
> + field:int success; offset:36; size:4;
> + field:int cpu; offset:40; size:4;
> +
> +print fmt: "task %s:%d [%d] success=%d [%03d]", REC->comm, REC->pid,
> + REC->prio, REC->success, REC->cpu

Btw., are we willing to pin down this format in some sort of ABI?

If yes then this enumeration should probably also be represented in
/proc/events/ or /sys/kernel/events/.

Then we also need a TRACE_EVENT_ABI():

#define TRACE_EVENT_ABI TRACE_EVENT

To document and declare tracepoints that maintainers are willing to
maintain as an ABI component.

The scheduler tracepoints could certainly be propagated to that
status. (For that they need to be made 32-bit/64-bit safe first by
using u32/u64, etc. - but that's doable.)

Thoughts?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/