This is an archive of the discontinued LLVM Phabricator instance.

[llvm-profgen] Update total samples by accumulating all its body samples
ClosedPublic

Authored by wlei on Oct 27 2021, 3:50 PM.

Details

Summary

Like probe-based profile, the total samples is the sum of all its body samples. This patch fix it by a post-processing update for the line-number based profile. Tested it on our internal services, results showed no performance change.

Diff Detail

Event Timeline

wlei created this revision.Oct 27 2021, 3:50 PM
wlei requested review of this revision.Oct 27 2021, 3:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 27 2021, 3:50 PM
wlei edited the summary of this revision. (Show Details)Oct 27 2021, 3:58 PM
wlei added reviewers: hoy, wenlei.
wenlei accepted this revision.Oct 27 2021, 5:53 PM

lgtm, except a nit. thanks.

llvm/include/llvm/ProfileData/SampleProf.h
735

nit: inferTotalSamples->updateTotalSamples, same for ProfileGenerator.

This revision is now accepted and ready to land.Oct 27 2021, 5:53 PM
wlei updated this revision to Diff 382907.Oct 27 2021, 9:31 PM

rename inferTotalSamples->updateTotalSamples

wlei updated this revision to Diff 382910.Oct 27 2021, 9:42 PM

clean up all the redundant "addTotalSamples"

hoy accepted this revision.Oct 28 2021, 9:57 AM

LGTM, thanks.

wlei retitled this revision from [llvm-profgen] Infer total samples by accumulating all its body samples to [llvm-profgen] Update total samples by accumulating all its body samples.Oct 29 2021, 10:26 AM
wlei edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Oct 29 2021, 10:37 AM
This revision was automatically updated to reflect the committed changes.