[LLVMdev] Recent changes in -gmlt break sample profiling
Xinliang David Li
xinliangli at gmail.com
Sun Oct 26 19:23:22 PDT 2014
The fundamental questions we need to answer are the following:
1) what is -gmlt option designed for? debugging, profiling, autofdo. Do we
expect more use cases for -gmlt?
2) can gmlt's behavior be standardized? The meaning of 'minimal' really
varies depending on the target use of the information. What is minimally
enough today may become not enough tomorrow if there is a new target use
3) Do we have regression tests for other well established use cases, such
4) When we need to add more debug info for -gmlt in the future for
enhancement of one of the existing use cases, is it considered a memory and
object size regression and get rejected?
For now, if the minimal debug info (after stripping out DW_TAG_subprogram
etc) already contains enough information for our need, that will be fine.
What if not (now, or in the future)?
On Sun, Oct 26, 2014 at 5:44 PM, Chandler Carruth <chandlerc at google.com>
> On Fri, Oct 24, 2014 at 4:06 PM, Xinliang David Li <xinliangli at gmail.com>
>> I think sampleFDO needs to be designed in a way which can protect itself
>> from future breakage like this. The roots in the unnecessary dependency of
>> sample FDO on gmlt setting. It is totally reasonable to tune debug binary
>> size by changes like this.
>> The right way is to fix this is to introduce an internal -g<...> flag for
>> use by sampleFDO -- it will have a fixed definition of what needs to be
> FWIW, I strongly disagree.
> The more modes we have, the harder everything will be to support and keep
> track of. The wide variety of modes used for debug information is already
> really challenging to support and maintain. We shouldn't make it harder,
> and less-used flags seem like the wrong direction.
> At a higher level, I don't think "sample profiling" or "asan" are good
> ways to design a set of debug information that we want emitted in a
> particular mode. Instead, we should look at what fundament information a
> collection of tools need access to. Both sample profiling, the sanitizers,
> and crash backtraces need access to a very minimal amount of information
> consisting of line tables, and that is how we designed '-gline-tables-only'
> (the LLVM flag name).
> And I think that both this design and Dave's change are totally fine.
> There was only one thing we missed: a very particular use case for line
> tables that had a particular usage pattern. The problem here is that we
> don't have any profile *collection* tests in LLVM. There are some reasons
> for that (its hard, etc) but we could probably work on improving it. But
> the correct path is the one Dave and Diego identified -- the information
> *is* still there, we just need a more clever way of extracting it. And (in
> addition) we should probably add some testing strategy for this. =]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev