[all-commits] [llvm/llvm-project] 1a7190: [CSSPGO][llvm-profgen] Always report dangling prob...
Hongtao Yu via All-commits
all-commits at lists.llvm.org
Wed Apr 21 18:08:23 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1a719089a81b418b480e8b08d2d971fb087860db
https://github.com/llvm/llvm-project/commit/1a719089a81b418b480e8b08d2d971fb087860db
Author: Hongtao Yu <hoy at fb.com>
Date: 2021-04-21 (Wed, 21 Apr 2021)
Changed paths:
M llvm/include/llvm/MC/MCPseudoProbe.h
A llvm/test/tools/llvm-profgen/Inputs/inline-cs-dangling-pseudoprobe.perfscript
A llvm/test/tools/llvm-profgen/inline-cs-dangling-pseudoprobe.test
M llvm/test/tools/llvm-profgen/merge-cold-profile.test
M llvm/tools/llvm-profgen/ProfileGenerator.cpp
M llvm/tools/llvm-profgen/PseudoProbe.cpp
M llvm/tools/llvm-profgen/PseudoProbe.h
Log Message:
-----------
[CSSPGO][llvm-profgen] Always report dangling probes for frames with real samples.
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.
Reviewed By: wenlei, wlei
Differential Revision: https://reviews.llvm.org/D100235
More information about the All-commits
mailing list