From 94230a2c074a44e4bde09046b8bc499cba2d5982 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Thu, 25 Jun 2020 16:29:17 -0700 Subject: [PATCH] [perf2bolt] Relax rules for aggregation in strict mode Summary: While aggregating perf.data events, even in strict mode, there is no need to process all functions since we are not generating an output binary. However, it's still important to convert data for as many functions as possible, even for ones with unknown internal control flow. (cherry picked from FBD22248390) --- bolt/src/RewriteInstance.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bolt/src/RewriteInstance.cpp b/bolt/src/RewriteInstance.cpp index 76955e44bebe..d80093db4fc4 100644 --- a/bolt/src/RewriteInstance.cpp +++ b/bolt/src/RewriteInstance.cpp @@ -403,8 +403,11 @@ bool isHotTextMover(const BinaryFunction &Function) { return false; } -/// Return true if we can process the binary without processing all functions. +/// Return true if we should process all functions in the binary. bool processAllFunctions() { + if (opts::AggregateOnly) + return false; + if (UseOldText || StrictMode) return true;