[PATCH] D38491: [ELF] Decompress debug info sections early

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 08:31:46 PDT 2017


smeenai added inline comments.


================
Comment at: ELF/GdbIndex.cpp:38
+      if (Decompressor::isCompressedELFSection(Sec->Flags, Sec->Name))
+        Sec->uncompress();
       M->Data = toStringRef(Sec->Data);
----------------
grimar wrote:
> We call `decompressAndMergeSections` at some point in linker, and at first I thought that better would be to just call it earlier or at least to decompress sections early, but that is not so convinent to do. Assuming we still want to use threading for that it is more convinent to do when we have full list of input sections, like now.
> 
> And here `uncompress` is used for few sections in a single file and only when we reporting errors. That is probably looks fine for me.
You're right; this loses the parallelism. I think that's okay as long as there are no plans to eventually use this outside of error-reporting scenarios.


================
Comment at: test/ELF/compressed-debug-conflict.test:77
+    Content:         ''
+  - Name:            .debug_macinfo
+    Type:            SHT_PROGBITS
----------------
grimar wrote:
> I am pretty sure you should not need this and few other sections, symbols and relocations. Testcase can be reduced.
> Though I would suggest not to use yaml2obj here, but use asm input instead. Just like we usually do (see compressed-debug-input.s, gdb-index-empty.s for example). Doing that should simplify testcase a lot.
I originally had the YAML because I wanted to reproduce the exact debug info that was causing the assertion failure, but I realize now that you can do so via assembly debug info as well. Lemme play around with reducing this.


https://reviews.llvm.org/D38491





More information about the llvm-commits mailing list