[lldb-dev] [RFC] Fast Conditional Breakpoints (FCB)
Finkel, Hal J. via lldb-dev
lldb-dev at lists.llvm.org
Wed Aug 14 15:42:42 PDT 2019
On 8/14/19 3:52 PM, Ismail Bennani via lldb-dev wrote:
> Hi everyone,
>
> I’m Ismail, a compiler engineer intern at Apple. As a part of my internship,
> I'm adding Fast Conditional Breakpoints to LLDB, using code patching.
>
> ...
>
> Since all the registers are already mapped to a structure, I should
> be able to support more __DWARF Operations__ in the future.
>
> After collecting some metrics on the __Clang__ binary, built at __-O0__,
> the debug info shows that __99%__ of the most used DWARF Operations are :
>
> |DWARF Operation| Occurrences |
> |---------------|---------------------------|
> |DW\_OP_fbreg | 2 114 612 |
> |DW\_OP_reg | 820 548 |
> |DW\_OP_constu | 267 450 |
> |DW\_OP_addr | 17 370 |
>
> | __Top 4__ | __3 219 980 Occurrences__ |
> |---------------|---------------------------|
> | __Total__ | __3 236 859 Occurrences__ |
>
> Those 4 operations are the one that I'll support for now.
> To support more complex expressions, we would need to JIT-compile
> a DWARF expression interpreter.
First, this all sounds really useful.
Out of curiosity, how do these statistics change if you compile Clang
with -O1? Many of my users need to debug slightly-optimized code.
-Hal
--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory
More information about the lldb-dev
mailing list