[cfe-dev] Checkers time statistic

Devin Coughlin via cfe-dev cfe-dev at lists.llvm.org
Fri Oct 16 10:12:35 PDT 2015


Hi Dmitry,

Thanks for the patch!

> On Oct 15, 2015, at 8:40 AM, Plotnikov Dmitry via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Sometimes Clang analyzer works slowly, so I implemented timers that measure actual work time for each checker. 

In general, the analyzer doesn’t spend very much of its time in checkers themselves — most analysis time is spent in the core engine managing analysis state.

This is not to say that checkers don’t contribute to analysis time, but typically this is not by computation in the checkers themselves but rather in the analysis state they create. This state is propagated and canonicalized along the paths the analyzer explores later. In other words, I think it is quite hard to determine how much to “charge” each checker for the extra analysis time it causes.

I wonder if rather than measuring time spent in checkers it might be more indicative to measure how much extra *state* each checker introduces. That is, you could track statistics about how many entries each checker keeps in ProgramState’s generic data map.

What do you think?

Devin


More information about the cfe-dev mailing list