linux/include/trace/events/clk.h
<<
>>
Prefs
   1/*
   2 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
   3 *
   4 * This software is licensed under the terms of the GNU General Public
   5 * License version 2, as published by the Free Software Foundation, and
   6 * may be copied, distributed, and modified under those terms.
   7 *
   8 * This program is distributed in the hope that it will be useful,
   9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11 * GNU General Public License for more details.
  12 */
  13#undef TRACE_SYSTEM
  14#define TRACE_SYSTEM clk
  15
  16#if !defined(_TRACE_CLK_H) || defined(TRACE_HEADER_MULTI_READ)
  17#define _TRACE_CLK_H
  18
  19#include <linux/tracepoint.h>
  20
  21struct clk_core;
  22
  23DECLARE_EVENT_CLASS(clk,
  24
  25        TP_PROTO(struct clk_core *core),
  26
  27        TP_ARGS(core),
  28
  29        TP_STRUCT__entry(
  30                __string(        name,           core->name       )
  31        ),
  32
  33        TP_fast_assign(
  34                __assign_str(name, core->name);
  35        ),
  36
  37        TP_printk("%s", __get_str(name))
  38);
  39
  40DEFINE_EVENT(clk, clk_enable,
  41
  42        TP_PROTO(struct clk_core *core),
  43
  44        TP_ARGS(core)
  45);
  46
  47DEFINE_EVENT(clk, clk_enable_complete,
  48
  49        TP_PROTO(struct clk_core *core),
  50
  51        TP_ARGS(core)
  52);
  53
  54DEFINE_EVENT(clk, clk_disable,
  55
  56        TP_PROTO(struct clk_core *core),
  57
  58        TP_ARGS(core)
  59);
  60
  61DEFINE_EVENT(clk, clk_disable_complete,
  62
  63        TP_PROTO(struct clk_core *core),
  64
  65        TP_ARGS(core)
  66);
  67
  68DEFINE_EVENT(clk, clk_prepare,
  69
  70        TP_PROTO(struct clk_core *core),
  71
  72        TP_ARGS(core)
  73);
  74
  75DEFINE_EVENT(clk, clk_prepare_complete,
  76
  77        TP_PROTO(struct clk_core *core),
  78
  79        TP_ARGS(core)
  80);
  81
  82DEFINE_EVENT(clk, clk_unprepare,
  83
  84        TP_PROTO(struct clk_core *core),
  85
  86        TP_ARGS(core)
  87);
  88
  89DEFINE_EVENT(clk, clk_unprepare_complete,
  90
  91        TP_PROTO(struct clk_core *core),
  92
  93        TP_ARGS(core)
  94);
  95
  96DECLARE_EVENT_CLASS(clk_rate,
  97
  98        TP_PROTO(struct clk_core *core, unsigned long rate),
  99
 100        TP_ARGS(core, rate),
 101
 102        TP_STRUCT__entry(
 103                __string(        name,           core->name                )
 104                __field(unsigned long,           rate                      )
 105        ),
 106
 107        TP_fast_assign(
 108                __assign_str(name, core->name);
 109                __entry->rate = rate;
 110        ),
 111
 112        TP_printk("%s %lu", __get_str(name), (unsigned long)__entry->rate)
 113);
 114
 115DEFINE_EVENT(clk_rate, clk_set_rate,
 116
 117        TP_PROTO(struct clk_core *core, unsigned long rate),
 118
 119        TP_ARGS(core, rate)
 120);
 121
 122DEFINE_EVENT(clk_rate, clk_set_rate_complete,
 123
 124        TP_PROTO(struct clk_core *core, unsigned long rate),
 125
 126        TP_ARGS(core, rate)
 127);
 128
 129DECLARE_EVENT_CLASS(clk_parent,
 130
 131        TP_PROTO(struct clk_core *core, struct clk_core *parent),
 132
 133        TP_ARGS(core, parent),
 134
 135        TP_STRUCT__entry(
 136                __string(        name,           core->name                )
 137                __string(        pname,          parent->name              )
 138        ),
 139
 140        TP_fast_assign(
 141                __assign_str(name, core->name);
 142                __assign_str(pname, parent->name);
 143        ),
 144
 145        TP_printk("%s %s", __get_str(name), __get_str(pname))
 146);
 147
 148DEFINE_EVENT(clk_parent, clk_set_parent,
 149
 150        TP_PROTO(struct clk_core *core, struct clk_core *parent),
 151
 152        TP_ARGS(core, parent)
 153);
 154
 155DEFINE_EVENT(clk_parent, clk_set_parent_complete,
 156
 157        TP_PROTO(struct clk_core *core, struct clk_core *parent),
 158
 159        TP_ARGS(core, parent)
 160);
 161
 162DECLARE_EVENT_CLASS(clk_phase,
 163
 164        TP_PROTO(struct clk_core *core, int phase),
 165
 166        TP_ARGS(core, phase),
 167
 168        TP_STRUCT__entry(
 169                __string(        name,           core->name                )
 170                __field(          int,           phase                     )
 171        ),
 172
 173        TP_fast_assign(
 174                __assign_str(name, core->name);
 175                __entry->phase = phase;
 176        ),
 177
 178        TP_printk("%s %d", __get_str(name), (int)__entry->phase)
 179);
 180
 181DEFINE_EVENT(clk_phase, clk_set_phase,
 182
 183        TP_PROTO(struct clk_core *core, int phase),
 184
 185        TP_ARGS(core, phase)
 186);
 187
 188DEFINE_EVENT(clk_phase, clk_set_phase_complete,
 189
 190        TP_PROTO(struct clk_core *core, int phase),
 191
 192        TP_ARGS(core, phase)
 193);
 194
 195#endif /* _TRACE_CLK_H */
 196
 197/* This part must be outside protection */
 198#include <trace/define_trace.h>
 199