[all-commits] [llvm/llvm-project] 1117b9: [InstrProf] Use BalancedPartitioning to order temp...

Ellis Hoag via All-commits all-commits at lists.llvm.org
Tue Jun 6 12:00:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1117b9a284aa6e4b1f3cbde31825605bd07a2384
      https://github.com/llvm/llvm-project/commit/1117b9a284aa6e4b1f3cbde31825605bd07a2384
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2023-06-06 (Tue, 06 Jun 2023)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-profdata.rst
    M llvm/include/llvm/ProfileData/InstrProf.h
    A llvm/include/llvm/Support/BalancedPartitioning.h
    M llvm/lib/ProfileData/InstrProf.cpp
    A llvm/lib/Support/BalancedPartitioning.cpp
    M llvm/lib/Support/CMakeLists.txt
    A llvm/test/tools/llvm-profdata/show-order.proftext
    M llvm/tools/llvm-profdata/llvm-profdata.cpp
    A llvm/unittests/Support/BalancedPartitioningTest.cpp
    M llvm/unittests/Support/CMakeLists.txt

  Log Message:
  -----------
  [InstrProf] Use BalancedPartitioning to order temporal profiling trace data

In [0] we described an algorithm called //BalancedPartitioning// (bp) to consume function traces [1] and compute a function order that reduces the number of page faults during startup.

This patch adds the `order` command to the `llvm-profdata` tool which uses bp to output a function order that can be passed to the linker via `--symbol-ordering-file=`.

Special thanks to Sergey Pupyrev and Julian Mestre for designing this balanced partitioning algorithm.

[0] https://discourse.llvm.org/t/rfc-temporal-profiling-extension-for-irpgo/68068
[1] https://reviews.llvm.org/D147287

Reviewed By: spupyrev

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




More information about the All-commits mailing list