]> granicus.if.org Git - llvm/commit
[SampleFDO] Expose an interface to return the size of a section or the size
authorWei Mi <wmi@google.com>
Fri, 20 Sep 2019 23:24:50 +0000 (23:24 +0000)
committerWei Mi <wmi@google.com>
Fri, 20 Sep 2019 23:24:50 +0000 (23:24 +0000)
commite1ba14678c7cacfe4369107b3a51159febfc035b
treeced206634bad4ffc36f1f80ddae5d87612ad6471
parent3e44783bf7a738b6d20037c283eb6db9a7e4f5f9
[SampleFDO] Expose an interface to return the size of a section or the size
of the profile for profile in ExtBinary format.

Sometimes we want to limit the size of the profile by stripping some functions
with low sample count or by stripping some function names with small text size
from profile symbol list. That requires the profile reader to have the
interfaces returning the size of a section or the size of total profile. The
patch add those interfaces.

At the same time, add some dump facility to show the size of each section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372439 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProf.h
include/llvm/ProfileData/SampleProfReader.h
lib/ProfileData/SampleProfReader.cpp
test/tools/llvm-profdata/show-prof-size.test [new file with mode: 0644]
tools/llvm-profdata/llvm-profdata.cpp