summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorMahesh Sivasubramanian <msivasub@codeaurora.org>2016-02-01 10:40:26 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:07:18 -0700
commitc184ee865f4dd565b25e814517bb63477f27b15a (patch)
treedd014ec04147641dcefc79a1281f1ae20b2de118 /include/trace
parenta3b546e50972ed14a930b3a47a0ea599e0350548 (diff)
soc: qcom: idle: Snapshot of idle/sleep driver as of msm-3.18
This is a snapshot of the Sleep driver and realted functionality as of e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 on msm-3.18 branch Change-Id: I98fec26849898c5c66abbb1b094439780c23964d
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/trace_msm_core.h103
-rw-r--r--include/trace/events/trace_msm_low_power.h167
2 files changed, 270 insertions, 0 deletions
diff --git a/include/trace/events/trace_msm_core.h b/include/trace/events/trace_msm_core.h
new file mode 100644
index 000000000000..d99b72ca63fa
--- /dev/null
+++ b/include/trace/events/trace_msm_core.h
@@ -0,0 +1,103 @@
+/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM msm_core
+
+#if !defined(_TRACE_MSM_CORE_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_MSM_CORE_H
+
+#include <linux/tracepoint.h>
+#include <linux/thermal.h>
+
+TRACE_EVENT(cpu_stats,
+
+ TP_PROTO(unsigned int cpu, long temp,
+ uint64_t min_power, uint64_t max_power),
+
+ TP_ARGS(cpu, temp, min_power, max_power),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, cpu)
+ __field(long, temp)
+ __field(uint64_t, min_power)
+ __field(uint64_t, max_power)
+ ),
+
+ TP_fast_assign(
+ __entry->cpu = cpu;
+ __entry->temp = temp;
+ __entry->min_power = min_power;
+ __entry->max_power = max_power;
+ ),
+
+ TP_printk("Cpu%d: temp:%ld power@minfreq:%llu power@maxfreq:%llu",
+ __entry->cpu, __entry->temp, __entry->min_power,
+ __entry->max_power)
+);
+
+TRACE_EVENT(temp_threshold,
+
+ TP_PROTO(unsigned int cpu, long temp,
+ long hi_thresh, long low_thresh),
+
+ TP_ARGS(cpu, temp, hi_thresh, low_thresh),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, cpu)
+ __field(long, temp)
+ __field(long, hi_thresh)
+ __field(long, low_thresh)
+ ),
+
+ TP_fast_assign(
+ __entry->cpu = cpu;
+ __entry->temp = temp;
+ __entry->hi_thresh = hi_thresh;
+ __entry->low_thresh = low_thresh;
+ ),
+
+ TP_printk("Cpu%d: temp:%ld hi_thresh:%ld low_thresh:%ld",
+ __entry->cpu, __entry->temp, __entry->hi_thresh,
+ __entry->low_thresh)
+);
+
+TRACE_EVENT(temp_notification,
+
+ TP_PROTO(unsigned int sensor_id, enum thermal_trip_type type,
+ int temp, int prev_temp),
+
+ TP_ARGS(sensor_id, type, temp, prev_temp),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, sensor_id)
+ __field(enum thermal_trip_type, type)
+ __field(int, temp)
+ __field(int, prev_temp)
+ ),
+
+ TP_fast_assign(
+ __entry->sensor_id = sensor_id;
+ __entry->type = type;
+ __entry->temp = temp;
+ __entry->prev_temp = prev_temp;
+ ),
+
+ TP_printk("Sensor_id%d: %s threshold triggered temp:%d(previous:%d)",
+ __entry->sensor_id,
+ __entry->type == THERMAL_TRIP_CONFIGURABLE_HI ? "High" : "Low",
+ __entry->temp, __entry->prev_temp)
+);
+
+#endif
+#define TRACE_INCLUDE_FILE trace_msm_core
+#include <trace/define_trace.h>
diff --git a/include/trace/events/trace_msm_low_power.h b/include/trace/events/trace_msm_low_power.h
new file mode 100644
index 000000000000..691df1b2689b
--- /dev/null
+++ b/include/trace/events/trace_msm_low_power.h
@@ -0,0 +1,167 @@
+/* Copyright (c) 2012, 2014-2015, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM msm_low_power
+
+#if !defined(_TRACE_MSM_LOW_POWER_H_) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_MSM_LOW_POWER_H_
+
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(cpu_power_select,
+
+ TP_PROTO(int index, u32 sleep_us, u32 latency, u32 next_event_us),
+
+ TP_ARGS(index, sleep_us, latency, next_event_us),
+
+ TP_STRUCT__entry(
+ __field(int, index)
+ __field(u32, sleep_us)
+ __field(u32, latency)
+ __field(u32, next_event_us)
+ ),
+
+ TP_fast_assign(
+ __entry->index = index;
+ __entry->sleep_us = sleep_us;
+ __entry->latency = latency;
+ __entry->next_event_us = next_event_us;
+ ),
+
+ TP_printk("idx:%d sleep_time:%u latency:%u next_event:%u",
+ __entry->index, __entry->sleep_us, __entry->latency,
+ __entry->next_event_us)
+);
+
+TRACE_EVENT(cpu_idle_enter,
+
+ TP_PROTO(int index),
+
+ TP_ARGS(index),
+
+ TP_STRUCT__entry(
+ __field(int, index)
+ ),
+
+ TP_fast_assign(
+ __entry->index = index;
+ ),
+
+ TP_printk("idx:%d",
+ __entry->index)
+);
+
+TRACE_EVENT(cpu_idle_exit,
+
+ TP_PROTO(int index, bool success),
+
+ TP_ARGS(index, success),
+
+ TP_STRUCT__entry(
+ __field(int, index)
+ __field(bool, success)
+ ),
+
+ TP_fast_assign(
+ __entry->index = index;
+ __entry->success = success;
+ ),
+
+ TP_printk("idx:%d success:%d",
+ __entry->index,
+ __entry->success)
+);
+
+TRACE_EVENT(cluster_enter,
+
+ TP_PROTO(const char *name, int index, unsigned long sync_cpus,
+ unsigned long child_cpus, bool from_idle),
+
+ TP_ARGS(name, index, sync_cpus, child_cpus, from_idle),
+
+ TP_STRUCT__entry(
+ __field(const char *, name)
+ __field(int, index)
+ __field(unsigned long, sync_cpus)
+ __field(unsigned long, child_cpus)
+ __field(bool, from_idle)
+ ),
+
+ TP_fast_assign(
+ __entry->name = name;
+ __entry->index = index;
+ __entry->sync_cpus = sync_cpus;
+ __entry->child_cpus = child_cpus;
+ __entry->from_idle = from_idle;
+ ),
+
+ TP_printk("cluster_name:%s idx:%d sync:0x%lx child:0x%lx idle:%d",
+ __entry->name,
+ __entry->index,
+ __entry->sync_cpus,
+ __entry->child_cpus,
+ __entry->from_idle)
+);
+
+TRACE_EVENT(cluster_exit,
+
+ TP_PROTO(const char *name, int index, unsigned long sync_cpus,
+ unsigned long child_cpus, bool from_idle),
+
+ TP_ARGS(name, index, sync_cpus, child_cpus, from_idle),
+
+ TP_STRUCT__entry(
+ __field(const char *, name)
+ __field(int, index)
+ __field(unsigned long, sync_cpus)
+ __field(unsigned long, child_cpus)
+ __field(bool, from_idle)
+ ),
+
+ TP_fast_assign(
+ __entry->name = name;
+ __entry->index = index;
+ __entry->sync_cpus = sync_cpus;
+ __entry->child_cpus = child_cpus;
+ __entry->from_idle = from_idle;
+ ),
+
+ TP_printk("cluster_name:%s idx:%d sync:0x%lx child:0x%lx idle:%d",
+ __entry->name,
+ __entry->index,
+ __entry->sync_cpus,
+ __entry->child_cpus,
+ __entry->from_idle)
+);
+
+TRACE_EVENT(pre_pc_cb,
+
+ TP_PROTO(int tzflag),
+
+ TP_ARGS(tzflag),
+
+ TP_STRUCT__entry(
+ __field(int, tzflag)
+ ),
+
+ TP_fast_assign(
+ __entry->tzflag = tzflag;
+ ),
+
+ TP_printk("tzflag:%d",
+ __entry->tzflag
+ )
+);
+#endif
+#define TRACE_INCLUDE_FILE trace_msm_low_power
+#include <trace/define_trace.h>