This is an archive of the discontinued LLVM Phabricator instance.

[esan|wset] Add 8-level working set snapshot accumulation
ClosedPublic

Authored by bruening on May 31 2016, 1:28 PM.

Details

Summary

Adds a new option -snapshot_step controlling the frequency distribution for
an 8-level series of samples using each bit of each shadow byte.
Implements accumulation from each level to the next higher level at the
specified frequency.

Adds storage of the 8 series of samples using CircularBuffer instances.
Fixes an error in the circular buffer data structure where a static
object's destructor will be called too early.

Prints the results out at the end in a simple manner to give us something
to start with.

Updates the workingset-samples test to test the new feature.

Diff Detail

Repository
rL LLVM

Event Timeline

bruening updated this revision to Diff 59127.May 31 2016, 1:28 PM
bruening retitled this revision from to [esan|wset] Add 8-level working set snapshot accumulation.
bruening updated this object.
bruening added a reviewer: aizatsky.
bruening added subscribers: llvm-commits, eugenis, kcc and 2 others.
aizatsky added inline comments.Jun 2 2016, 1:56 PM
lib/esan/esan_flags.inc
44 ↗(On Diff #59127)

Why do you use negated values here?

lib/esan/working_set.cpp
196 ↗(On Diff #59127)

This is not frequency, this is period, right? Frequency is in hz.

234 ↗(On Diff #59127)

period

bruening marked 3 inline comments as done.Jun 2 2016, 2:56 PM
bruening added inline comments.
lib/esan/esan_flags.inc
44 ↗(On Diff #59127)

The dash is supposed to indicate an option. I will remove it (esp since sanitizer options don't use dash prefixes).

lib/esan/working_set.cpp
196 ↗(On Diff #59127)

Right.

bruening updated this revision to Diff 59463.Jun 2 2016, 2:57 PM
bruening marked 2 inline comments as done.

Change 'frequency' to 'period'.

aizatsky accepted this revision.Jun 2 2016, 3:08 PM
aizatsky edited edge metadata.
This revision is now accepted and ready to land.Jun 2 2016, 3:08 PM
This revision was automatically updated to reflect the committed changes.