tracing: replace TP<var> with TP_<var>
authorSteven Rostedt <srostedt@redhat.com>
Mon, 9 Mar 2009 19:47:18 +0000 (15:47 -0400)
committerSteven Rostedt <srostedt@redhat.com>
Tue, 10 Mar 2009 04:35:04 +0000 (00:35 -0400)
Impact: clean up

The macros TPPROTO, TPARGS, TPFMT, TPRAWFMT, and TPCMD all look a bit
ugly. This patch adds an underscore to their names.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
14 files changed:
Documentation/tracepoints.txt
include/linux/tracepoint.h
include/trace/block.h
include/trace/irq_event_types.h
include/trace/lockdep_event_types.h
include/trace/power.h
include/trace/sched_event_types.h
include/trace/workqueue.h
kernel/trace/trace_event_types.h
kernel/trace/trace_events_stage_2.h
kernel/trace/trace_events_stage_3.h
kernel/trace/trace_export.c
kernel/trace/trace_format.h [deleted file]
samples/tracepoints/tp-samples-trace.h

index 6f0a044f5b5e51e27f2bdae2cd6d68123eb98bd7..4ff43c6de299c32a40f6e718b19b7fcffedeae6f 100644 (file)
@@ -45,8 +45,8 @@ In include/trace/subsys.h :
 #include <linux/tracepoint.h>
 
 DECLARE_TRACE(subsys_eventname,
-       TPPROTO(int firstarg, struct task_struct *p),
-       TPARGS(firstarg, p));
+       TP_PROTO(int firstarg, struct task_struct *p),
+       TP_ARGS(firstarg, p));
 
 In subsys/file.c (where the tracing statement must be added) :
 
@@ -66,10 +66,10 @@ Where :
     - subsys is the name of your subsystem.
     - eventname is the name of the event to trace.
 
-- TPPROTO(int firstarg, struct task_struct *p) is the prototype of the
+- TP_PROTO(int firstarg, struct task_struct *p) is the prototype of the
   function called by this tracepoint.
 
-- TPARGS(firstarg, p) are the parameters names, same as found in the
+- TP_ARGS(firstarg, p) are the parameters names, same as found in the
   prototype.
 
 Connecting a function (probe) to a tracepoint is done by providing a
