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

Authored by anemet on Mon, Jul 17, 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
anemet created this revision.Mon, Jul 17, 9:41 AM
davide added inline comments.Mon, Jul 17, 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.Mon, Jul 17, 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.Mon, Jul 17, 10:05 AM
tools/opt-viewer/optrecord.py
240–250 ↗(On Diff #106891)

Yes, exactly.

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.Mon, Jul 17, 10:28 AM
This revision is now accepted and ready to land.Mon, Jul 17, 10:28 AM
davide accepted this revision.Mon, Jul 17, 10:34 AM

LGTM with the small nits addressed.

anemet updated this revision to Diff 106907.Mon, Jul 17, 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.