[all-commits] [llvm/llvm-project] 30037b: [llvm-profdata] Fixed various issue with Sample Pr...

William Junda Huang via All-commits all-commits at lists.llvm.org
Thu Apr 13 14:33:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30037b7a6ad81cdbf06e216204275150e62aec7c
      https://github.com/llvm/llvm-project/commit/30037b7a6ad81cdbf06e216204275150e62aec7c
  Author: William Huang <williamjhuang at google.com>
  Date:   2023-04-13 (Thu, 13 Apr 2023)

  Changed paths:
    M llvm/include/llvm/ProfileData/SampleProf.h
    M llvm/include/llvm/ProfileData/SampleProfReader.h
    M llvm/lib/ProfileData/SampleProfReader.cpp

  Log Message:
  -----------
  [llvm-profdata] Fixed various issue with Sample Profile Reader

Fixed various undefind behaviors with current Sample Profile Reader when reading unusual input. Furthermore, add the following rule on allowing multiple name table sections (current Reader has conflicted code handling such case):

When a new name table section is read (in the order sections are read), the names in the previous name table are cleared. Any subsequent sections referring to function names will index into the most recent read name table.

Also changed name table index to uint64_t to be consistent since there's a mix of using uint32_t and uint64_t.

Reviewed By: snehasish, huangjd

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




More information about the All-commits mailing list