This is an archive of the discontinued LLVM Phabricator instance.

Use profile summary to disable peeling for huge working sets
ClosedPublic

Authored by tejohnson on Aug 3 2017, 2:27 PM.

Details

Summary

Detect when the working set size of a profiled application is huge,
by comparing the number of counts required to reach the hot percentile
in the profile summary to a large threshold*.

When the working set size is determined to be huge, disable peeling
to avoid bloating the working set further.

*Note that the selected threshold (15K) is significantly larger than the
largest working set value in SPEC cpu2006 (which is gcc at around 11K).

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Aug 3 2017, 2:27 PM
eraman added inline comments.Aug 3 2017, 2:50 PM
lib/Analysis/ProfileSummaryInfo.cpp
69 ↗(On Diff #109636)

The getMinCountForPercentile and getNumCountsForPercentile could be merged to a getEntryForPercentile

davidxl edited edge metadata.Aug 3 2017, 2:56 PM

Have we considered limiting the max number of peeled iterations instead of disabling it?

Have we considered limiting the max number of peeled iterations instead of disabling it?

I am planning to do some follow on tuning that would limit the factor based on additional profile info, but as a first heuristic disabling it helps quite a bit.

lib/Analysis/ProfileSummaryInfo.cpp
69 ↗(On Diff #109636)

That's a good idea, will do so.

tejohnson updated this revision to Diff 109646.Aug 3 2017, 4:05 PM

Implement Easwaran's suggestion

davidxl accepted this revision.Aug 3 2017, 4:36 PM

lgtm

This revision is now accepted and ready to land.Aug 3 2017, 4:36 PM
This revision was automatically updated to reflect the committed changes.

When the working set size is determined to be huge, disable peeling to avoid bloating the working set further.

Just lurking and curious: how is "working set" defined first? And then how is peeling bloating it?