[PATCH] Add documentation for sample profiling support.

Diego Novillo dnovillo at google.com
Tue Apr 22 17:33:27 PDT 2014


On Tue, Apr 22, 2014 at 7:13 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> On Tue, Apr 22, 2014 at 2:55 PM, Diego Novillo <dnovillo at google.com>wrote:
>
>>
>> ================
>>> Comment at: docs/UsersManual.rst:1176-1178
>>> @@ +1175,5 @@
>>> +
>>> +b. [OPTIONAL] Discriminator. This is used if the sampled program
>>> +   was compiled with DWARF discriminator support
>>> +   (http://wiki.dwarfstd.org/index.php?title=Path_Discriminators)
>>> +
>>> ----------------
>>> ... and what is it, in that case? At a guess: "If present, this is a
>>> decimal integer representing the value of the DWARF discriminator register."
>>>
>>>
>> Done.
>>
>
> Thanks, this helps -- it explains why we'd want this. But it still doesn't
> answer my question of what value is specified here, and how it's
> represented.
>

Ah. Fixed.


>  Or are you thinking something else?
>>
>
> More mundane cases than that =) For instance:
>
> file.def:
>   FOO(a)
>   FOO(b)
>   FOO(c)
>   #undef FOO
>
> file.cc:
>   void f() {
>     #define FOO(x) x = 0;
>     #include "file.def"
>   }
>
> or simply:
>
> file.cc:
>   void f() {
>     assert(some_expensive_call());
>   }
>

Oh, macros. Yeah, macros are an issue wrt -gmlt. The problem is that they
give the line number at the point of expansion, so we'll get a 0 there (the
profile converter deals with this).  I've added some wording describing the
issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140422/d51bbf60/attachment.html>


More information about the cfe-commits mailing list