[all-commits] [llvm/llvm-project] 5b72d0: [llvm-profdata] Add option to cap profile output size

William Junda Huang via All-commits all-commits at lists.llvm.org
Mon Jan 9 14:01:29 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b72d0e4f5eeb8f90c744cac8e0728cffeca61a9
      https://github.com/llvm/llvm-project/commit/5b72d0e4f5eeb8f90c744cac8e0728cffeca61a9
  Author: William Huang <williamjhuang at google.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M llvm/include/llvm/ProfileData/SampleProfWriter.h
    M llvm/lib/ProfileData/SampleProfWriter.cpp
    A llvm/test/tools/llvm-profdata/output-size-limit.test
    M llvm/tools/llvm-profdata/llvm-profdata.cpp

  Log Message:
  -----------
  [llvm-profdata] Add option to cap profile output size

Allow user to specify `--output-size-limit=n` to cap the size of generated profile to be strictly under n. Functions with the lowest total sample count are dropped first if necessary. Due to using a heuristic, excessive functions may be dropped to satisfy the size requirement

Reviewed By: snehasish

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




More information about the All-commits mailing list