index 152b2f03fb86bf45bb0d24c1b745f588a0c006f6..3bcc3e171443552cf7f0988e06ac35d3abb43af8 100644 (file)
@@ -31,8 +31,8 @@ struct tracepoint {
                                         * Keep in sync with vmlinux.lds.h.
                                         */
 
-#define TPPROTO(args...)       args
-#define TPARGS(args...)                args
+#define TP_PROTO(args...)      args
+#define TP_ARGS(args...)               args
 
 #ifdef CONFIG_TRACEPOINTS
 
@@ -65,7 +65,7 @@ struct tracepoint {
        {                                                               \
                if (unlikely(__tracepoint_##name.state))                \
                        __DO_TRACE(&__tracepoint_##name,                \
-                               TPPROTO(proto), TPARGS(args));          \
+                               TP_PROTO(proto), TP_ARGS(args));        \
        }                                                               \
        static inline int register_trace_##name(void (*probe)(proto))   \
        {                                                               \
index 25c6a1fd5b773c1225040bb591ccf4b082d03e50..25b7068b819e1b5a3552debd3ae11b28142861be 100644 (file)
@@ -5,72 +5,72 @@
 #include <linux/tracepoint.h>
 
 DECLARE_TRACE(block_rq_abort,
-       TPPROTO(struct request_queue *q, struct request *rq),
-               TPARGS(q, rq));
+       TP_PROTO(struct request_queue *q, struct request *rq),
+             TP_ARGS(q, rq));
 
 DECLARE_TRACE(block_rq_insert,
-       TPPROTO(struct request_queue *q, struct request *rq),
-               TPARGS(q, rq));
+       TP_PROTO(struct request_queue *q, struct request *rq),
+             TP_ARGS(q, rq));
 
 DECLARE_TRACE(block_rq_issue,
-       TPPROTO(struct request_queue *q, struct request *rq),
-               TPARGS(q, rq));
+       TP_PROTO(struct request_queue *q, struct request *rq),
+             TP_ARGS(q, rq));
 
 DECLARE_TRACE(block_rq_requeue,
-       TPPROTO(struct request_queue *q, struct request *rq),
-               TPARGS(q, rq));
+       TP_PROTO(struct request_queue *q, struct request *rq),
+             TP_ARGS(q, rq));
 
 DECLARE_TRACE(block_rq_complete,
-       TPPROTO(struct request_queue *q, struct request *rq),
-               TPARGS(q, rq));
+       TP_PROTO(struct request_queue *q, struct request *rq),
+             TP_ARGS(q, rq));
 
 DECLARE_TRACE(block_bio_bounce,
-       TPPROTO(struct request_queue *q, struct bio *bio),
-               TPARGS(q, bio));
+       TP_PROTO(struct request_queue *q, struct bio *bio),
+             TP_ARGS(q, bio));
 
 DECLARE_TRACE(block_bio_complete,
-       TPPROTO(struct request_queue *q, struct bio *bio),
-               TPARGS(q, bio));
+       TP_PROTO(struct request_queue *q, struct bio *bio),
+             TP_ARGS(q, bio));
 
 DECLARE_TRACE(block_bio_backmerge,
-       TPPROTO(struct request_queue *q, struct bio *bio),
-               TPARGS(q, bio));
+       TP_PROTO(struct request_queue *q, struct bio *bio),
+             TP_ARGS(q, bio));
 
 DECLARE_TRACE(block_bio_frontmerge,
-       TPPROTO(struct request_queue *q, struct bio *bio),
-               TPARGS(q, bio));
+       TP_PROTO(struct request_queue *q, struct bio *bio),
+             TP_ARGS(q, bio));
 
 DECLARE_TRACE(block_bio_queue,
-       TPPROTO(struct request_queue *q, struct bio *bio),
-               TPARGS(q, bio));
+       TP_PROTO(struct request_queue *q, struct bio *bio),
+             TP_ARGS(q, bio));
 
 DECLARE_TRACE(block_getrq,
-       TPPROTO(struct request_queue *q, struct bio *bio, int rw),
-               TPARGS(q, bio, rw));
+       TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
+             TP_ARGS(q, bio, rw));
 
 DECLARE_TRACE(block_sleeprq,
-       TPPROTO(struct request_queue *q, struct bio *bio, int rw),
-               TPARGS(q, bio, rw));
+       TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
+             TP_ARGS(q, bio, rw));
 
 DECLARE_TRACE(block_plug,
-       TPPROTO(struct request_queue *q),
-               TPARGS(q));
+       TP_PROTO(struct request_queue *q),
+             TP_ARGS(q));
 
 DECLARE_TRACE(block_unplug_timer,
-       TPPROTO(struct request_queue *q),
-               TPARGS(q));
+       TP_PROTO(struct request_queue *q),
+             TP_ARGS(q));
 
 DECLARE_TRACE(block_unplug_io,
-       TPPROTO(struct request_queue *q),
-               TPARGS(q));
+       TP_PROTO(struct request_queue *q),
+             TP_ARGS(q));
 
 DECLARE_TRACE(block_split,
-       TPPROTO(struct request_queue *q, struct bio *bio, unsigned int pdu),
-               TPARGS(q, bio, pdu));
+       TP_PROTO(struct request_queue *q, struct bio *bio, unsigned int pdu),
+             TP_ARGS(q, bio, pdu));
 
 DECLARE_TRACE(block_remap,
-       TPPROTO(struct request_queue *q, struct bio *bio, dev_t dev,
-               sector_t from, sector_t to),
-               TPARGS(q, bio, dev, from, to));
+       TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev,
+                sector_t from, sector_t to),
+             TP_ARGS(q, bio, dev, from, to));
 
 #endif
