[all-commits] [llvm/llvm-project] 4bddef: [InstrProf][Temporal] Add weight field to traces

Ellis Hoag via All-commits all-commits at lists.llvm.org
Thu Apr 13 10:37:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4bddef4117403a305727d145a9abf6bda700f8ff
      https://github.com/llvm/llvm-project/commit/4bddef4117403a305727d145a9abf6bda700f8ff
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2023-04-13 (Thu, 13 Apr 2023)

  Changed paths:
    M compiler-rt/test/profile/instrprof-timestamp.c
    M llvm/docs/CommandGuide/llvm-profdata.rst
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/ProfileData/InstrProfReader.h
    M llvm/include/llvm/ProfileData/InstrProfWriter.h
    M llvm/lib/ProfileData/InstrProfReader.cpp
    M llvm/lib/ProfileData/InstrProfWriter.cpp
    M llvm/test/tools/llvm-profdata/merge-traces.proftext
    M llvm/test/tools/llvm-profdata/read-traces.proftext
    M llvm/test/tools/llvm-profdata/trace-limit.proftext
    M llvm/tools/llvm-profdata/llvm-profdata.cpp
    M llvm/unittests/ProfileData/InstrProfTest.cpp

  Log Message:
  -----------
  [InstrProf][Temporal] Add weight field to traces

As discussed in [0], add a `weight` field to temporal profiling traces found in profiles. This allows users to use the `--weighted-input=` flag in the `llvm-profdata merge` command to weight traces from different scenarios differently.

Note that this is a breaking change, but since [1] landed very recently and there is no way to "use" this trace data, there should be no users of this feature. We believe it is acceptable to land this change without bumping the profile format version.

[0] https://reviews.llvm.org/D147812#4259507
[1] https://reviews.llvm.org/D147287

Reviewed By: snehasish

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




More information about the All-commits mailing list