This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Color output of child processes
ClosedPublic

Authored by arsenm on Oct 10 2022, 6:08 PM.

Details

Summary

When reducing llvm-reduce with llvm-reduce, it can be confusing
to figure out what lines are printed by the child or parent. Not
sure this is the most reliable way to set and restore this.

Diff Detail

Event Timeline

arsenm created this revision.Oct 10 2022, 6:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 6:08 PM
arsenm requested review of this revision.Oct 10 2022, 6:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 6:08 PM
Herald added a subscriber: wdng. · View Herald Transcript

does this handle stderr output?

does this handle stderr output?

Yes. They seem to not be independently settable. I originally set both with different colors but the second one always applied to both

aeubanks accepted this revision.Oct 11 2022, 12:43 PM
This revision is now accepted and ready to land.Oct 11 2022, 12:43 PM

I am noticing some instances not getting the output colored when using parallel reduction

I am noticing some instances not getting the output colored when using parallel reduction

Also getting incorrectly colored parent output

given that the streams are global, I guess we shouldn't do this with parallel execution, unless we somehow serialize that output

we should probably revert this or somehow fix forward

I've reverted in 29cf7dffb81b0522231b1c154de108e059d8a4f0 because I think this is breaking an msan bot, see that commit description. (probably not doing this with parallel reduction is good enough)

I've reverted in 29cf7dffb81b0522231b1c154de108e059d8a4f0 because I think this is breaking an msan bot, see that commit description. (probably not doing this with parallel reduction is good enough)

The parallel debug log is also pretty annoying. I was thinking of capturing the output and ensuring a printed order