index 65850bc5ea0686614fb2d98ee89e6b82b84534bb..0147d9eef5f41e436e9a04fd6fae56b5ccc5a676 100644 (file)
@@ -9,25 +9,25 @@
 #define TRACE_SYSTEM irq
 
 TRACE_EVENT_FORMAT(irq_handler_entry,
-       TPPROTO(int irq, struct irqaction *action),
-       TPARGS(irq, action),
-       TPFMT("irq=%d handler=%s", irq, action->name),
+       TP_PROTO(int irq, struct irqaction *action),
+       TP_ARGS(irq, action),
+       TP_FMT("irq=%d handler=%s", irq, action->name),
        TRACE_STRUCT(
                TRACE_FIELD(int, irq, irq)
        ),
-       TPRAWFMT("irq %d")
+       TP_RAW_FMT("irq %d")
        );
 
 TRACE_EVENT_FORMAT(irq_handler_exit,
-       TPPROTO(int irq, struct irqaction *action, int ret),
-       TPARGS(irq, action, ret),
-       TPFMT("irq=%d handler=%s return=%s",
+       TP_PROTO(int irq, struct irqaction *action, int ret),
+       TP_ARGS(irq, action, ret),
+       TP_FMT("irq=%d handler=%s return=%s",
                irq, action->name, ret ? "handled" : "unhandled"),
        TRACE_STRUCT(
                TRACE_FIELD(int, irq, irq)
                TRACE_FIELD(int, ret, ret)
        ),
-       TPRAWFMT("irq %d ret %d")
+       TP_RAW_FMT("irq %d ret %d")
        );
 
 #undef TRACE_SYSTEM
index f713d74a82b4d3c237968a072a6a09d3ae406ef7..1f00e8b3543e107de0b7ae9847d5c7b426521b03 100644 (file)
 #ifdef CONFIG_LOCKDEP
 
 TRACE_FORMAT(lock_acquire,
-       TPPROTO(struct lockdep_map *lock, unsigned int subclass,
+       TP_PROTO(struct lockdep_map *lock, unsigned int subclass,
                int trylock, int read, int check,
                struct lockdep_map *next_lock, unsigned long ip),
-       TPARGS(lock, subclass, trylock, read, check, next_lock, ip),
-       TPFMT("%s%s%s", trylock ? "try " : "",
+       TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip),
+       TP_FMT("%s%s%s", trylock ? "try " : "",
                read ? "read " : "", lock->name)
        );
 
 TRACE_FORMAT(lock_release,
-       TPPROTO(struct lockdep_map *lock, int nested, unsigned long ip),
-       TPARGS(lock, nested, ip),
-       TPFMT("%s", lock->name)
+       TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip),
+       TP_ARGS(lock, nested, ip),
+       TP_FMT("%s", lock->name)
        );
 
 #ifdef CONFIG_LOCK_STAT
 
 TRACE_FORMAT(lock_contended,
-       TPPROTO(struct lockdep_map *lock, unsigned long ip),
-       TPARGS(lock, ip),
-       TPFMT("%s", lock->name)
+       TP_PROTO(struct lockdep_map *lock, unsigned long ip),
+       TP_ARGS(lock, ip),
+       TP_FMT("%s", lock->name)
        );
 
 TRACE_FORMAT(lock_acquired,
-       TPPROTO(struct lockdep_map *lock, unsigned long ip),
-       TPARGS(lock, ip),
-       TPFMT("%s", lock->name)
+       TP_PROTO(struct lockdep_map *lock, unsigned long ip),
+       TP_ARGS(lock, ip),
+       TP_FMT("%s", lock->name)
        );
 
 #endif
index 38aca537e49765dce6939c110080f0496b00a5f3..ef204666e9832039958235e2cc08ae3cae0f528a 100644 (file)
@@ -18,15 +18,15 @@ struct power_trace {
 };
 
 DECLARE_TRACE(power_start,
-       TPPROTO(struct power_trace *it, unsigned int type, unsigned int state),
-               TPARGS(it, type, state));
+       TP_PROTO(struct power_trace *it, unsigned int type, unsigned int state),
+             TP_ARGS(it, type, state));
 
 DECLARE_TRACE(power_mark,
-       TPPROTO(struct power_trace *it, unsigned int type, unsigned int state),
-               TPARGS(it, type, state));
+       TP_PROTO(struct power_trace *it, unsigned int type, unsigned int state),
+             TP_ARGS(it, type, state));
 
 DECLARE_TRACE(power_end,
-       TPPROTO(struct power_trace *it),
-               TPARGS(it));
+       TP_PROTO(struct power_trace *it),
+             TP_ARGS(it));
 
 #endif /* _TRACE_POWER_H */
index a6de5c1601a0cbc62e83e0d61f8f185a321d9c48..71b14828a95734be29c6c8575f1bd3c49075ecdb 100644 (file)
 #define TRACE_SYSTEM sched
 
 TRACE_EVENT_FORMAT(sched_kthread_stop,
-       TPPROTO(struct task_struct *t),
-       TPARGS(t),
-       TPFMT("task %s:%d", t->comm, t->pid),
+       TP_PROTO(struct task_struct *t),
+       TP_ARGS(t),
+       TP_FMT("task %s:%d", t->comm, t->pid),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, pid, t->pid)
        ),
