msm: kgsl: Add trace for throttling counters
Trace active and idle counters and DCVS adjustement. CRs-Fixed: 1055047 Change-Id: I60d30192c55efd8b0d5dc455343464d29648281e Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
This commit is contained in:
parent
aaf356abef
commit
e82f6a22ad
2 changed files with 44 additions and 3 deletions
|
@ -1279,7 +1279,7 @@ static void _setup_throttling_counters(struct adreno_device *adreno_dev)
|
|||
|
||||
static uint64_t _read_throttling_counters(struct adreno_device *adreno_dev)
|
||||
{
|
||||
int i;
|
||||
int i, adj;
|
||||
uint32_t th[ADRENO_GPMU_THROTTLE_COUNTERS];
|
||||
struct adreno_busy_data *busy = &adreno_dev->busy_data;
|
||||
|
||||
|
@ -1300,8 +1300,14 @@ static uint64_t _read_throttling_counters(struct adreno_device *adreno_dev)
|
|||
adreno_dev->gpmu_throttle_counters[i],
|
||||
&busy->throttle_cycles[i]);
|
||||
}
|
||||
i = th[CRC_MORE50PCT] - th[IDLE_10PCT];
|
||||
return th[CRC_50PCT] + th[CRC_LESS50PCT] / 3 + (i < 0 ? 0 : i) * 3;
|
||||
adj = th[CRC_MORE50PCT] - th[IDLE_10PCT];
|
||||
adj = th[CRC_50PCT] + th[CRC_LESS50PCT] / 3 + (adj < 0 ? 0 : adj) * 3;
|
||||
|
||||
trace_kgsl_clock_throttling(
|
||||
th[IDLE_10PCT], th[CRC_50PCT],
|
||||
th[CRC_MORE50PCT], th[CRC_LESS50PCT],
|
||||
adj);
|
||||
return adj;
|
||||
}
|
||||
|
||||
static void _update_threshold_count(struct adreno_device *adreno_dev,
|
||||
|
|
|
@ -1192,6 +1192,41 @@ TRACE_EVENT(sparse_unbind,
|
|||
);
|
||||
|
||||
|
||||
TRACE_EVENT(kgsl_clock_throttling,
|
||||
TP_PROTO(
|
||||
int idle_10pct,
|
||||
int crc_50pct,
|
||||
int crc_more50pct,
|
||||
int crc_less50pct,
|
||||
int adj
|
||||
),
|
||||
TP_ARGS(
|
||||
idle_10pct,
|
||||
crc_50pct,
|
||||
crc_more50pct,
|
||||
crc_less50pct,
|
||||
adj
|
||||
),
|
||||
TP_STRUCT__entry(
|
||||
__field(int, idle_10pct)
|
||||
__field(int, crc_50pct)
|
||||
__field(int, crc_more50pct)
|
||||
__field(int, crc_less50pct)
|
||||
__field(int, adj)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->idle_10pct = idle_10pct;
|
||||
__entry->crc_50pct = crc_50pct;
|
||||
__entry->crc_more50pct = crc_more50pct;
|
||||
__entry->crc_less50pct = crc_less50pct;
|
||||
__entry->adj = adj;
|
||||
),
|
||||
TP_printk("idle_10=%d crc_50=%d crc_more50=%d crc_less50=%d adj=%d",
|
||||
__entry->idle_10pct, __entry->crc_50pct, __entry->crc_more50pct,
|
||||
__entry->crc_less50pct, __entry->adj
|
||||
)
|
||||
);
|
||||
|
||||
#endif /* _KGSL_TRACE_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
|
Loading…
Add table
Reference in a new issue