[cfe-dev] speed up debugging a static analysis checker?

George Karpenkov via cfe-dev cfe-dev at lists.llvm.org
Wed Oct 3 11:12:50 PDT 2018


Hi Lou,

Somehow I haven’t seen your follow up email.
Can you describe a full reproducible example?
With an exact command line invocation, exact input file, and exact breakpoint line.

George

> On Sep 28, 2018, at 2:27 PM, George Karpenkov via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hi Lou,
> 
> You probably want to only debug the analysis running on a function you are interested in.
> -Xclang -analyzer-display-progress
> shows what functions the analyzer is going through, and
> -Xclang -analyze-function “function-name”
> let’s you select the function (use the exact name copied from the previous list).
> 
> You can also try release+debuginfo configuration if the former is too slow.
> 20 seconds does sound excessive for a simple test file in any case though, so that is strange.
> 
>> On Sep 28, 2018, at 1:49 PM, Lou Wynn via cfe-dev <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
>> 
>> Hi,
>> 
>> I'm now having a question of how to speed up startup runs of a static analysis checker in the lldb debugger. It takes about 21 seconds for the debugger to stop at the first breakpoint at the SimpleStreamChecker::checkPreCall function when I run the following command:
>> 
>> lldb-6.0 -- clang-8 -cc1 -analyze -analyzer-checker=alpha.unix.SimpleStream \
>>  test/Analysis/simple-stream-checks.c
>> Are there ways to make it faster? I run many debugging sessions not only to figure out how the static analyzer works but also to debug my first checker. Any time saving method is appreciated.
>> 
>> -- 
>> Love,
>> Lou
>> 
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181003/52c0e6d3/attachment.html>


More information about the cfe-dev mailing list