-       TPRAWFMT("task %d")
+       TP_RAW_FMT("task %d")
        );
 
 TRACE_EVENT_FORMAT(sched_kthread_stop_ret,
-       TPPROTO(int ret),
-       TPARGS(ret),
-       TPFMT("ret=%d", ret),
+       TP_PROTO(int ret),
+       TP_ARGS(ret),
+       TP_FMT("ret=%d", ret),
        TRACE_STRUCT(
                TRACE_FIELD(int, ret, ret)
        ),
-       TPRAWFMT("ret=%d")
+       TP_RAW_FMT("ret=%d")
        );
 
 TRACE_EVENT_FORMAT(sched_wait_task,
-       TPPROTO(struct rq *rq, struct task_struct *p),
-       TPARGS(rq, p),
-       TPFMT("task %s:%d", p->comm, p->pid),
+       TP_PROTO(struct rq *rq, struct task_struct *p),
+       TP_ARGS(rq, p),
+       TP_FMT("task %s:%d", p->comm, p->pid),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, pid, p->pid)
        ),
-       TPRAWFMT("task %d")
+       TP_RAW_FMT("task %d")
        );
 
 TRACE_EVENT_FORMAT(sched_wakeup,
-       TPPROTO(struct rq *rq, struct task_struct *p, int success),
-       TPARGS(rq, p, success),
-       TPFMT("task %s:%d %s",
+       TP_PROTO(struct rq *rq, struct task_struct *p, int success),
+       TP_ARGS(rq, p, success),
+       TP_FMT("task %s:%d %s",
              p->comm, p->pid, success ? "succeeded" : "failed"),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, pid, p->pid)
                TRACE_FIELD(int, success, success)
        ),
-       TPRAWFMT("task %d success=%d")
+       TP_RAW_FMT("task %d success=%d")
        );
 
 TRACE_EVENT_FORMAT(sched_wakeup_new,
-       TPPROTO(struct rq *rq, struct task_struct *p, int success),
-       TPARGS(rq, p, success),
-       TPFMT("task %s:%d",
+       TP_PROTO(struct rq *rq, struct task_struct *p, int success),
+       TP_ARGS(rq, p, success),
+       TP_FMT("task %s:%d",
              p->comm, p->pid, success ? "succeeded" : "failed"),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, pid, p->pid)
                TRACE_FIELD(int, success, success)
        ),
-       TPRAWFMT("task %d success=%d")
+       TP_RAW_FMT("task %d success=%d")
        );
 
 TRACE_EVENT_FORMAT(sched_switch,
-       TPPROTO(struct rq *rq, struct task_struct *prev,
+       TP_PROTO(struct rq *rq, struct task_struct *prev,
                struct task_struct *next),
-       TPARGS(rq, prev, next),
-       TPFMT("task %s:%d ==> %s:%d",
+       TP_ARGS(rq, prev, next),
+       TP_FMT("task %s:%d ==> %s:%d",
              prev->comm, prev->pid, next->comm, next->pid),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, prev_pid, prev->pid)
                TRACE_FIELD(int, prev_prio, prev->prio)
                TRACE_FIELD_SPECIAL(char next_comm[TASK_COMM_LEN],
                                    next_comm,
-                                   TPCMD(memcpy(TRACE_ENTRY->next_comm,
+                                   TP_CMD(memcpy(TRACE_ENTRY->next_comm,
                                                 next->comm,
                                                 TASK_COMM_LEN)))
                TRACE_FIELD(pid_t, next_pid, next->pid)
                TRACE_FIELD(int, next_prio, next->prio)
        ),
-       TPRAWFMT("prev %d:%d ==> next %s:%d:%d")
+       TP_RAW_FMT("prev %d:%d ==> next %s:%d:%d")
        );
 
 TRACE_EVENT_FORMAT(sched_migrate_task,
-       TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
-       TPARGS(p, orig_cpu, dest_cpu),
-       TPFMT("task %s:%d from: %d  to: %d",
+       TP_PROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
+       TP_ARGS(p, orig_cpu, dest_cpu),
+       TP_FMT("task %s:%d from: %d  to: %d",
              p->comm, p->pid, orig_cpu, dest_cpu),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, pid, p->pid)
                TRACE_FIELD(int, orig_cpu, orig_cpu)
                TRACE_FIELD(int, dest_cpu, dest_cpu)
        ),
-       TPRAWFMT("task %d  from: %d to: %d")
+       TP_RAW_FMT("task %d  from: %d to: %d")
        );
 
 TRACE_EVENT_FORMAT(sched_process_free,
-       TPPROTO(struct task_struct *p),
-       TPARGS(p),
-       TPFMT("task %s:%d", p->comm, p->pid),
+       TP_PROTO(struct task_struct *p),
+       TP_ARGS(p),
+       TP_FMT("task %s:%d", p->comm, p->pid),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, pid, p->pid)
        ),
