[LLVMdev] Recent changes in -gmlt break sample profiling
Chandler Carruth
chandlerc at google.com
Sun Oct 26 17:44:30 PDT 2014
On Fri, Oct 24, 2014 at 4:06 PM, Xinliang David Li <xinliangli at gmail.com>
wrote:
> Diego,
>
> 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
> emitted.
>
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...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141026/7d4946e7/attachment.html>
More information about the llvm-dev
mailing list