From f118852046a1d255ed8c65c6b5db320e8cea53a0 Mon Sep 17 00:00:00 2001 From: Wei Mi Date: Fri, 20 Sep 2019 23:24:50 +0000 Subject: [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. llvm-svn: 372439 --- llvm/test/tools/llvm-profdata/show-prof-size.test | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 llvm/test/tools/llvm-profdata/show-prof-size.test (limited to 'llvm/test/tools') diff --git a/llvm/test/tools/llvm-profdata/show-prof-size.test b/llvm/test/tools/llvm-profdata/show-prof-size.test new file mode 100644 index 00000000000..0d1ecdcfd67 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/show-prof-size.test @@ -0,0 +1,7 @@ +; RUN: llvm-profdata merge -sample -extbinary -prof-sym-list=%S/Inputs/profile-symbol-list-1.text %S/Inputs/sample-profile.proftext -o %t.1.output +; RUN: ls -l %t.1.output |cut -f5 -d ' ' > %t.txt +; RUN: llvm-profdata show -sample -show-sec-info-only %t.1.output >> %t.txt +; RUN: FileCheck %s --input-file=%t.txt +; Check llvm-profdata shows the correct file size. +; CHECK: [[FILESIZE:.*]] +; CHECK: [[FILESIZE]] -- cgit v1.2.3