public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: rostedt@goodmis.org, mingo@elte.hu, tzanussi@gmail.com,
	jbaron@redhat.com, tglx@linutronix.de, fweisbec@gmail.com,
	kosaki.motohiro@jp.fujitsu.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] tracing/events: Rename worklet_execute to worklet_entry and worklet_complete to worklet_exit
Date: Tue, 26 May 2009 14:31:23 +1000	[thread overview]
Message-ID: <20090526043123.GC19728@kryten> (raw)
In-Reply-To: <20090526042643.GB19728@kryten>


Keep a common naming convention for tracing the latency of events such as
softirq_entry/softirq_exit.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

What do people think? It seems like a good idea to have a naming convention
when tracing event latency for softirqs, timers, worklets, etc.

Index: linux-2.6-master/include/trace/events/workqueue.h
===================================================================
--- linux-2.6-master.orig/include/trace/events/workqueue.h	2009-05-26 12:40:01.000000000 +1000
+++ linux-2.6-master/include/trace/events/workqueue.h	2009-05-26 12:40:16.000000000 +1000
@@ -68,7 +68,7 @@
 		__entry->cpu, __entry->delay)
 );
 
-TRACE_EVENT(worklet_execute,
+TRACE_EVENT(worklet_entry,
 
 	TP_PROTO(struct task_struct *wq_thread, struct work_struct *work),
 
@@ -93,7 +93,7 @@
 );
 
 /* Declare work as void *, because we can't use work->... in after f(work) */
-TRACE_EVENT(worklet_complete,
+TRACE_EVENT(worklet_exit,
 	TP_PROTO(struct task_struct *wq_thread, void *work),
 
 	TP_ARGS(wq_thread, work),
Index: linux-2.6-master/kernel/trace/trace_workqueue.c
===================================================================
--- linux-2.6-master.orig/kernel/trace/trace_workqueue.c	2009-05-26 12:43:27.000000000 +1000
+++ linux-2.6-master/kernel/trace/trace_workqueue.c	2009-05-26 12:43:36.000000000 +1000
@@ -27,7 +27,7 @@
 
 	/*
 	 * save latest work_struct's pointer to use as identifier in
-	 * probe_worklet_complete, because we can't use work_struct->...
+	 * probe_worklet_exit, because we can't use work_struct->...
 	 * after worklet got executed
 	 */
 	void				*work;
@@ -141,7 +141,7 @@
 
 /* Execution of a work */
 static void
-probe_worklet_execute(struct task_struct *wq_thread, struct work_struct *work)
+probe_worklet_entry(struct task_struct *wq_thread, struct work_struct *work)
 {
 	int cpu = cpumask_first(&wq_thread->cpus_allowed);
 	struct cpu_workqueue_stats *node;
@@ -176,7 +176,7 @@
 
 /* Complete of a work */
 static void
-probe_worklet_complete(struct task_struct *wq_thread, void *work)
+probe_worklet_exit(struct task_struct *wq_thread, void *work)
 {
 	int cpu = cpumask_first(&wq_thread->cpus_allowed);
 	struct cpu_workqueue_stats *node;
@@ -504,17 +504,17 @@
 	if (ret)
 		goto out_worklet_enqueue;
 
-	ret = register_trace_worklet_execute(probe_worklet_execute);
+	ret = register_trace_worklet_entry(probe_worklet_entry);
 	if (ret)
 		goto out_worklet_enqueue_delayed;
 
-	ret = register_trace_worklet_complete(probe_worklet_complete);
+	ret = register_trace_worklet_exit(probe_worklet_exit);
 	if (ret)
-		goto out_worklet_execute;
+		goto out_worklet_entry;
 
 	ret = register_trace_workqueue_creation(probe_workqueue_creation);
 	if (ret)
-		goto out_worklet_complete;
+		goto out_worklet_exit;
 
 	ret = register_trace_workqueue_destruction(probe_workqueue_destruction);
 	if (ret)
@@ -529,10 +529,10 @@
 
 out_workqueue_creation:
 	unregister_trace_workqueue_creation(probe_workqueue_creation);
-out_worklet_complete:
-	unregister_trace_worklet_complete(probe_worklet_complete);
-out_worklet_execute:
-	unregister_trace_worklet_execute(probe_worklet_execute);
+out_worklet_exit:
+	unregister_trace_worklet_exit(probe_worklet_exit);
+out_worklet_entry:
+	unregister_trace_worklet_entry(probe_worklet_entry);
 out_worklet_enqueue_delayed:
 	unregister_trace_worklet_enqueue_delayed(probe_worklet_enqueue_delayed);
 out_worklet_enqueue:
Index: linux-2.6-master/kernel/workqueue.c
===================================================================
--- linux-2.6-master.orig/kernel/workqueue.c	2009-05-26 12:43:59.000000000 +1000
+++ linux-2.6-master/kernel/workqueue.c	2009-05-26 12:44:01.000000000 +1000
@@ -296,9 +296,9 @@
 		work_clear_pending(work);
 		lock_map_acquire(&cwq->wq->lockdep_map);
 		lock_map_acquire(&lockdep_map);
-		trace_worklet_execute(cwq->thread, work);
+		trace_worklet_entry(cwq->thread, work);
 		f(work);
-		trace_worklet_complete(cwq->thread, work);
+		trace_worklet_exit(cwq->thread, work);
 		lock_map_release(&lockdep_map);
 		lock_map_release(&cwq->wq->lockdep_map);
 
Index: linux-2.6-master/Documentation/trace/workqueue.txt
===================================================================
--- linux-2.6-master.orig/Documentation/trace/workqueue.txt	2009-05-26 12:44:44.000000000 +1000
+++ linux-2.6-master/Documentation/trace/workqueue.txt	2009-05-26 12:45:05.000000000 +1000
@@ -98,8 +98,8 @@
 # mount -t debugfs debug /sys/kernel/debug/
 # cd /sys/kernel/debug/tracing/events/workqueue
 # ls
-filter          worklet_complete  worklet_enqueue_delayed  workqueue_creation     workqueue_flush
-worklet_cancel  worklet_enqueue   worklet_execute          workqueue_destruction
+filter          worklet_exit  worklet_enqueue_delayed  workqueue_creation     workqueue_flush
+worklet_cancel  worklet_enqueue   worklet_entry          workqueue_destruction
 # for e in $(ls); do echo 1 > $e/enable; done
 # cat /sys/kernel/debug/tracing/trace
 
@@ -108,7 +108,7 @@
  #   | |       |          |         |
 
 <...>-5627  [000]  4597.858645: worklet_enqueue: thread=ata/0:508 func=ata_pio_task+0x0/0x280 cpu=0
-<...>-508   [000]  4597.858660: worklet_execute: thread=ata/0:508 work=ffff88007e9e67b8 func=ata_pio_task+0x0/0x280
-<...>-508   [000]  4597.858684: worklet_complete: thread=ata/0:508 work=ffff88007e9e67b8
+<...>-508   [000]  4597.858660: worklet_entry: thread=ata/0:508 work=ffff88007e9e67b8 func=ata_pio_task+0x0/0x280
+<...>-508   [000]  4597.858684: worklet_exit: thread=ata/0:508 work=ffff88007e9e67b8
 <...>-2437  [000]  4597.861259: worklet_cancel: func=ata_pio_task+0x0/0x280
 [...]

  reply	other threads:[~2009-05-26  4:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 10:13 [PATCH] tracing/events: Add timer and high res timer tracepoints Anton Blanchard
2009-05-20 10:25 ` KOSAKI Motohiro
2009-05-20 10:31 ` Thomas Gleixner
2009-05-21  0:01 ` Frédéric Weisbecker
2009-05-21  0:13   ` Steven Rostedt
2009-05-21 12:38   ` Anton Blanchard
2009-05-25 20:00     ` Frederic Weisbecker
2009-05-26  4:26 ` Anton Blanchard
2009-05-26  4:31   ` Anton Blanchard [this message]
2009-05-26  4:32     ` [PATCH] tracing/events: Use %pf in workqueue trace events Anton Blanchard
2009-05-26  4:36       ` tracing/events: Add tasklet tracepoints Anton Blanchard
2009-05-29 13:16     ` [PATCH] tracing/events: Rename worklet_execute to worklet_entry and worklet_complete to worklet_exit Frédéric Weisbecker
2009-05-26  4:55   ` [PATCH v3] tracing/events: Add timer and high res timer tracepoints Anton Blanchard
2009-05-26 18:06   ` [PATCH] " Frederic Weisbecker
2009-05-27  9:28     ` Xiao Guangrong
2009-05-27 14:22       ` Thomas Gleixner
2009-05-27 14:48         ` Frederic Weisbecker
2009-05-29  0:55           ` [PATCH] tracing/events: Add timer and high res timertracepoints Zhaolei
2009-05-27 13:46     ` [PATCH] tracing/events: Add timer and high res timer tracepoints Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090526043123.GC19728@kryten \
    --to=anton@samba.org \
    --cc=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tzanussi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox