[all-commits] [llvm/llvm-project] c2be2d: [llvm-profgen] Fix a bug of assertion

ictwanglei via All-commits all-commits at lists.llvm.org
Wed Sep 22 18:34:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c2be2d3284d2b0d76eacbe3e3999fb0843ef65a6
      https://github.com/llvm/llvm-project/commit/c2be2d3284d2b0d76eacbe3e3999fb0843ef65a6
  Author: wlei <wlei at fb.com>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

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

  Log Message:
  -----------
  [llvm-profgen] Fix a bug of assertion

The assertion should work on the entire context.

Reviewed By: hoy, wenlei

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


  Commit: 686cc0006793b06fd15d08cc0188b071f49ae990
      https://github.com/llvm/llvm-project/commit/686cc0006793b06fd15d08cc0188b071f49ae990
  Author: wlei <wlei at fb.com>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

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

  Log Message:
  -----------
  [llvm-profgen] Fix an out-of-range error during unwinding

It happened that the LBR entry target can be the first address of text section which causes an out-of-range crash. So here add a boundary check.

Reviewed By: hoy, wenlei

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


  Commit: 1ed69bb86eb188ab23f62c266d2d23846588e768
      https://github.com/llvm/llvm-project/commit/1ed69bb86eb188ab23f62c266d2d23846588e768
  Author: wlei <wlei at fb.com>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

  Changed paths:
    M llvm/tools/llvm-profgen/ProfileGenerator.cpp
    M llvm/tools/llvm-profgen/ProfileGenerator.h

  Log Message:
  -----------
  [llvm-profgen] Fix a dangling vector reference in CS line number based generator

It seems we missed one spot to persist `SampleContextFrameVector` into the global table (CSProfileGenerator::populateFunctionBoundarySamples:340) which causes a crash.

This change tried to fix it in a centralized way i. e. where we generate the `FunctionSamples`.

Reviewed By: hoy, wenlei

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


Compare: https://github.com/llvm/llvm-project/compare/10a5632550ab...1ed69bb86eb1


More information about the All-commits mailing list