123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- /* Copyright (c) 2012, 2014-2018, 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_pred_select,
- TP_PROTO(u32 predtype, u64 predicted, u32 tmr_time),
- TP_ARGS(predtype, predicted, tmr_time),
- TP_STRUCT__entry(
- __field(u32, predtype)
- __field(u64, predicted)
- __field(u32, tmr_time)
- ),
- TP_fast_assign(
- __entry->predtype = predtype;
- __entry->predicted = predicted;
- __entry->tmr_time = tmr_time;
- ),
- TP_printk("pred:%u time:%lu tmr_time:%u",
- __entry->predtype, (unsigned long)__entry->predicted,
- __entry->tmr_time)
- );
- TRACE_EVENT(cpu_pred_hist,
- TP_PROTO(int idx, u32 resi, u32 sample, u32 tmr),
- TP_ARGS(idx, resi, sample, tmr),
- TP_STRUCT__entry(
- __field(int, idx)
- __field(u32, resi)
- __field(u32, sample)
- __field(u32, tmr)
- ),
- TP_fast_assign(
- __entry->idx = idx;
- __entry->resi = resi;
- __entry->sample = sample;
- __entry->tmr = tmr;
- ),
- TP_printk("idx:%d resi:%u sample:%u tmr:%u",
- __entry->idx, __entry->resi,
- __entry->sample, __entry->tmr)
- );
- 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(cluster_pred_select,
- TP_PROTO(const char *name, int index, u32 sleep_us,
- u32 latency, int pred, u32 pred_us),
- TP_ARGS(name, index, sleep_us, latency, pred, pred_us),
- TP_STRUCT__entry(
- __field(const char *, name)
- __field(int, index)
- __field(u32, sleep_us)
- __field(u32, latency)
- __field(int, pred)
- __field(u32, pred_us)
- ),
- TP_fast_assign(
- __entry->name = name;
- __entry->index = index;
- __entry->sleep_us = sleep_us;
- __entry->latency = latency;
- __entry->pred = pred;
- __entry->pred_us = pred_us;
- ),
- TP_printk("name:%s idx:%d sleep_time:%u latency:%u pred:%d pred_us:%u",
- __entry->name, __entry->index, __entry->sleep_us,
- __entry->latency, __entry->pred, __entry->pred_us)
- );
- TRACE_EVENT(cluster_pred_hist,
- TP_PROTO(const char *name, int idx, u32 resi,
- u32 sample, u32 tmr),
- TP_ARGS(name, idx, resi, sample, tmr),
- TP_STRUCT__entry(
- __field(const char *, name)
- __field(int, idx)
- __field(u32, resi)
- __field(u32, sample)
- __field(u32, tmr)
- ),
- TP_fast_assign(
- __entry->name = name;
- __entry->idx = idx;
- __entry->resi = resi;
- __entry->sample = sample;
- __entry->tmr = tmr;
- ),
- TP_printk("name:%s idx:%d resi:%u sample:%u tmr:%u",
- __entry->name, __entry->idx, __entry->resi,
- __entry->sample, __entry->tmr)
- );
- 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>
|