This is an archive of the discontinued LLVM Phabricator instance.

[Profile] Add new public API to get profile path prefix
ClosedPublic

Authored by davidxl on Jul 19 2016, 4:04 PM.

Details

Summary

This API is intended to be used by user program to fetch all profiles dumped in same dir (the name of individual raw profile file is not important).

Diff Detail

Repository
rL LLVM

Event Timeline

davidxl updated this revision to Diff 64586.Jul 19 2016, 4:04 PM
davidxl retitled this revision from to [Profile] Add new public API to get profile path prefix.
davidxl updated this object.
davidxl added reviewers: tejohnson, vsk.
davidxl added a subscriber: llvm-commits.
vsk edited edge metadata.Jul 19 2016, 4:51 PM

Looks good! I just have one concern.

lib/profile/InstrProfiling.h
155 ↗(On Diff #64586)

than -> and?

lib/profile/InstrProfilingFile.c
435 ↗(On Diff #64586)

Can this give the wrong answer if it comes after a call to __llvm_profile_set_filename()?

davidxl updated this revision to Diff 64619.Jul 19 2016, 5:28 PM
davidxl edited edge metadata.

Address Vedant's review comments and added more test.

vsk accepted this revision.Jul 19 2016, 5:50 PM
vsk edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jul 19 2016, 5:50 PM
This revision was automatically updated to reflect the committed changes.