2011-05-02 21:39:46

by Mathieu Desnoyers

[permalink] [raw]
Subject: [RFC patch 14/32] trace event power remove semicolons

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <[email protected]>
CC: Steven Rostedt <[email protected]>
CC: Frederic Weisbecker <[email protected]>
CC: Ingo Molnar <[email protected]>
CC: Thomas Gleixner <[email protected]>
CC: Jean Pihet <[email protected]>
CC: Arjan van de Ven <[email protected]>
CC: Thomas Renninger <[email protected]>
CC: Len Brown <[email protected]>
---
include/trace/events/power.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

Index: linux-2.6-lttng/include/trace/events/power.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/power.h
+++ linux-2.6-lttng/include/trace/events/power.h
@@ -25,14 +25,14 @@ DECLARE_EVENT_CLASS(cpu,

TP_printk("state=%lu cpu_id=%lu", (unsigned long)__entry->state,
(unsigned long)__entry->cpu_id)
-);
+)

DEFINE_EVENT(cpu, cpu_idle,

TP_PROTO(unsigned int state, unsigned int cpu_id),

TP_ARGS(state, cpu_id)
-);
+)

/* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */
#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING
@@ -46,7 +46,7 @@ DEFINE_EVENT(cpu, cpu_frequency,
TP_PROTO(unsigned int frequency, unsigned int cpu_id),

TP_ARGS(frequency, cpu_id)
-);
+)

TRACE_EVENT(machine_suspend,

@@ -63,7 +63,7 @@ TRACE_EVENT(machine_suspend,
),

TP_printk("state=%lu", (unsigned long)__entry->state)
-);
+)

/* This code will be removed after deprecation time exceeded (2.6.41) */
#ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED
@@ -92,21 +92,21 @@ DECLARE_EVENT_CLASS(power,

TP_printk("type=%lu state=%lu cpu_id=%lu", (unsigned long)__entry->type,
(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
-);
+)

DEFINE_EVENT(power, power_start,

TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),

TP_ARGS(type, state, cpu_id)
-);
+)

DEFINE_EVENT(power, power_frequency,

TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),

TP_ARGS(type, state, cpu_id)
-);
+)

TRACE_EVENT(power_end,

@@ -124,7 +124,7 @@ TRACE_EVENT(power_end,

TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id)

-);
+)

/* Deprecated dummy functions must be protected against multi-declartion */
#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED
@@ -180,28 +180,28 @@ DECLARE_EVENT_CLASS(clock,

TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
-);
+)

DEFINE_EVENT(clock, clock_enable,

TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),

TP_ARGS(name, state, cpu_id)
-);
+)

DEFINE_EVENT(clock, clock_disable,

TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),

TP_ARGS(name, state, cpu_id)
-);
+)

DEFINE_EVENT(clock, clock_set_rate,

TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),

TP_ARGS(name, state, cpu_id)
-);
+)

/*
* The power domain events are used for power domains transitions
@@ -226,14 +226,14 @@ DECLARE_EVENT_CLASS(power_domain,

TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
-);
+)

DEFINE_EVENT(power_domain, power_domain_target,

TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),

TP_ARGS(name, state, cpu_id)
-);
+)
#endif /* _TRACE_POWER_H */

/* This part must be outside protection */


2011-05-03 12:59:39

by Pihet-XID, Jean

[permalink] [raw]
Subject: Re: [RFC patch 14/32] trace event power remove semicolons

On Mon, May 2, 2011 at 11:11 PM, Mathieu Desnoyers
<[email protected]> wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
>
> Signed-off-by: Mathieu Desnoyers <[email protected]>
> CC: Steven Rostedt <[email protected]>
> CC: Frederic Weisbecker <[email protected]>
> CC: Ingo Molnar <[email protected]>
> CC: Thomas Gleixner <[email protected]>
> CC: Jean Pihet <[email protected]>
> CC: Arjan van de Ven <[email protected]>
> CC: Thomas Renninger <[email protected]>
> CC: Len Brown <[email protected]>
> ---
> ?include/trace/events/power.h | ? 28 ++++++++++++++--------------
> ?1 file changed, 14 insertions(+), 14 deletions(-)

