Page MenuHomePhabricator

[ProfileSummary] Add the PartialProfileRatio field in ProfileSummary metadata.
ClosedPublic

Authored by yamauchi on May 14 2020, 11:05 AM.

Details

Summary

PartialProfileRatio approximately represents the ratio of the number of profile
counters of the program being built to the number of profile counters in the
partial sample profile. It is used to scale the working set size under the
partial sample profile to reflect the size of the program being built and to
improve the working set size heuristics.

This is a split from D79831.

Diff Detail

Event Timeline

yamauchi created this revision.May 14 2020, 11:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 14 2020, 11:05 AM
wmi added a subscriber: wmi.May 18 2020, 11:55 AM
wmi added inline comments.
llvm/include/llvm/IR/ProfileSummary.h
96–97

Can we add an assertion that Partial is true for getter and setter of PartialProfileRatio?

davidxl added inline comments.May 19 2020, 9:32 AM
llvm/lib/IR/ProfileSummary.cpp
77

Document the new parameter in the comment.

199–200

can you commit the style changes as NFC first?

yamauchi updated this revision to Diff 264984.May 19 2020, 11:40 AM
yamauchi marked 5 inline comments as done.

Address comments.

llvm/include/llvm/IR/ProfileSummary.h
96–97

Done for the setter, but it does not work for the getter as getMD will query the field value along with all the fields and just even to write a false value for it, even when it's not partial. Just querying seems okay.

llvm/lib/IR/ProfileSummary.cpp
199–200

Sure, will do.

yamauchi marked an inline comment as done.
yamauchi added inline comments.
llvm/lib/IR/ProfileSummary.cpp
199–200

Split it into D80230.

wmi added inline comments.May 20 2020, 1:58 PM
llvm/include/llvm/IR/ProfileSummary.h
98

Ok, better have some message in the assert.

wmi accepted this revision.May 20 2020, 1:59 PM
wmi added a reviewer: wmi.

LGTM.

This revision is now accepted and ready to land.May 20 2020, 2:00 PM
yamauchi updated this revision to Diff 265518.May 21 2020, 9:10 AM
yamauchi marked 2 inline comments as done.

Address comments.

llvm/include/llvm/IR/ProfileSummary.h
98

Done.

This revision was automatically updated to reflect the committed changes.