Skip to content

Commit 30f0940

Browse files
committed
addressing comments and set hot-func-cutoff 800000
1 parent 9a210ad commit 30f0940

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

llvm/lib/Transforms/IPO/SampleProfile.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,9 @@ static cl::opt<unsigned> ProfileICPRelativeHotnessSkip(
235235
"Skip relative hotness check for ICP up to given number of targets."));
236236

237237
static cl::opt<unsigned> HotFuncCutoffForStalenessError(
238-
"hot-func-cutoff-for-staleness-error", cl::Hidden, cl::init(999000),
238+
"hot-func-cutoff-for-staleness-error", cl::Hidden, cl::init(800000),
239239
cl::desc("A function is considered hot for staleness error check if its "
240-
"total sample count is above the specified percentile(multiplied "
241-
"by 10000, e.g. 995000 for 99.5 percentile)."));
240+
"total sample count is above the specified percentile"));
242241

243242
static cl::opt<unsigned> MinfuncsForStalenessError(
244243
"min-functions-for-staleness-error", cl::Hidden, cl::init(50),
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
; REQUIRES: x86_64-linux
22
; RUN: not opt < %S/pseudo-probe-profile-mismatch.ll -passes=sample-profile -sample-profile-file=%S/Inputs/pseudo-probe-profile-mismatch.prof -min-functions-for-staleness-error=1 -precent-mismatch-for-staleness-error=1 -S 2>&1 | FileCheck %s
3+
; RUN: opt < %S/pseudo-probe-profile-mismatch.ll -passes=sample-profile -sample-profile-file=%S/Inputs/pseudo-probe-profile-mismatch.prof -min-functions-for-staleness-error=3 -precent-mismatch-for-staleness-error=70 -S 2>&1
4+
; RUN: opt < %S/pseudo-probe-profile-mismatch.ll -passes=sample-profile -sample-profile-file=%S/Inputs/pseudo-probe-profile-mismatch.prof -min-functions-for-staleness-error=4 -precent-mismatch-for-staleness-error=1 -S 2>&1
5+
36

47
; CHECK: error: {{.*}}: The input profile significantly mismatches current source code. Please recollect profile to avoid performance regression.

0 commit comments

Comments
 (0)