This is an archive of the discontinued LLVM Phabricator instance.

[opt-viewer] Accept directories that are searched for opt.yaml files
ClosedPublic

Authored by anemet on Jul 17 2017, 9:41 AM.

Details

Summary

This allows to pass the build directory where all the opt.yaml files are
rather than find | xargs which may invoke opt-viewer multiple times producing
incomplete html output.

The patch generalizes the same functionality from opt-diff.

Diff Detail

Repository
rL LLVM

Event Timeline

anemet created this revision.Jul 17 2017, 9:41 AM
davide added inline comments.Jul 17 2017, 9:57 AM
tools/opt-viewer/opt-diff.py
28 ↗(On Diff #106891)

typo: optmization

32 ↗(On Diff #106891)

Ditto.

tools/opt-viewer/optrecord.py
240–250 ↗(On Diff #106891)

this seems like something that can walk the whole filesystem if you end up passing the wrogn directory. Not sure there's a better way though.

anemet marked 2 inline comments as done.Jul 17 2017, 10:00 AM
anemet added inline comments.
tools/opt-viewer/optrecord.py
240–250 ↗(On Diff #106891)

Do you mean like stuff mounted and so on?

davide added inline comments.Jul 17 2017, 10:05 AM
tools/opt-viewer/optrecord.py
240–250 ↗(On Diff #106891)

Yes, exactly.

modocache edited edge metadata.Jul 17 2017, 10:28 AM

Excellent, thanks @anemet! I had been using xargs and was encountering exactly this issue. I'll accept assuming you fix the optmization typos before committing. Thanks!

modocache accepted this revision.Jul 17 2017, 10:28 AM
This revision is now accepted and ready to land.Jul 17 2017, 10:28 AM
davide accepted this revision.Jul 17 2017, 10:34 AM

LGTM with the small nits addressed.

anemet updated this revision to Diff 106907.Jul 17 2017, 10:46 AM

@davide, this version seems to correctly exclude mounted dirs, what do you
think?

This revision was automatically updated to reflect the committed changes.