Orderfile: assert that outlined functions are not instrumented.
As outlined functions are not consistently named across builds,
having them appear in instrumentation would wreak havoc in the
orderfile.
Bug: 922460
Change-Id: I4c89374b541edb31e2dce7a486cbe242db75532d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1508462
Commit-Queue: Matthew Cary <mattcary@chromium.org>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#639498}
diff --git a/tools/cygprofile/orderfile_generator_backend.py b/tools/cygprofile/orderfile_generator_backend.py
index cec73bd..3dc26cb 100755
--- a/tools/cygprofile/orderfile_generator_backend.py
+++ b/tools/cygprofile/orderfile_generator_backend.py
@@ -587,9 +587,13 @@
profiles = process_profiles.ProfileManager(files)
processor = process_profiles.SymbolOffsetProcessor(
self._compiler.lib_chrome_so)
- ordered_symbols= cluster.ClusterOffsets(profiles, processor)
+ ordered_symbols = cluster.ClusterOffsets(profiles, processor)
if not ordered_symbols:
raise Exception('Failed to get ordered symbols')
+ for sym in ordered_symbols:
+ assert not sym.startswith('OUTLINED_FUNCTION_'), (
+ 'Outlined function found in instrumented function, very likely '
+ 'something has gone very wrong!')
self._output_data['offsets_kib'] = processor.SymbolsSize(
ordered_symbols) / 1024
with open(self._GetUnpatchedOrderfileFilename(), 'w') as orderfile: