Commit f9c06ee6 authored by Sajjad Mirza's avatar Sajjad Mirza Committed by Commit Bot

[code coverage] Ignore extraneous profiling symbols.

When coverage instrumentation is enabled the compiler generates extra
symbols that are irrelevant to resource whitelisting. These should be
ignored so that they are not passed to llvm-undname, which cannot parse
them.

Bug: 1041689
Change-Id: Ia54300cc3b65c40ab4c20caa7a76623822fa97c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2004328Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732507}
parent babaf8b2
......@@ -67,7 +67,12 @@ def GetResourceWhitelistPDB(path):
if '`' not in line:
continue
sym_name = line[line.find('`') + 1:line.rfind('`')]
if 'WhitelistedResource' in sym_name:
# Under certain conditions such as the GN arg `use_clang_coverage = true` it
# is possible for the compiler to emit additional symbols that do not match
# the standard mangled-name format.
# Example: __profd_??$WhitelistedResource@$0BGPH@@ui@@YAXXZ
# C++ mangled names are supposed to begin with `?`, so check for that.
if 'WhitelistedResource' in sym_name and sym_name.startswith('?'):
names += sym_name + '\n'
exit_code = pdbutil.wait()
if exit_code != 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment