[llvm-branch-commits] [llvm] [BOLT] Add pseudo probe inline tree to YAML profile (PR #107137)
Lei Wang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 11 17:35:44 PDT 2024
================
@@ -2421,11 +2433,14 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext &BC,
const uint32_t InputOffset = BAT->translate(
FuncAddr, OutputAddress - FuncAddr, /*IsBranchSrc=*/true);
const unsigned BlockIndex = getBlock(InputOffset).second;
- YamlBF.Blocks[BlockIndex].PseudoProbes.emplace_back(
- yaml::bolt::PseudoProbeInfo{Probe.getGuid(), Probe.getIndex(),
- Probe.getType()});
+ BlockProbes[BlockIndex].emplace_back(Probe);
}
}
+
+ for (auto &[Block, Probes] : BlockProbes) {
+ YamlBF.Blocks[Block].PseudoProbes =
+ YAMLProfileWriter::writeBlockProbes(Probes, InlineTreeNodeId);
----------------
wlei-llvm wrote:
Could you share me why there are two place usages for those yaml `writeBlockProbes`/`convertBFInlineTree` functions? one is here the `DataAggregator::writeBATYAML`, and one in `YAMLProfileWriter::writeProfile`. Just to learn about the context.
https://github.com/llvm/llvm-project/pull/107137
More information about the llvm-branch-commits
mailing list