[PATCH] D146391: Add DWARFContext generation from LinkGraphs, use in perf support

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 19:11:26 PDT 2023

lhames accepted this revision.
lhames added a comment.
This revision is now accepted and ready to land.

In D146391#4205531 <https://reviews.llvm.org/D146391#4205531>, @pchintalapudi wrote:

> For testing, there are a couple of options that I think should be possible.
> Right now D146169 <https://reviews.llvm.org/D146169>'s test is only that the jitdump file exists, not on the accuracy of the content. I've been verifying the content of that file using my own custom python script, so one option is to upload that script (to where?), output to json, and check that json for accuracy (with what tools?).

If you were going to go this way then I think the right thing would be to add your test tool to `llvm/utils` and then register it along with the other known tools in `llvm/test/lit.cfg.py`. It's probably worth workshopping that idea on discord / discourse though.

> Another option is to take advantage of the cross-process support and replace the default called addresses in the plugin with calls to verification functions. This would probably take the form of a new cpp unit test (don't know how to do this) and has the advantage of being able to test the state on structured data rather than reading a binary file that's sensitive to bugs in the writer.

Yeah -- there are a few ways to approach this, but they're all a bit awkward with the tools we have available. I'll have a think about what we can do to improve this.

I don't think the testcase discussion should prevent this landing. LGTM. Thanks again Prem!

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list