diff options
| author | Rohit Gupta <rohgup@codeaurora.org> | 2014-12-02 09:56:49 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:22:27 -0700 |
| commit | ad20b57ffba6c4577b31a94b11ab86ba01bacbe8 (patch) | |
| tree | b02f5ce1c6f11212602e65b54c81433d95bb9ca3 /include/trace | |
| parent | d1e73b29199f806ece2c5bb5ea18b1c231915ed6 (diff) | |
soc: qcom: msm_perf: Detect & notify userspace about heavy CPU loads
Detect single and multi threaded heavy workloads based on loads
received from interactive governor.
- If the max load across all the CPUs is greater than a
user-specified threshold for certain number of governor windows
then the load is detected as a single-threaded workload.
- If the total load across all the CPUs is greater than a
user-specified threshold for certain number of governor windows
then the load is detected as a multi-threaded workload.
If one of these is detected then a notification is sent to the
userspace so that an entity can read the nodes exposed to get an
idea of the nature of workload running.
Change-Id: Iba75d26fb3981886b3a8460d5f8999a632bbb73a
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/power.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index fc3084240bf2..45382f5479bf 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -827,6 +827,54 @@ DEFINE_EVENT(kpm_module2, track_iowait, TP_ARGS(cpu, cycles, io_busy, iowait) ); +DECLARE_EVENT_CLASS(cpu_modes, + + TP_PROTO(unsigned int cpu, unsigned int max_load, + unsigned int single_cycles, unsigned int total_load, + unsigned int multi_cycles, unsigned int mode, + unsigned int cpu_cnt), + + TP_ARGS(cpu, max_load, single_cycles, total_load, multi_cycles, + mode, cpu_cnt), + + TP_STRUCT__entry( + __field(u32, cpu) + __field(u32, max_load) + __field(u32, single_cycles) + __field(u32, total_load) + __field(u32, multi_cycles) + __field(u32, mode) + __field(u32, cpu_cnt) + ), + + TP_fast_assign( + __entry->cpu = cpu; + __entry->max_load = max_load; + __entry->single_cycles = single_cycles; + __entry->total_load = total_load; + __entry->multi_cycles = multi_cycles; + __entry->mode = mode; + __entry->cpu_cnt = cpu_cnt; + ), + + TP_printk("CPU:%u ml=%4u sc=%4u tl=%4u mc=%4u mode=%4u cpu_cnt=%u", + (unsigned int)__entry->cpu, (unsigned int)__entry->max_load, + (unsigned int)__entry->single_cycles, + (unsigned int)__entry->total_load, + (unsigned int)__entry->multi_cycles, + (unsigned int)__entry->mode, + (unsigned int)__entry->cpu_cnt) +); + +DEFINE_EVENT(cpu_modes, cpu_mode_detect, + TP_PROTO(unsigned int cpu, unsigned int max_load, + unsigned int single_cycles, unsigned int total_load, + unsigned int multi_cycles, unsigned int mode, + unsigned int cpu_cnt), + TP_ARGS(cpu, max_load, single_cycles, total_load, multi_cycles, + mode, cpu_cnt) +); + #endif /* _TRACE_POWER_H */ /* This part must be outside protection */ |
