summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Katragadda <dkatraga@codeaurora.org>2016-11-01 10:46:59 -0700
committerDeepak Katragadda <dkatraga@codeaurora.org>2016-11-01 13:53:35 -0700
commit5fa9ed4664b35e7563b9f0e2f8a2a453ffa15462 (patch)
tree77c78f7fd6bcc046a7fb2661dcac9d947139ea59
parent9a5e4de1022b15364b14eee9bb09cfcda1601eb7 (diff)
clk: msm: clock-debug: Print VDD level in clock_state traces
Add support for printing the voltage voting info to the clock_state ftrace events. CRs-Fixed: 1082843 Change-Id: I6ab3992958a659995b7d5020287fd6e47e28f2a4 Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
-rw-r--r--drivers/clk/msm/clock-debug.c8
-rw-r--r--include/trace/events/power.h12
2 files changed, 14 insertions, 6 deletions
diff --git a/drivers/clk/msm/clock-debug.c b/drivers/clk/msm/clock-debug.c
index d0ff821eb203..00a86ba55171 100644
--- a/drivers/clk/msm/clock-debug.c
+++ b/drivers/clk/msm/clock-debug.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2007 Google, Inc.
- * Copyright (c) 2007-2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2007-2014, 2016, The Linux Foundation. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -355,8 +355,12 @@ static int trace_clocks_show(struct seq_file *m, void *unused)
return 1;
}
list_for_each_entry(c, &clk_list, list) {
+ int vlevel = 0;
+
+ if (c->num_fmax)
+ vlevel = find_vdd_level(c, c->rate);
trace_clock_state(c->dbg_name, c->prepare_count, c->count,
- c->rate);
+ c->rate, vlevel);
total_cnt++;
}
mutex_unlock(&clk_list_lock);
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index e8bc27f3467e..bc33e91ec5e6 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -369,15 +369,17 @@ TRACE_EVENT(clock_set_parent,
TRACE_EVENT(clock_state,
TP_PROTO(const char *name, unsigned long prepare_count,
- unsigned long count, unsigned long rate),
+ unsigned long count, unsigned long rate,
+ unsigned int vdd_level),
- TP_ARGS(name, prepare_count, count, rate),
+ TP_ARGS(name, prepare_count, count, rate, vdd_level),
TP_STRUCT__entry(
__string(name, name)
__field(unsigned long, prepare_count)
__field(unsigned long, count)
__field(unsigned long, rate)
+ __field(unsigned int, vdd_level)
),
TP_fast_assign(
@@ -385,10 +387,12 @@ TRACE_EVENT(clock_state,
__entry->prepare_count = prepare_count;
__entry->count = count;
__entry->rate = rate;
+ __entry->vdd_level = vdd_level;
),
- TP_printk("%s\t[%lu:%lu]\t%lu", __get_str(name), __entry->prepare_count,
- __entry->count, __entry->rate)
+ TP_printk("%s\tprepare:enable cnt [%lu:%lu]\trate: vdd level [%lu:%u]",
+ __get_str(name), __entry->prepare_count,
+ __entry->count, __entry->rate, __entry->vdd_level)
);
/*