[cfe-dev] Checkers time statistic

Ben Craig via cfe-dev cfe-dev at lists.llvm.org
Fri Oct 16 10:48:57 PDT 2015


Dmitry,
I'm going to agree with Devin here.  I would find it very interesting to know which checkers add more state to the core engine.

I've done some profiling on the static analyzer myself.  You can look at this thread to see what I found:
http://lists.llvm.org/pipermail/cfe-dev/2015-August/044825.html

One note there that will echo what Devin said is that checkers only account for a small portion of the time in the analyzer (~10%).

Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

-----Original Message-----
From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Devin Coughlin via cfe-dev
Sent: Friday, October 16, 2015 12:13 PM
To: Plotnikov Dmitry
Cc: cfe-dev at lists.llvm.org
Subject: Re: [cfe-dev] Checkers time statistic

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
_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list