-       TPRAWFMT("task %d")
+       TP_RAW_FMT("task %d")
        );
 
 TRACE_EVENT_FORMAT(sched_process_exit,
-       TPPROTO(struct task_struct *p),
-       TPARGS(p),
-       TPFMT("task %s:%d", p->comm, p->pid),
+       TP_PROTO(struct task_struct *p),
+       TP_ARGS(p),
+       TP_FMT("task %s:%d", p->comm, p->pid),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, pid, p->pid)
        ),
-       TPRAWFMT("task %d")
+       TP_RAW_FMT("task %d")
        );
 
 TRACE_EVENT_FORMAT(sched_process_wait,
-       TPPROTO(struct pid *pid),
-       TPARGS(pid),
-       TPFMT("pid %d", pid_nr(pid)),
+       TP_PROTO(struct pid *pid),
+       TP_ARGS(pid),
+       TP_FMT("pid %d", pid_nr(pid)),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, pid, pid_nr(pid))
        ),
-       TPRAWFMT("task %d")
+       TP_RAW_FMT("task %d")
        );
 
 TRACE_EVENT_FORMAT(sched_process_fork,
-       TPPROTO(struct task_struct *parent, struct task_struct *child),
-       TPARGS(parent, child),
-       TPFMT("parent %s:%d  child %s:%d",
+       TP_PROTO(struct task_struct *parent, struct task_struct *child),
+       TP_ARGS(parent, child),
+       TP_FMT("parent %s:%d  child %s:%d",
              parent->comm, parent->pid, child->comm, child->pid),
        TRACE_STRUCT(
                TRACE_FIELD(pid_t, parent, parent->pid)
                TRACE_FIELD(pid_t, child, child->pid)
        ),
-       TPRAWFMT("parent %d  child %d")
+       TP_RAW_FMT("parent %d  child %d")
        );
 
 TRACE_EVENT_FORMAT(sched_signal_send,
-       TPPROTO(int sig, struct task_struct *p),
-       TPARGS(sig, p),
-       TPFMT("sig: %d   task %s:%d", sig, p->comm, p->pid),
+       TP_PROTO(int sig, struct task_struct *p),
+       TP_ARGS(sig, p),
+       TP_FMT("sig: %d   task %s:%d", sig, p->comm, p->pid),
        TRACE_STRUCT(
                TRACE_FIELD(int, sig, sig)
                TRACE_FIELD(pid_t, pid, p->pid)
        ),
-       TPRAWFMT("sig: %d  task %d")
+       TP_RAW_FMT("sig: %d  task %d")
        );
 
 #undef TRACE_SYSTEM
index 867829df45714c761bb6bca6f1a3c34c05e0a4a1..7626523deeba5f8611c70777878d500ada0d7cb3 100644 (file)
@@ -6,20 +6,20 @@
 #include <linux/sched.h>
 
 DECLARE_TRACE(workqueue_insertion,
-          TPPROTO(struct task_struct *wq_thread, struct work_struct *work),
-          TPARGS(wq_thread, work));
+          TP_PROTO(struct task_struct *wq_thread, struct work_struct *work),
+          TP_ARGS(wq_thread, work));
 
 DECLARE_TRACE(workqueue_execution,
-          TPPROTO(struct task_struct *wq_thread, struct work_struct *work),
-          TPARGS(wq_thread, work));
+          TP_PROTO(struct task_struct *wq_thread, struct work_struct *work),
+          TP_ARGS(wq_thread, work));
 
 /* Trace the creation of one workqueue thread on a cpu */
 DECLARE_TRACE(workqueue_creation,
-          TPPROTO(struct task_struct *wq_thread, int cpu),
-          TPARGS(wq_thread, cpu));
+          TP_PROTO(struct task_struct *wq_thread, int cpu),
+          TP_ARGS(wq_thread, cpu));
 
 DECLARE_TRACE(workqueue_destruction,
-          TPPROTO(struct task_struct *wq_thread),
-          TPARGS(wq_thread));
+          TP_PROTO(struct task_struct *wq_thread),
+          TP_ARGS(wq_thread));
 
 #endif /* __TRACE_WORKQUEUE_H */
