[cfe-dev] speed up debugging a static analysis checker?
Lou Wynn via cfe-dev
cfe-dev at lists.llvm.org
Fri Sep 28 18:35:04 PDT 2018
My simplified test case file only contains one function, with others
commented out.
I tried the RelWithDebInfo CMake build type, it slightly reduced the
time to reach the first breakpoint from 21 to 16 seconds when I ran it
with lldb command line. But when I debug clang in vscode, this
configuration doesn't stop at the breakpoint (with the CodeLLDB
extension). The Debug build stops at the breakpoint. Saving 4 seconds on
command line is not useful because setting or canceling a breakpoint on
the command line takes more time for me in the unfamiliar code base.
I already used gdb-add-index to the clang executable file.
Any other method might help?
How much time does it take you to stop at a breakpoint in a checker?
Love,
Lou
On 09/28/2018 02:27 PM, George Karpenkov 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180928/78a66295/attachment.html>
More information about the cfe-dev
mailing list