Code Coverage: Demangle template instantiations to indicate the type of T |
|||||
Issue descriptionExample report: https://chromium-coverage.appspot.com/reports/558266/linux/chromium/src/net/ntlm/ntlm_buffer_writer.cc.html NtlmBufferWrite::WriteUInt is templatized, and there's three invocations (lines 35-49) These are reported after line 169 inline (which, by the way, is absolutely amazing work and kudos to the team for that), but with a header block for each of those that indicates the templated invocation. It would be awesome to run those through the symbolizer, so that their types can be distinguished from the type name.
,
May 15 2018
Er, sorry, C++filt
,
May 15 2018
Issue 842303 has been merged into this issue.
,
May 15 2018
Thanks a lot for the report and for the investigation! C++filt seems to work find on Linux: $ echo _ZN3net4ntlm16NtlmBufferWriter9WriteUIntIjEEbT_ | c++filt bool net::ntlm::NtlmBufferWriter::WriteUInt<unsigned int>(unsigned int) Should be an easy patch. Do you want to give it a try? :)
,
May 15 2018
Yeah, I had a local patch - my uncertainty was around the cross-platform requirements for the script, since c++filt will only conditionally be available, even on Linux, so it didn't seem a good long term option. I wasn't sure the cross-platform plans, and whether we'd want to opt for per-platform solutions (similar to //base/debug/stack_trace_*), or whether we were looking at something integrated with llvm (like https://llvm.org/docs/CommandGuide/llvm-symbolizer.html , as used by asan_symbolize.py)
,
May 15 2018
Yes, llvm-symbolizer would be a better choice in a long term, as I think we have it available on all platforms. But in the meantime, while we are running only Linux bots for the dashboard reports, I wouldn't mind to have something like "if linux: add option -Xdemangler=C++filt"
,
May 15 2018
llvm-symbolizer is the preferred option, even for cross-platform. See _GetPathWithLLVMSymbolizerDir, might need to put that in PATH for llvm-cov.
,
May 15 2018
ah sorry i didn't read Max's comment, c++filt is fine for now for non-win platforms. it works fine on mac too.
,
May 15 2018
Ryan, assigning to you since you have the patch already for this :)
,
May 15 2018
,
May 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ae19b2c36a367858c631fb533c0e7c1bc8fee677 commit ae19b2c36a367858c631fb533c0e7c1bc8fee677 Author: Ryan Sleevi <rsleevi@chromium.org> Date: Tue May 15 22:36:17 2018 Run coverage reports through c++filt on Linux and macOS. The code coverage reports from llvm-cov will emit detailed coverage information for instantiated templates, but by default, will emit the method names using their mangled form. llvm-cov allows for providing a custom demangler. This conditionally provides custom demangler, using c++filt when running on Linux and macOS. Longer-term, a solution based on llvm-symbolizer is more desirable for platform neutrality, but this helps bridge the short-term need. BUG= 843246 Change-Id: I718016b05af0842ac148d06e968f362bc68b5fc8 Reviewed-on: https://chromium-review.googlesource.com/1060264 Commit-Queue: Ryan Sleevi <rsleevi@chromium.org> Reviewed-by: Abhishek Arya <inferno@chromium.org> Cr-Commit-Position: refs/heads/master@{#558863} [modify] https://crrev.com/ae19b2c36a367858c631fb533c0e7c1bc8fee677/tools/code_coverage/coverage.py
,
May 15 2018
Code Coverage owners: Would you rather close this and leave the switch to llvm-symbolizer as part of the cross-platform work (is their a bug to star for Windows?), or leave it open to track the remaining xplat stuff?
,
May 15 2018
I think this will come up later anyway (e.g. during issue 809150), so let's close this one. Thanks a lot, Ryan!
,
May 17 2018
Verified, thanks a lot, looks so nice and readable. https://chromium-coverage.appspot.com/reports/559087/linux/chromium/src/base/numerics/safe_conversions.h.html
,
May 17 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by rsleevi@chromium.org
, May 15 2018