@@ -640,8 +640,6 @@ bool DataAggregator::doBasicSample(BinaryFunction &OrigFunc, uint64_t Address,
640
640
641
641
BinaryFunction *ParentFunc = getBATParentFunction (OrigFunc);
642
642
BinaryFunction &Func = ParentFunc ? *ParentFunc : OrigFunc;
643
- if (ParentFunc || (BAT && !BAT->isBATFunction (Func.getAddress ())))
644
- NumColdSamples += Count;
645
643
// Attach executed bytes to parent function in case of cold fragment.
646
644
Func.SampleCountInBytes += Count * BlockSize;
647
645
@@ -745,15 +743,10 @@ bool DataAggregator::doBranch(uint64_t From, uint64_t To, uint64_t Count,
745
743
if (BAT)
746
744
Addr = BAT->translate (Func->getAddress (), Addr, IsFrom);
747
745
748
- BinaryFunction *ParentFunc = getBATParentFunction (*Func);
749
- if (IsFrom &&
750
- (ParentFunc || (BAT && !BAT->isBATFunction (Func->getAddress ()))))
751
- NumColdSamples += Count;
746
+ if (BinaryFunction *ParentFunc = getBATParentFunction (*Func))
747
+ Func = ParentFunc;
752
748
753
- if (!ParentFunc)
754
- return std::pair{Func, IsRet};
755
-
756
- return std::pair{ParentFunc, IsRet};
749
+ return std::pair{Func, IsRet};
757
750
};
758
751
759
752
auto [FromFunc, IsReturn] = handleAddress (From, /* IsFrom*/ true );
@@ -1450,20 +1443,6 @@ void DataAggregator::parseLBRSample(const PerfBranchSample &Sample,
1450
1443
}
1451
1444
}
1452
1445
1453
- void DataAggregator::printColdSamplesDiagnostic () const {
1454
- if (NumColdSamples > 0 ) {
1455
- const float ColdSamples = NumColdSamples * 100 .0f / NumTotalSamples;
1456
- outs () << " PERF2BOLT: " << NumColdSamples
1457
- << format (" (%.1f%%)" , ColdSamples)
1458
- << " samples recorded in cold regions of split functions.\n " ;
1459
- if (ColdSamples > 5 .0f )
1460
- outs ()
1461
- << " WARNING: The BOLT-processed binary where samples were collected "
1462
- " likely used bad data or your service observed a large shift in "
1463
- " profile. You may want to audit this\n " ;
1464
- }
1465
- }
1466
-
1467
1446
void DataAggregator::printLongRangeTracesDiagnostic () const {
1468
1447
outs () << " PERF2BOLT: out of range traces involving unknown regions: "
1469
1448
<< NumLongRangeTraces;
@@ -1504,7 +1483,6 @@ void DataAggregator::printBranchSamplesDiagnostics() const {
1504
1483
" collection. The generated data may be ineffective for improving "
1505
1484
" performance\n\n " ;
1506
1485
printLongRangeTracesDiagnostic ();
1507
- printColdSamplesDiagnostic ();
1508
1486
}
1509
1487
1510
1488
void DataAggregator::printBasicSamplesDiagnostics (
@@ -1516,7 +1494,6 @@ void DataAggregator::printBasicSamplesDiagnostics(
1516
1494
" binary is probably not the same binary used during profiling "
1517
1495
" collection. The generated data may be ineffective for improving "
1518
1496
" performance\n\n " ;
1519
- printColdSamplesDiagnostic ();
1520
1497
}
1521
1498
1522
1499
void DataAggregator::printBranchStacksDiagnostics (
0 commit comments