RE: [PATCH 13/14] perf tools: warn on high overhead

From: Liang, Kan
Date: Wed Nov 23 2016 - 17:03:37 EST




>
> kan.liang@xxxxxxxxx writes:
>
> > From: Kan Liang <kan.liang@xxxxxxxxx>
> >
> > The rough overhead rate can be caculated by the sum of all kinds of
> > overhead / elapsed time.
> > If the overhead rate is higher than 10%, warning the user.
>
> Thinking about this more: this is comparing the cost of a single CPU to the
> total wall clock time. This isn't very good and can give confusing results with
> many cores.
>
> Perhaps we need two separate metrics here:
>
> - cost of perf record on its CPU (or later on if it gets multi threaded
> more multiple). Warn if this is >50% or so.

What's the formula for cost of perf record on its CPU?
The cost only includes user space overhead or all overhead?
What is the divisor?


> - average perf collection overhead on a CPU. The 10% threshold here
> seems appropiate.
For the average, do you mean add all overheads among CPUs together
and divide the CPU#?

To calculate the rate, the divisor is wall clock time, right?

Thanks,
Kan