Add --hot-func-list to llvm-profdata show for sample profiles
authorweihe <weihe@dev103.prn2.facebook.com>
Wed, 24 Jun 2020 19:43:27 +0000 (12:43 -0700)
committerWenlei He <aktoon@gmail.com>
Wed, 24 Jun 2020 19:49:46 +0000 (12:49 -0700)
commit53cf53023cbeb47d03fb9937ab3d06181eec8843
tree988b4c088e38bb0e84bee7f8050d369a3ef0bc70
parentdc3f8913d2ad33b1129ea488393e12cc88061aff
Add --hot-func-list to llvm-profdata show for sample profiles

Summary:
Add the --hot-func-list feature to llvm-profdata show for sample profiles. This feature prints a list of hot functions whose max sample count are above the 99% threshold, with their numbers of total samples, total samples percentage, max samples, entry samples, and their function names.

Test Plan:

Reviewers: wenlei, hoyFB

Reviewed By: wenlei, hoyFB

Subscribers: hoyFB, wenlei, weihe, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82355
llvm/include/llvm/ProfileData/SampleProf.h
llvm/test/tools/llvm-profdata/Inputs/sample-hot-func-list.proftext [new file with mode: 0644]
llvm/test/tools/llvm-profdata/sample-hot-func-list.test [new file with mode: 0644]
llvm/tools/llvm-profdata/llvm-profdata.cpp