This is an archive of the discontinued LLVM Phabricator instance.

[profile] pre-allocate a small counter set in profile runtime
ClosedPublic

Authored by davidxl on May 25 2016, 4:36 PM.

Details

Summary

vp-counters-per-site tunings for small apps generally works (for SPEC), but gobmk is an outlier. It has ~40 sites with ~800 values collected. Bumping up per-site ratio to 20x can be too excessive for general cases. Here a very low overhead solution is to pre-allocate a shared pool which works well.

I can make it work in a way such that the overhead is only paid with value profiling is on and when dynamic allocation is off. However given that the overhead (24k bytes) is tiny, I would rather avoid it.

Diff Detail

Repository
rL LLVM

Event Timeline

davidxl updated this revision to Diff 58538.May 25 2016, 4:36 PM
davidxl retitled this revision from to [profile] pre-allocate a small counter set in profile runtime.
davidxl updated this object.
davidxl added reviewers: vsk, silvas.
davidxl added a subscriber: llvm-commits.
silvas accepted this revision.May 25 2016, 4:45 PM
silvas edited edge metadata.

This on the order of our statically allocated I/O buffers, so I'm not too worried. LGTM.

This revision is now accepted and ready to land.May 25 2016, 4:45 PM
This revision was automatically updated to reflect the committed changes.