index fb4eba16643326e960669d7e1eeb40e38f745466..d94179aa1fc22b851cf0b983d0ed7f73c22ae82a 100644 (file)
@@ -10,7 +10,7 @@ TRACE_EVENT_FORMAT(function, TRACE_FN, ftrace_entry, ignore,
                TRACE_FIELD(unsigned long, ip, ip)
                TRACE_FIELD(unsigned long, parent_ip, parent_ip)
        ),
-       TPRAWFMT(" %lx <-- %lx")
+       TP_RAW_FMT(" %lx <-- %lx")
 );
 
 TRACE_EVENT_FORMAT(funcgraph_entry, TRACE_GRAPH_ENT,
@@ -19,7 +19,7 @@ TRACE_EVENT_FORMAT(funcgraph_entry, TRACE_GRAPH_ENT,
                TRACE_FIELD(unsigned long, graph_ent.func, func)
                TRACE_FIELD(int, graph_ent.depth, depth)
        ),
-       TPRAWFMT("--> %lx (%d)")
+       TP_RAW_FMT("--> %lx (%d)")
 );
 
 TRACE_EVENT_FORMAT(funcgraph_exit, TRACE_GRAPH_RET,
@@ -28,7 +28,7 @@ TRACE_EVENT_FORMAT(funcgraph_exit, TRACE_GRAPH_RET,
                TRACE_FIELD(unsigned long, ret.func, func)
                TRACE_FIELD(int, ret.depth, depth)
        ),
-       TPRAWFMT("<-- %lx (%d)")
+       TP_RAW_FMT("<-- %lx (%d)")
 );
 
 TRACE_EVENT_FORMAT(wakeup, TRACE_WAKE, ctx_switch_entry, ignore,
@@ -41,7 +41,7 @@ TRACE_EVENT_FORMAT(wakeup, TRACE_WAKE, ctx_switch_entry, ignore,
                TRACE_FIELD(unsigned char, next_state, next_state)
                TRACE_FIELD(unsigned int, next_cpu, next_cpu)
        ),
-       TPRAWFMT("%u:%u:%u  ==+ %u:%u:%u [%03u]")
+       TP_RAW_FMT("%u:%u:%u  ==+ %u:%u:%u [%03u]")
 );
 
 TRACE_EVENT_FORMAT(context_switch, TRACE_CTX, ctx_switch_entry, ignore,
@@ -54,7 +54,7 @@ TRACE_EVENT_FORMAT(context_switch, TRACE_CTX, ctx_switch_entry, ignore,
                TRACE_FIELD(unsigned char, next_state, next_state)
                TRACE_FIELD(unsigned int, next_cpu, next_cpu)
        ),
-       TPRAWFMT("%u:%u:%u  ==+ %u:%u:%u [%03u]")
+       TP_RAW_FMT("%u:%u:%u  ==+ %u:%u:%u [%03u]")
 );
 
 TRACE_EVENT_FORMAT(special, TRACE_SPECIAL, special_entry, ignore,
@@ -63,7 +63,7 @@ TRACE_EVENT_FORMAT(special, TRACE_SPECIAL, special_entry, ignore,
                TRACE_FIELD(unsigned long, arg2, arg2)
                TRACE_FIELD(unsigned long, arg3, arg3)
        ),
-       TPRAWFMT("(%08lx) (%08lx) (%08lx)")
+       TP_RAW_FMT("(%08lx) (%08lx) (%08lx)")
 );
 
 /*
@@ -83,7 +83,7 @@ TRACE_EVENT_FORMAT(kernel_stack, TRACE_STACK, stack_entry, ignore,
                TRACE_FIELD(unsigned long, caller[6], stack6)
                TRACE_FIELD(unsigned long, caller[7], stack7)
        ),
-       TPRAWFMT("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n"
+       TP_RAW_FMT("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n"
                 "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n")
 );
 
@@ -98,7 +98,7 @@ TRACE_EVENT_FORMAT(user_stack, TRACE_USER_STACK, userstack_entry, ignore,
                TRACE_FIELD(unsigned long, caller[6], stack6)
                TRACE_FIELD(unsigned long, caller[7], stack7)
        ),
-       TPRAWFMT("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n"
+       TP_RAW_FMT("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n"
                 "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n")
 );
 
@@ -108,7 +108,7 @@ TRACE_EVENT_FORMAT(print, TRACE_PRINT, print_entry, ignore,
                TRACE_FIELD(unsigned int, depth, depth)
                TRACE_FIELD_ZERO_CHAR(buf)
        ),
-       TPRAWFMT("%08lx (%d) %s")
+       TP_RAW_FMT("%08lx (%d) %s")
 );
 
 TRACE_EVENT_FORMAT(branch, TRACE_BRANCH, trace_branch, ignore,
@@ -118,7 +118,7 @@ TRACE_EVENT_FORMAT(branch, TRACE_BRANCH, trace_branch, ignore,
                TRACE_FIELD_SPECIAL(char file[TRACE_FUNC_SIZE+1], file, file)
                TRACE_FIELD(char, correct, correct)
        ),
-       TPRAWFMT("%u:%s:%s (%u)")
+       TP_RAW_FMT("%u:%s:%s (%u)")
 );
 
 TRACE_EVENT_FORMAT(hw_branch, TRACE_HW_BRANCHES, hw_branch_entry, ignore,
@@ -126,7 +126,7 @@ TRACE_EVENT_FORMAT(hw_branch, TRACE_HW_BRANCHES, hw_branch_entry, ignore,
                TRACE_FIELD(u64, from, from)
                TRACE_FIELD(u64, to, to)
        ),
-       TPRAWFMT("from: %llx to: %llx")
+       TP_RAW_FMT("from: %llx to: %llx")
 );
 
 TRACE_EVENT_FORMAT(power, TRACE_POWER, trace_power, ignore,
@@ -136,7 +136,7 @@ TRACE_EVENT_FORMAT(power, TRACE_POWER, trace_power, ignore,
                TRACE_FIELD(int, state_data.type, type)
                TRACE_FIELD(int, state_data.state, state)
        ),
-       TPRAWFMT("%llx->%llx type:%u state:%u")
+       TP_RAW_FMT("%llx->%llx type:%u state:%u")
 );
 
 TRACE_EVENT_FORMAT(kmem_alloc, TRACE_KMEM_ALLOC, kmemtrace_alloc_entry, ignore,
@@ -149,7 +149,7 @@ TRACE_EVENT_FORMAT(kmem_alloc, TRACE_KMEM_ALLOC, kmemtrace_alloc_entry, ignore,
                TRACE_FIELD(gfp_t, gfp_flags, gfp_flags)
                TRACE_FIELD(int, node, node)
        ),
-       TPRAWFMT("type:%u call_site:%lx ptr:%p req:%lu alloc:%lu"
+       TP_RAW_FMT("type:%u call_site:%lx ptr:%p req:%lu alloc:%lu"
                 " flags:%x node:%d")
 );
 
@@ -159,7 +159,7 @@ TRACE_EVENT_FORMAT(kmem_free, TRACE_KMEM_FREE, kmemtrace_free_entry, ignore,
                TRACE_FIELD(unsigned long, call_site, call_site)
                TRACE_FIELD(const void *, ptr, ptr)
        ),
-       TPRAWFMT("type:%u call_site:%lx ptr:%p")
+       TP_RAW_FMT("type:%u call_site:%lx ptr:%p")
 );
 
 #undef TRACE_SYSTEM
index d24a97e74aea28c1d265c0fbe0ff4ea9c46173da..8e2e0f56c2a8dbacef365fba0d77203fd78ae004 100644 (file)
@@ -20,7 +20,7 @@
  *
  *     field = (typeof(field))entry;
  *
- *     ret = trace_seq_printf(s, <TPRAWFMT> "%s", <ARGS> "\n");
+ *     ret = trace_seq_printf(s, <TP_RAW_FMT> "%s", <ARGS> "\n");
  *     if (!ret)
  *             return TRACE_TYPE_PARTIAL_LINE;
  *
@@ -44,8 +44,8 @@
        field->item,
 
 
-#undef TPRAWFMT
-#define TPRAWFMT(args...)      args
+#undef TP_RAW_FMT
+#define TP_RAW_FMT(args...)    args
 
 #undef TRACE_EVENT_FORMAT
 #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt)     \
index 2c8d76c7dbed09d9d6375495530bc626307caa02..557ca52bcdcd7557ca2f777342ce5f17b5415095 100644 (file)
  *
  */
 
