Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions bolt/include/bolt/Core/BinaryContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,11 +775,6 @@ class BinaryContext {
uint64_t PseudoProbeLooseMatchedSampleCount{0};
/// the count of call matched samples
uint64_t CallMatchedSampleCount{0};
/// the number of stale functions that have matching number of blocks in
/// the profile
uint64_t NumStaleFuncsWithEqualBlockCount{0};
/// the number of blocks that have matching size but a differing hash
uint64_t NumStaleBlocksWithEqualIcount{0};
} Stats;

// Original binary execution count stats.
Expand Down
17 changes: 0 additions & 17 deletions bolt/lib/Passes/BinaryPasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1505,12 +1505,6 @@ Error PrintProgramStats::runOnFunctions(BinaryContext &BC) {
if (NumAllStaleFunctions) {
const float PctStale =
NumAllStaleFunctions / (float)NumAllProfiledFunctions * 100.0f;
const float PctStaleFuncsWithEqualBlockCount =
(float)BC.Stats.NumStaleFuncsWithEqualBlockCount /
NumAllStaleFunctions * 100.0f;
const float PctStaleBlocksWithEqualIcount =
(float)BC.Stats.NumStaleBlocksWithEqualIcount /
BC.Stats.NumStaleBlocks * 100.0f;
auto printErrorOrWarning = [&]() {
if (PctStale > opts::StaleThreshold)
BC.errs() << "BOLT-ERROR: ";
Expand All @@ -1533,17 +1527,6 @@ Error PrintProgramStats::runOnFunctions(BinaryContext &BC) {
<< "%) belong to functions with invalid"
" (possibly stale) profile.\n";
}
BC.outs() << "BOLT-INFO: " << BC.Stats.NumStaleFuncsWithEqualBlockCount
<< " stale function"
<< (BC.Stats.NumStaleFuncsWithEqualBlockCount == 1 ? "" : "s")
<< format(" (%.1f%% of all stale)",
PctStaleFuncsWithEqualBlockCount)
<< " have matching block count.\n";
BC.outs() << "BOLT-INFO: " << BC.Stats.NumStaleBlocksWithEqualIcount
<< " stale block"
<< (BC.Stats.NumStaleBlocksWithEqualIcount == 1 ? "" : "s")
<< format(" (%.1f%% of all stale)", PctStaleBlocksWithEqualIcount)
<< " have matching icount.\n";
if (PctStale > opts::StaleThreshold) {
return createFatalBOLTError(
Twine("BOLT-ERROR: stale functions exceed specified threshold of ") +
Expand Down
3 changes: 0 additions & 3 deletions bolt/lib/Profile/YAMLProfileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@ bool YAMLProfileReader::parseFunctionProfile(
<< MismatchedCalls << " calls, and " << MismatchedEdges
<< " edges in profile did not match function " << BF << '\n';

if (YamlBF.NumBasicBlocks != BF.size())
++BC.Stats.NumStaleFuncsWithEqualBlockCount;

if (!opts::InferStaleProfile)
return false;
ArrayRef<ProbeMatchSpec> ProbeMatchSpecs;
Expand Down
Loading