[llvm] [BOLT] Match instrument-funcs-file entries against restored names (PR #208313)
Alexey Moksyakov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 23:59:35 PDT 2026
================
@@ -674,7 +675,12 @@ Error Instrumentation::runOnFunctions(BinaryContext &BC) {
if (HasInstrumentFuncsFilter) {
bool Found = false;
for (const StringRef Name : BF.getNames()) {
- if (InstrumentFuncsSet.contains(Name)) {
+ // instrument-funcs-file could specify original mangled function names
+ // and BOLT will append a "/<id>" (or "/<file>/<id2>") suffix to a local
+ // function name. Match against restored (suffix-stripped) name too, so
+ // local functions specified in the file won't be silently skipped.
+ if (InstrumentFuncsSet.contains(Name) ||
+ InstrumentFuncsSet.contains(NameResolver::restore(Name))) {
----------------
yavtuk wrote:
@aaupov Amir can you add more details why we avoid using it, I am working on resolving the duplicated symbols name through versioning and NameResolver::restore(Name) needed to get original name.
https://github.com/llvm/llvm-project/pull/208313
More information about the llvm-commits
mailing list