-#undef TPFMT
-#define TPFMT(fmt, args...)    fmt "\n", ##args
+#undef TP_FMT
+#define TP_FMT(fmt, args...)   fmt "\n", ##args
 
 #define _TRACE_FORMAT(call, proto, args, fmt)                          \
 static void ftrace_event_##call(proto)                                 \
@@ -152,8 +152,8 @@ __attribute__((section("_ftrace_events"))) event_##call = {         \
 #define TRACE_FIELD(type, item, assign)\
        entry->item = assign;
 
-#undef TPCMD
-#define TPCMD(cmd...)  cmd
+#undef TP_CMD
+#define TP_CMD(cmd...) cmd
 
 #undef TRACE_ENTRY
 #define TRACE_ENTRY    entry
index 7162ab49d05d30e44c409c3b1a521c41d85e78f2..e62bc10f810325a471c47ad6feb786616caee98f 100644 (file)
@@ -26,8 +26,8 @@
                return 0;
 
 
-#undef TPRAWFMT
-#define TPRAWFMT(args...) args
+#undef TP_RAW_FMT
+#define TP_RAW_FMT(args...) args
 
 #undef TRACE_EVENT_FORMAT
 #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt)     \
@@ -57,8 +57,8 @@ ftrace_format_##call(struct trace_seq *s)                             \
 #define TRACE_FIELD(type, item, assign)\
        entry->item = assign;
 