Acked-by: [email protected]

>
> Index: linux-2.6-lttng/include/trace/events/power.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/trace/events/power.h
> +++ linux-2.6-lttng/include/trace/events/power.h
> @@ -25,14 +25,14 @@ DECLARE_EVENT_CLASS(cpu,
>
> ? ? ? ?TP_printk("state=%lu cpu_id=%lu", (unsigned long)__entry->state,
> ? ? ? ? ? ? ? ? ?(unsigned long)__entry->cpu_id)
> -);
> +)
>
> ?DEFINE_EVENT(cpu, cpu_idle,
>
> ? ? ? ?TP_PROTO(unsigned int state, unsigned int cpu_id),
>
> ? ? ? ?TP_ARGS(state, cpu_id)
> -);
> +)
>
> ?/* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */
> ?#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING
> @@ -46,7 +46,7 @@ DEFINE_EVENT(cpu, cpu_frequency,
> ? ? ? ?TP_PROTO(unsigned int frequency, unsigned int cpu_id),
>
> ? ? ? ?TP_ARGS(frequency, cpu_id)
> -);
> +)
>
> ?TRACE_EVENT(machine_suspend,
>
> @@ -63,7 +63,7 @@ TRACE_EVENT(machine_suspend,
> ? ? ? ?),
>
> ? ? ? ?TP_printk("state=%lu", (unsigned long)__entry->state)
> -);
> +)
>
> ?/* This code will be removed after deprecation time exceeded (2.6.41) */
> ?#ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED
> @@ -92,21 +92,21 @@ DECLARE_EVENT_CLASS(power,
>
> ? ? ? ?TP_printk("type=%lu state=%lu cpu_id=%lu", (unsigned long)__entry->type,
> ? ? ? ? ? ? ? ?(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
> -);
> +)
>
> ?DEFINE_EVENT(power, power_start,
>
> ? ? ? ?TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
>
> ? ? ? ?TP_ARGS(type, state, cpu_id)
> -);
> +)
>
> ?DEFINE_EVENT(power, power_frequency,
>
> ? ? ? ?TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
>
> ? ? ? ?TP_ARGS(type, state, cpu_id)
> -);
> +)
>
> ?TRACE_EVENT(power_end,
>
> @@ -124,7 +124,7 @@ TRACE_EVENT(power_end,
>
> ? ? ? ?TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id)
>
> -);
> +)
>
> ?/* Deprecated dummy functions must be protected against multi-declartion */
> ?#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED
> @@ -180,28 +180,28 @@ DECLARE_EVENT_CLASS(clock,
>
> ? ? ? ?TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
> ? ? ? ? ? ? ? ?(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
> -);
> +)
>
> ?DEFINE_EVENT(clock, clock_enable,
>
> ? ? ? ?TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
>
> ? ? ? ?TP_ARGS(name, state, cpu_id)
> -);
> +)
>
> ?DEFINE_EVENT(clock, clock_disable,
>
> ? ? ? ?TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
>
> ? ? ? ?TP_ARGS(name, state, cpu_id)
> -);
> +)
>
> ?DEFINE_EVENT(clock, clock_set_rate,
>
> ? ? ? ?TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
>
> ? ? ? ?TP_ARGS(name, state, cpu_id)
> -);
> +)
>
> ?/*
> ?* The power domain events are used for power domains transitions
> @@ -226,14 +226,14 @@ DECLARE_EVENT_CLASS(power_domain,
>
> ? ? ? ?TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
> ? ? ? ? ? ? ? ?(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
> -);
> +)
>
> ?DEFINE_EVENT(power_domain, power_domain_target,
>
> ? ? ? ?TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
>
> ? ? ? ?TP_ARGS(name, state, cpu_id)
> -);
> +)
> ?#endif /* _TRACE_POWER_H */
>
> ?/* This part must be outside protection */
>
>