Skip to content

[HWASAN] Follow up for #83503 implement selective instrumentation #83942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changed flag descriptions.
  • Loading branch information
kstoimenov committed Mar 6, 2024
commit afa8c928dba1d535fc3b33cc944e4cb66ad5f176
13 changes: 8 additions & 5 deletions llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,14 @@ static cl::opt<bool>
cl::Hidden, cl::init(false));

static cl::opt<int> HotPercentileCutoff("hwasan-percentile-cutoff-hot",
cl::init(0));

static cl::opt<float> RandomSkipRate(
"hwasan-random-skip-rate", cl::init(0),
cl::desc("Probability to skip instrumentation of a function."));
cl::init(0),
cl::desc("Alternative hot percentile cuttoff."
"By default `-profile-summary-cutoff-hot` is used."));

static cl::opt<float>
RandomSkipRate("hwasan-random-skip-rate", cl::init(0),
cl::desc("Probability value in the range [0.0, 1.0] "
"to skip instrumentation of a function."));

STATISTIC(NumTotalFuncs, "Number of total funcs");
STATISTIC(NumInstrumentedFuncs, "Number of instrumented funcs");
Expand Down