-#undef TPCMD
-#define TPCMD(cmd...)  cmd
+#undef TP_CMD
+#define TP_CMD(cmd...) cmd
 
 #undef TRACE_ENTRY
 #define TRACE_ENTRY    entry
diff --git a/kernel/trace/trace_format.h b/kernel/trace/trace_format.h
deleted file mode 100644 (file)
index 97e59a9..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Setup the showing format of trace point.
- *
- * int
- * ftrace_format_##call(struct trace_seq *s)
- * {
- *     struct ftrace_raw_##call field;
- *     int ret;
- *
- *     ret = trace_seq_printf(s, #type " " #item ";"
- *                            " size:%d; offset:%d;\n",
- *                            sizeof(field.type),
- *                            offsetof(struct ftrace_raw_##call,
- *                                     item));
- *
- * }
- */
-
-#undef TRACE_STRUCT
-#define TRACE_STRUCT(args...) args
-
-#undef TRACE_FIELD
-#define TRACE_FIELD(type, item, assign)                                        \
-       ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t"      \
-                              "offset:%u;\tsize:%u;\n",                \
-                              (unsigned int)offsetof(typeof(field), item), \
-                              (unsigned int)sizeof(field.item));       \
-       if (!ret)                                                       \
-               return 0;
-
-
-#undef TRACE_FIELD_SPECIAL
-#define TRACE_FIELD_SPECIAL(type_item, item, cmd)                      \
-       ret = trace_seq_printf(s, "\tfield special:" #type_item ";\t"   \
-                              "offset:%u;\tsize:%u;\n",                \
-                              (unsigned int)offsetof(typeof(field), item), \
-                              (unsigned int)sizeof(field.item));       \
-       if (!ret)                                                       \
-               return 0;
-
-#undef TRACE_EVENT_FORMAT
-#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt)     \
-static int                                                             \
-ftrace_format_##call(struct trace_seq *s)                              \
-{                                                                      \
-       struct ftrace_raw_##call field;                                 \
-       int ret;                                                        \
-                                                                       \
-       tstruct;                                                        \
-                                                                       \
-       trace_seq_printf(s, "\nprint fmt: \"%s\"\n", tpfmt);            \
-                                                                       \
-       return ret;                                                     \
-}
-
index 01724e04c556339762a272ecff36ec4aa23145d4..dffdc49878af6532104307430155f4aeb44bf538 100644 (file)
@@ -5,9 +5,9 @@
 #include <linux/tracepoint.h>
 
 DECLARE_TRACE(subsys_event,
-       TPPROTO(struct inode *inode, struct file *file),
-       TPARGS(inode, file));
+       TP_PROTO(struct inode *inode, struct file *file),
+       TP_ARGS(inode, file));
 DECLARE_TRACE(subsys_eventb,
-       TPPROTO(void),
-       TPARGS());
+       TP_PROTO(void),
+       TP_ARGS());
 #endif