summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2019-09-20 23:24:50 +0000
committerWei Mi <wmi@google.com>2019-09-20 23:24:50 +0000
commitf118852046a1d255ed8c65c6b5db320e8cea53a0 (patch)
treeb35a22fbe1d944338582a4fe4a102de3654c2606 /llvm/test/tools/llvm-profdata
parent6c0894b58ac8cbf12383f18789ac5a161a18f141 (diff)
downloadbcm5719-llvm-f118852046a1d255ed8c65c6b5db320e8cea53a0.tar.gz
bcm5719-llvm-f118852046a1d255ed8c65c6b5db320e8cea53a0.zip
[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
Diffstat (limited to 'llvm/test/tools/llvm-profdata')
-rw-r--r--llvm/test/tools/llvm-profdata/show-prof-size.test7
1 files changed, 7 insertions, 0 deletions
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]]
OpenPOWER on IntegriCloud