[PATCH] D115973: [llvm-profgen] Support symbol loading for debug fission

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 16:35:36 PST 2022


wlei added a comment.

In D115973#3323622 <https://reviews.llvm.org/D115973#3323622>, @dblaikie wrote:

> In D115973#3321910 <https://reviews.llvm.org/D115973#3321910>, @jhenderson wrote:
>
>> Pinging @Higuoxing, as he was the one who actually did a lot of the more recent yaml2obj DWARF implementation and may have some feedback on how best to reduce things.
>>
>> Picking up on a couple of different points:
>>
>> As @dblaikie mentioned, `cross-project-tests` is primarily for integration testing between LLVM components. One use case that is on the boundary line is llvm-symbolizer and other tool testing that need to consume a linked binary for their test case, as you can't use LLD outside of the `cross-project-tests` and the `lld` project. yaml2obj could be used for generating the test input objects in such cases, but as already noted, it may not be practical for some cases to reduce the YAML down to a usable document.
>>
>> Regarding checked-in binaries as test inputs: I'd always prefer to avoid this, even if the only alternative is using an opaque assembly or YAML file as input, with instructions on how to generate it (specifically the input source, the compilation/linking commands, and the version of the tool(s) used in generating it). The reason for this is repository size:
>
> Is this about file size in general (I'd expect an object file to be smaller than the equivalent yaml or assembly) - or it's about git and non-textual files? (I guess you're saying that it stores textual file updates as diffs rather than whole copies, but binary files it doesn't know how to encode diffs so it encodes the whole file each time?)

Yeah, object file is actually smaller than the yaml file if yaml file can't be reduced, take  split-dwarf-split.dwo for example: dwo file 1.5K vs yaml file 2.6K. I think if it's read-only(like this testing), it doesn't make any difference for `git diff`.

But I understand yaml file is good for readability for sure, I'm trying to reduce it..

Do you know how to reduce the field of split-dwarf-split.dwo.yaml? see the patch, I found the four fields(.debug_str.dwo, .debug_str_offsets.dwo, .debug_info.dwo, .debug_abbrev.dwo) are must-have(removing will cause test failed), but apparently there're hex string in the `Content` which are not ideal.

I run `obj2yaml split-dwarf-split.dwo > split-dwarf-split.dwo.yaml` to get the yaml file, do I miss anything? (I assume /llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml is also created by obj2yaml) or currently obj2yaml/yaml2obj lack to support *.dwo(as you said "it might not/probably doesn't support things like dwp indexes")?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115973/new/

https://reviews.llvm.org/D115973



More information about the llvm-commits mailing list