This is an archive of the discontinued LLVM Phabricator instance.

[scudo] [GWP-ASan] Add GWP-ASan variant of scudo benchmarks.
ClosedPublic

Authored by hctim on May 4 2021, 3:13 PM.

Details

Summary

GWP-ASan is the "production" variant as compiled by compiler-rt, and it's useful to be able to benchmark changes in GWP-ASan or Scudo's GWP-ASan hooks across versions. GWP-ASan is sampled, and sampled allocations are much slower, but given the amount of allocations that happen under test here - we actually get a reasonable representation of GWP-ASan's negligent performance impact between runs.

Diff Detail

Event Timeline

hctim created this revision.May 4 2021, 3:13 PM
hctim requested review of this revision.May 4 2021, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2021, 3:13 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
hctim updated this revision to Diff 342885.May 4 2021, 3:28 PM

Forgot to update the once-init nonce. It needs to be moved to a member, rather than a global.

hctim updated this revision to Diff 343206.May 5 2021, 3:05 PM

Forgot to initialize the global for the _loop variant.

cryptoad accepted this revision.May 10 2021, 11:57 AM
cryptoad added inline comments.
compiler-rt/lib/scudo/standalone/benchmarks/malloc_benchmark.cpp
76

Probably include <vector>, I think on some platforms it's not inferred.

This revision is now accepted and ready to land.May 10 2021, 11:57 AM
hctim marked an inline comment as done.May 10 2021, 12:26 PM
hctim added inline comments.
compiler-rt/lib/scudo/standalone/benchmarks/malloc_benchmark.cpp
76

(done in the commit)