Report dangling probes for frames that have real samples collected. Dangling probes are the probes associated to an empty block. When reported, sample count on a dangling probe will not be trusted by the compiler and we will rely on the counts inference algorithm to get the probe a reasonable count. This actually fixes a bug where previously only those dangling probes with samples collected were reported.
This patch also fixes two existing issues. Pseudo probes are stored in Address2ProbesMap and their pointers are used in PseudoProbeInlineTree. Previously std::vector was used to store probes and the pointers to probes may get obsolete as the vector grows. I'm changing std::vector to std::list instead.
The other issue is that all outlined functions shared the same inline frame previously due to the unchanged Index value as the dummy inlineSite identifier.
Good results seen for SPEC2017 in general regarding profile quality.
Try to understand this.
If pass2's probe is dangling, then return 0 no matter what in the profile(pass1);
If pass2's probe is not dangling and reading from profile gets a dangling probe(pass1), then return invalid count(UINT64_MAX), (this case happen because later the BB of the probe will be removed)
is that right?
So this change make sure all the future removed BB will be identified as dangling so that the inference algorithm can work on this?
is this issue also coming from the rebalancing algorithm?
like we have TrueBranch :0 and FalseBranch: 0, the rebalancing algorithm can't work on this.
but if we have TrueBranch:0 and FalseBranch:dangling, then it can be rebalanced.