@@ -331,19 +331,12 @@ class StaleMatcher {
331
331
if (!opts::StaleMatchingWithBlockPseudoProbes)
332
332
return {nullptr , false };
333
333
334
- auto logIf = [](bool Expr, StringRef Message) {
335
- LLVM_DEBUG (if (Expr) errs () << Message << ' \n ' );
336
- return Expr;
337
- };
338
-
339
334
DenseMap<const FlowBlock *, uint32_t > FlowBlockMatchCount;
340
335
341
336
for (const yaml::bolt::PseudoProbeInfo &Probe : BlockPseudoProbes) {
342
337
const MCDecodedPseudoProbeInlineTree *InlineTreeNode =
343
338
getInlineTreeNode (Probe.InlineTreeIndex );
344
- if (logIf (!InlineTreeNode,
345
- formatv (" no matching inline tree node for {0} {1}" ,
346
- Probe.InlineTreeIndex , Probe.Index ).str ())) {
339
+ if (!InlineTreeNode) {
347
340
++FlowBlockMatchCount[nullptr ];
348
341
continue ;
349
342
}
@@ -355,17 +348,12 @@ class StaleMatcher {
355
348
BinaryProbe = &FuncProbe;
356
349
break ;
357
350
}
358
- if (logIf (!BinaryProbe, formatv (" no matching binary probe for {0} {1}" ,
359
- Probe.InlineTreeIndex , Probe.Index )
360
- .str ())) {
351
+ if (!BinaryProbe) {
361
352
++FlowBlockMatchCount[nullptr ];
362
353
continue ;
363
354
}
364
355
auto It = BBPseudoProbeToBlock.find (BinaryProbe);
365
- if (logIf (It == BBPseudoProbeToBlock.end (),
366
- formatv (" no probe->block for {0} {1}" , Probe.InlineTreeIndex ,
367
- Probe.Index )
368
- .str ())) {
356
+ if (It == BBPseudoProbeToBlock.end ()) {
369
357
++FlowBlockMatchCount[nullptr ];
370
358
continue ;
371
359
}
@@ -376,9 +364,6 @@ class StaleMatcher {
376
364
uint32_t TotalMatchCount = 0 ;
377
365
const FlowBlock *BestMatchBlock = nullptr ;
378
366
for (auto &[Block, Count] : FlowBlockMatchCount) {
379
- logIf (true , formatv (" block {0} count {1}" ,
380
- Block ? Block->Index : UINT64_MAX, Count)
381
- .str ());
382
367
TotalMatchCount += Count;
383
368
if (Count > BestMatchCount ||
384
369
(Count == BestMatchCount && !BestMatchBlock)) {
0 commit comments