__entry->migrate, __entry->label)
);
+TRACE_EVENT(ehmp_lbt_overutilized,
+
+ TP_PROTO(int cpu, int level, unsigned long util, unsigned long capacity, bool overutilized),
+
+ TP_ARGS(cpu, level, util, capacity, overutilized),
+
+ TP_STRUCT__entry(
+ __field( int, cpu )
+ __field( int, level )
+ __field( unsigned long, util )
+ __field( unsigned long, capacity )
+ __field( bool, overutilized )
+ ),
+
+ TP_fast_assign(
+ __entry->cpu = cpu;
+ __entry->level = level;
+ __entry->util = util;
+ __entry->capacity = capacity;
+ __entry->overutilized = overutilized;
+ ),
+
+ TP_printk("cpu=%d level=%d util=%lu capacity=%lu overutilized=%d",
+ __entry->cpu, __entry->level, __entry->util,
+ __entry->capacity, __entry->overutilized)
+);
+
#endif /* _TRACE_EHMP_H */
/* This part must be outside protection */
bool lbt_overutilized(int cpu, int level)
{
struct lbt_overutil *ou = per_cpu(lbt_overutil, cpu);
+ bool overutilized;
if (!ou)
return false;
- return cpu_util(cpu) > ou[level].capacity;
+ overutilized = (cpu_util(cpu) > ou[level].capacity) ? true : false;
+
+ if (overutilized)
+ trace_ehmp_lbt_overutilized(cpu, level, cpu_util(cpu),
+ ou[level].capacity, overutilized);
+
+ return overutilized;
}
void update_lbt_overutil(int cpu, unsigned long capacity)