[PATCH] D96035: [WIP][dsymutil][DWARFlinker] implement separate multi-thread processing for compile units.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 03:14:27 PDT 2021


avl added a comment.

>>   It produces predictable results when working in multi-thread mode.



> This means that the generated DWARF is identical regardless of the number of threads, right?

Right. Generated DWARF is identical regardless of the number of threads.

> My main concern at this point is how you are planning to qualify this change. I see you copied the existing tests (which I assume was necessary because you had to modify them to match the newly generated output) which is a great start. The LLDB test suite runs most tests with a dSYM and another good test would be to run it with the --use-dlnext flag. However, both of these are still pretty artificial test cases. Anecdotally, we often find bugs in large projects that don't show up in smaller ones, and semantically comparing the DWARF by hand is basically impossible. When we re-implemented dsymutil on top of llvm, we compared the hash of the generated DWARF to make sure it was identical (bugs in the original implementation included). I'm curious what your thoughts are on this.

yeah, approach of comparing output with original implementation is impossible in this case since output has been changed radically.

I have a thought of implementing a set of tests using debugger scripts. Something similar to this - https://reviews.llvm.org/D74169#change-ZwZOgdhWYOcz . So that such tests cover all/most aspects of DWARF specification. These tests would not depend on the concrete dsymutil binary format but will show whether debug information is correctly seen by debug info consumer(lldb).

Speaking of bugs found in large projects that don't show up in smaller ones: I think is the only way to create wider testing suite. i.e. if current test suite misses some cases then we need to add them(either upfront, either after the fact). Another possibility is to make llvm-dwarfdump --verify to be able to catch more bugs.

> The LLDB test suite runs most tests with a dSYM and another good test would be to run it with the --use-dlnext flag.

Did not do this yet, but will check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96035



More information about the llvm-commits mailing list