This is an archive of the discontinued LLVM Phabricator instance.

[Debugify][OriginalDIMode] Make HTML reporting infrastructure more resilient
ClosedPublic

Authored by ntesic on Dec 13 2021, 2:46 AM.

Details

Summary

Debugify in OriginalDebugInfo mode (verify-each-debuginfo-preserve), when used in
parallel builds of large projects, can produce incorrect report.
More precisely, simultaneous writes to JSON report file,
could form incorrect JSON objects, which describe found Debug Info bugs.

This patch uses the lock/unlock mechanism to protect JSON report file and also
makes script llvm/utils/llvm-original-di-preservation.py resilient to corrupted
lines in the report file. So, it ensures the creation of HTML report.

Diff Detail

Event Timeline

ntesic created this revision.Dec 13 2021, 2:46 AM
ntesic requested review of this revision.Dec 13 2021, 2:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 13 2021, 2:46 AM
StephenTozer added inline comments.Dec 15 2021, 8:12 AM
llvm/utils/llvm-original-di-preservation.py
381

Nit, this declaration of skipped_lines looks unnecessary

409–414

Maybe for this section we could also use a skipped_bugs counter, so that we can still see there are file errors when the individual bugs are incorrect, even if every line is still a valid json object with all the expected top level fields present?

Change SGTM, except for the minor inline comments.

ntesic updated this revision to Diff 396016.Dec 23 2021, 5:57 AM

Addressed comments.
@StephenTozer Thanks for the comments, I agree with all the suggestions.

ntesic marked 2 inline comments as done.Dec 23 2021, 5:58 AM
StephenTozer accepted this revision.Feb 23 2022, 4:26 AM
This revision is now accepted and ready to land.Feb 23 2022, 4:26 AM
This revision was landed with ongoing or failed builds.Sep 29 2022, 7:48 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 29 2022, 7:48 AM