[all-commits] [llvm/llvm-project] aab181: [llvm-profgen] Fix bug of setting function entry

ictwanglei via All-commits all-commits at lists.llvm.org
Fri Nov 12 12:19:25 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aab1810006a6788e32ee04e7d40d0b2474754aa2
      https://github.com/llvm/llvm-project/commit/aab1810006a6788e32ee04e7d40d0b2474754aa2
  Author: wlei <wlei at fb.com>
  Date:   2021-11-12 (Fri, 12 Nov 2021)

  Changed paths:
    M llvm/tools/llvm-profgen/ErrorHandling.h
    M llvm/tools/llvm-profgen/PerfReader.cpp
    M llvm/tools/llvm-profgen/PerfReader.h
    M llvm/tools/llvm-profgen/ProfiledBinary.cpp
    M llvm/tools/llvm-profgen/ProfiledBinary.h

  Log Message:
  -----------
  [llvm-profgen] Fix bug of setting function entry

Previously we set `isFuncEntry` flag  to true when the funcName from DWARF is equal to the name in symbol table and we use this flag to ignore reporting callsite sample that's from an intra func branch. However, in HHVM, it appears that the symbol table name is inconsistent with the dwarf info func name, it's likely due to `OptimizeGlobalAliases`.

This change is a workaround in llvm-profgen side to mark the only one range as the function entry and add warnings for the remaining inconsistence.

This also fixed a missing `getCanonicalFnName` for symbol name which caused the mismatching as well.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D113492




More information about the All-commits mailing list