Amir Ayupov
0d5325bb20
[BOLT] Directly use call count in buildCallGraph (#134966)
In call graph construction, call block count is used for call graph edge
weight. Change that to use call count directly if it's available,
falling back to block count if not.
Test Plan:
This change together with disabling `fix-block-counts` improves profile
quality metrics, e.g. for large binaries and sampled LBR profiles:
`br_inst_retired.near_taken:uppp` trigger event
- Ads1:
- Profiled functions 58096
- CFG imbalance 2.63% -> 2.45%
- CG imbalance 8.23% -> 7.44%
- Ads2:
- Profiled functions 54358
- CFG imbalance 3.12% -> 2.77%
- CG imbalance 8.22% -> 7.06%
- uwsgi:
- Profiled functions 78103
- CFG imbalance 4.42% -> 4.03%
- CG imbalance 100.00% -> 100.00%
`cycles:u` trigger event:
- web:
- Profiled functions 31306
- CG flow imbalance: 31.16% -> 20.29%
- CFG flow imbalance: 7.04% -> 6.44%
2025-07-14 14:28:52 -07:00
..
2025-07-14 14:28:52 -07:00
2025-06-27 21:22:46 -07:00
2025-07-12 12:25:58 -07:00
2025-07-02 11:22:12 -07:00
2025-05-10 13:39:15 -07:00
2025-07-08 09:22:30 -07:00
2025-06-16 09:42:59 +01:00