mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
msm-perf: Added threshold check for perf_event
Added cycle threshold check to perf_events to filter ipc ratio. Change-Id: Iedc4ab37eb8668d7019b20a784ad0c0e86ce51df Signed-off-by: richagar <richagar@codeaurora.org>
This commit is contained in:
parent
986ca5b1f1
commit
1df107b4e5
1 changed files with 2 additions and 1 deletions
|
|
@ -37,6 +37,7 @@
|
|||
#define INST_EV 0x08 /* 0th event*/
|
||||
#define CYC_EV 0x11 /* 1st event*/
|
||||
#define INIT "Init"
|
||||
#define CPU_CYCLE_THRESHOLD 650000
|
||||
static DEFINE_PER_CPU(bool, cpu_is_idle);
|
||||
static DEFINE_PER_CPU(bool, cpu_is_hp);
|
||||
static DEFINE_MUTEX(perfevent_lock);
|
||||
|
|
@ -588,7 +589,7 @@ static int get_cpu_total_instruction(char *buf, const struct kernel_param *kp)
|
|||
cycles = pmu_events[CYC_EVENT][cpu].cur_delta;
|
||||
/* collecting max inst and ipc for max cap and min cap cpus */
|
||||
if (max_cap_cpus[cpu]) {
|
||||
if (cycles)
|
||||
if (cycles && cycles >= CPU_CYCLE_THRESHOLD)
|
||||
ipc_big = max(ipc_big,
|
||||
((instruction*100)/cycles));
|
||||
total_inst_big += instruction;
|
||||
|
|
|
|||
Loading…
Reference in a new issue