Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: syzygy/instrument/transforms/afl_transform.cc

Issue 2990493002: Skip gap blocks early to avoid stdout flooding in verbose mode, and (Closed)
Patch Set: Better the comment layout. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « syzygy/instrument/instrument_app.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/instrument/transforms/afl_transform.cc
diff --git a/syzygy/instrument/transforms/afl_transform.cc b/syzygy/instrument/transforms/afl_transform.cc
index 7cf91193c46d3556dfc5543c76791aeba0c212bc..d49597a9aaf8b5adbf66ac8a0c484a301626c95b 100644
--- a/syzygy/instrument/transforms/afl_transform.cc
+++ b/syzygy/instrument/transforms/afl_transform.cc
@@ -201,6 +201,14 @@ bool AFLTransform::OnBlock(const TransformPolicyInterface* policy,
if (block->type() != BlockGraph::CODE_BLOCK)
return true;
+ // We exclude gap blocks early to not bias the percentage of instrumentation.
+ // Some binaries have a lot of them and give the impression of a poor
+ // instrumentation ratio when it is actually not the case.
+ // It also avoids to have stdout flooded when using the verbose mode and
+ // not forcing decomposition (as the PE policy rejects gap blocks).
+ if (block->attributes() & BlockGraph::GAP_BLOCK)
+ return true;
+
total_code_blocks_++;
// Use the policy to skip blocks that aren't eligible for basic block
« no previous file with comments | « syzygy/instrument/instrument_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698