linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing, perf : add cpu hotplug trace events
@ 2011-01-04  9:50 Vincent Guittot
  2011-01-07  9:33 ` Amit Kucheria
  2011-01-07 15:12 ` Frederic Weisbecker
  0 siblings, 2 replies; 10+ messages in thread
From: Vincent Guittot @ 2011-01-04  9:50 UTC (permalink / raw)
  To: linux-kernel, linux-hotplug

Please find below a proposal for adding new trace events for cpu
hotplug.The goal is to measure the latency of each part (kernel,
architecture and platform) and also to trace the cpu hotplug activity
with other power events. I have tested these traces events on an arm
platform

Comments are welcome.

Date: Wed, 15 Dec 2010 11:22:21 +0100
Subject: [PATCH] hotplug tracepoint

this patch adds new events for cpu hotplug tracing
* plug/unplug sequence
* architecture and machine latency measurements

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
include/trace/events/hotplug.h |   71 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 0 deletions(-)
create mode 100644 include/trace/events/hotplug.h

diff --git a/include/trace/events/hotplug.h b/include/trace/events/hotplug.h
new file mode 100644
index 0000000..51c86ab
--- /dev/null
+++ b/include/trace/events/hotplug.h
@@ -0,0 +1,71 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM hotplug
+
+#if !defined(_TRACE_HOTPLUG_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_HOTPLUG_H
+
+#include <linux/ktime.h>
+#include <linux/tracepoint.h>
+
+#ifndef _TRACE_HOTPLUG_ENUM_
+#define _TRACE_HOTPLUG_ENUM_
+enum hotplug_type {
+ HOTPLUG_UNPLUG = 0,
+ HOTPLUG_PLUG = 1
+};
+
+enum hotplug_step {
+ HOTPLUG_KERNEL = 0,
+ HOTPLUG_ARCH = 1,
+ HOTPLUG_MACH = 2
+};
+#endif
+
+TRACE_EVENT(hotplug_start,
+
+ TP_PROTO(unsigned int type, unsigned int step, unsigned int cpuid),
+
+ TP_ARGS(type, step, cpuid),
+
+ TP_STRUCT__entry(
+ __field(u32, type)
+ __field(u32, step)
+ __field(u32, cpuid)
+ ),
+
+ TP_fast_assign(
+ __entry->type = type;
+ __entry->step = step;
+ __entry->cpuid = cpuid;
+ ),
+
+ TP_printk("type=%lu step=%lu cpuid=%lu", (unsigned long)__entry->type,
+ (unsigned long)__entry->step, (unsigned long)__entry->cpuid)
+);
+
+TRACE_EVENT(hotplug_end,
+
+ TP_PROTO(unsigned int type, unsigned int step, unsigned int cpuid),
+
+ TP_ARGS(type, step, cpuid),
+
+ TP_STRUCT__entry(
+ __field(u32, type)
+ __field(u32, step)
+ __field(u32, cpuid)
+ ),
+
+ TP_fast_assign(
+ __entry->type = type;
+ __entry->step = step;
+ __entry->cpuid = cpuid;
+ ),
+
+ TP_printk("type=%lu step=%lu cpuid=%lu", (unsigned long)__entry->type,
+ (unsigned long)__entry->step, (unsigned long)__entry->cpuid)
+);
+
+#endif /* _TRACE_HOTPLUG_H */
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>
--
1.7.0.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-01-17 17:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04  9:50 [PATCH] tracing, perf : add cpu hotplug trace events Vincent Guittot
2011-01-07  9:33 ` Amit Kucheria
2011-01-07 12:07   ` Vincent Guittot
2011-01-07 15:52   ` Steven Rostedt
2011-01-07 15:12 ` Frederic Weisbecker
2011-01-07 18:25   ` Vincent Guittot
2011-01-14 18:35     ` Frederic Weisbecker
2011-01-17 13:49       ` Vincent Guittot
2011-01-17 16:21         ` Frederic Weisbecker
2011-01-17 17:33           ` Vincent Guittot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).