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

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 23:47:45 PST 2022


wlei added a comment.

In D115973#3325552 <https://reviews.llvm.org/D115973#3325552>, @jhenderson wrote:

> In D115973#3323622 <https://reviews.llvm.org/D115973#3323622>, @dblaikie wrote:
>
>> 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?)
>
> My understanding (which admittedly may be incorrect, as I'm by no means a git expert), is as you describe in the parentheses, so yeah, I'm talking about the git repository (specifically the .git folder).
>
> In D115973#3324904 <https://reviews.llvm.org/D115973#3324904>, @wlei wrote:
>
>> 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")?

Thanks for the discussion. I didn't chose to move this testing to `cross-project-tests` because this doesn't intend to test out-tree components(clang or lld) at all, it just aims to test if debuginfo can be loaded(doesn't matter the content) by llvm-profgen. I just simplified the source code of testing, the dwo file size is much small(800Byte) and the dwo.yaml file size is actually bigger 1.7K. Also I think this feature(testing if debuginfo can be loaded) is unlikely to be frequently modified to affect the repo size.

> I wouldn't be surprised if .dwo sections aren't supported yet - I know that @Higuoxing didn't finish everything. That being said, I think it's unlikely to be all that tricky to implement, if you wanted to do some experiments, by basing the implementation on the existing debug section implementations.

As you mentioned, the human readable section of dwo debug_* sections are unsupported for now and I also found some unsupported sections in the linked binary which is required by this testing. I feel it would be a separate task to implement dwo2yaml feature, it seems kind of counter-productive to block a work by the unsupported infra of test.

Would it be good to check in with the binary or raw yaml for now and I will fix this once dwo2yaml is ready?


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