diff mbox

tracing: Remove unused clock events

Message ID 20171012124446.4a4fb056@gandalf.local.home (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Steven Rostedt Oct. 12, 2017, 4:44 p.m. UTC
[ Resending again, including linux-pm@vger.kernel.org this time ]

From: Steven Rostedt (VMware) <rostedt@goodmis.org>

Commit 74704ac6 ("tracing, perf: Add more power related events") added
new events, among them were trace_clock_enable, trace_clock_disable and
trace_clock_set_rate. In the last 7 years, nothing has used them. As
they take up space, and nobody cares about these events, remove them.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---

Comments

Jean Pihet Oct. 13, 2017, 7:20 a.m. UTC | #1
Hi Steven,

On Thu, Oct 12, 2017 at 6:44 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> [ Resending again, including linux-pm@vger.kernel.org this time ]
>
> From: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> Commit 74704ac6 ("tracing, perf: Add more power related events") added
> new events, among them were trace_clock_enable, trace_clock_disable and
> trace_clock_set_rate. In the last 7 years, nothing has used them. As
> they take up space, and nobody cares about these events, remove them.

Ok if it is not used. Can others confirm?

AFAIK this has been used internally.

BR,
Jean

>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
> diff --git a/include/trace/events/power.h b/include/trace/events/power.h
> index 54e3aad..d900cb7 100644
> --- a/include/trace/events/power.h
> +++ b/include/trace/events/power.h
> @@ -254,53 +254,6 @@ DEFINE_EVENT(wakeup_source,
> wakeup_source_deactivate, );
>
>  /*
> - * The clock events are used for clock enable/disable and for
> - *  clock rate change
> - */
> -DECLARE_EVENT_CLASS(clock,
> -
> -       TP_PROTO(const char *name, unsigned int state, unsigned int
> cpu_id), -
> -       TP_ARGS(name, state, cpu_id),
> -
> -       TP_STRUCT__entry(
> -               __string(       name,           name            )
> -               __field(        u64,            state           )
> -               __field(        u64,            cpu_id          )
> -       ),
> -
> -       TP_fast_assign(
> -               __assign_str(name, name);
> -               __entry->state = state;
> -               __entry->cpu_id = cpu_id;
> -       ),
> -
> -       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
>   */
>  DECLARE_EVENT_CLASS(power_domain,
Steven Rostedt Oct. 13, 2017, 2:25 p.m. UTC | #2
On Fri, 13 Oct 2017 09:20:44 +0200
Jean Pihet <jean.pihet@newoldbits.com> wrote:

> Hi Steven,
> 
> On Thu, Oct 12, 2017 at 6:44 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > [ Resending again, including linux-pm@vger.kernel.org this time ]
> >
> > From: Steven Rostedt (VMware) <rostedt@goodmis.org>
> >
> > Commit 74704ac6 ("tracing, perf: Add more power related events") added
> > new events, among them were trace_clock_enable, trace_clock_disable and
> > trace_clock_set_rate. In the last 7 years, nothing has used them. As
> > they take up space, and nobody cares about these events, remove them.  
> 
> Ok if it is not used. Can others confirm?
> 
> AFAIK this has been used internally.

If it has been used internally, then the events should be defined
internally. The trace event hooks are not there, there's no reason to
define events were hooks are not present. There's no advantage for
keeping them in the kernel proper.

-- Steve
diff mbox

Patch

diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index 54e3aad..d900cb7 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -254,53 +254,6 @@  DEFINE_EVENT(wakeup_source,
wakeup_source_deactivate, );
 
 /*
- * The clock events are used for clock enable/disable and for
- *  clock rate change
- */
-DECLARE_EVENT_CLASS(clock,
-
-	TP_PROTO(const char *name, unsigned int state, unsigned int
cpu_id), -
-	TP_ARGS(name, state, cpu_id),
-
-	TP_STRUCT__entry(
-		__string(       name,           name            )
-		__field(        u64,            state           )
-		__field(        u64,            cpu_id          )
-	),
-
-	TP_fast_assign(
-		__assign_str(name, name);
-		__entry->state = state;
-		__entry->cpu_id = cpu_id;
-	),
-
-	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
  */
 DECLARE_EVENT_CLASS(power_domain,