[all-commits] [llvm/llvm-project] af5868: [InstrProf] Add options to profile function groups

Ellis Hoag via All-commits all-commits at lists.llvm.org
Thu Jul 14 11:41:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af58684f272046f293a9f469f03d23bd2b138349
      https://github.com/llvm/llvm-project/commit/af58684f272046f293a9f469f03d23bd2b138349
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2022-07-14 (Thu, 14 Jul 2022)

  Changed paths:
    M clang/docs/ClangCommandLineReference.rst
    M clang/docs/UsersManual.rst
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/Driver/ToolChains/Clang.cpp
    A clang/test/CodeGen/profile-function-groups.c
    A compiler-rt/test/profile/instrprof-groups.c

  Log Message:
  -----------
  [InstrProf] Add options to profile function groups

Add two options, `-fprofile-function-groups=N` and `-fprofile-selected-function-group=i` used to partition functions into `N` groups and only instrument the functions in group `i`. Similar options were added to xray in https://reviews.llvm.org/D87953 and the goal is the same; to reduce instrumented size overhead by spreading the overhead across multiple builds. Raw profiles from different groups can be added like normal using the `llvm-profdata merge` command.

Reviewed By: ianlevesque

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




More information about the All-commits mailing list