This is an archive of the discontinued LLVM Phabricator instance.

[profile] Cleanup profile file path set up code
ClosedPublic

Authored by davidxl on Jun 9 2016, 11:31 PM.

Details

Summary

Consolidate the logic (scattered in multiple different places) into one function. Also added note messages to make it more friendly to the user (e.g. debugging problem that the profile is not dumped in a place expected ..)

Regression tests were added to ensure no behavioral change.

Diff Detail

Repository
rL LLVM

Event Timeline

davidxl updated this revision to Diff 60315.Jun 9 2016, 11:31 PM
davidxl retitled this revision from to [profile] Cleanup profile file path set up code.
davidxl updated this object.
davidxl added a reviewer: vsk.
davidxl added a subscriber: llvm-commits.
silvas accepted this revision.Jun 10 2016, 3:49 AM
silvas added a reviewer: silvas.
silvas added a subscriber: silvas.

Nice! This really clarifies the code! LGTM

This revision is now accepted and ready to land.Jun 10 2016, 3:49 AM
This revision was automatically updated to reflect the committed changes.
MatzeB added a subscriber: MatzeB.Sep 22 2016, 1:49 PM
MatzeB added inline comments.
compiler-rt/trunk/lib/profile/InstrProfilingFile.c
339–346

So this is breaking our test-suite. Adding extra output to stdout/stderr based on profile settings messes up tests that look for a certain output of a process. Can we remove those notes again?