Skip to content

Clean up node flag tracing - #6846

Merged
vijaysun-omr merged 2 commits into
eclipse-omr:masterfrom
jdmpapin:node-flag-tracing
Jan 26, 2023
Merged

Clean up node flag tracing#6846
vijaysun-omr merged 2 commits into
eclipse-omr:masterfrom
jdmpapin:node-flag-tracing

Conversation

@jdmpapin

@jdmpapin jdmpapin commented Dec 13, 2022

Copy link
Copy Markdown
Contributor
  • Print flags that have been missing from log output
  • Clean up and likely speed up printing of node flags

Please see the individual commit messages.

@vijaysun-omr

Copy link
Copy Markdown
Contributor

Jenkins build all

2 similar comments
@jdmpapin

Copy link
Copy Markdown
Contributor Author

Jenkins build all

@vijaysun-omr

Copy link
Copy Markdown
Contributor

Jenkins build all

@jdmpapin

Copy link
Copy Markdown
Contributor Author

I can't tell what went wrong in the macOS build ("Build not found"), and it doesn't seem to be restarting when I hit "Re-run."

The Windows tests failed because a number of tests didn't run, and in every case it seems to have been because an executable was missing:

Unable to find executable: C:/omr/workspace/PullRequest-win_x86-64/Build/build/Debug/[...].exe

I can't tell why these files were missing, but I doubt it has to do with node flag tracing.

It's very confusing when debugging for a node to have flags that don't
appear in the log. Start printing the following flags:
- swappedChildren
- versionableIfWithMinExpr
- versionableIfWithMaxExpr
- createdByPRE
- referenceIsNonNull
The node flag "print" methods are trivial. They are almost all
one-liners, and their definitions are highly repetitive (not within
definitions, but across them). These methods really only serve as a
noisy and boilerplate-heavy way to specify the flags' names.
Furthermore, each has exactly one use site, so they don't even
meaningfully deduplicate those names in the source code.

Now these methods are inlined into TR_Debug::nodePrintAllFlags(), which
centralizes the choice of names for all flags in trace logs. This most
likely helps the performance of node flag printing on its own, since
previously it was not possible for the build compiler to inline any of
the "print" methods (except for one). Additionally, and in part enabled
by the inlining,
- the repetitive structure is factored out;
- unset flags now skip appending, instead of appending ""; and
- output is generated using appends() instead of appendf("%s", ...).

After inlining, the "print" methods are unused, and they are removed.

This commit does not change the set of flags printed explicitly in
nodePrintAllFlags(), their printed names, or their order. Specifically,
OpenJ9-specific flags are still printed here. Handling of those flags
should be moved to OpenJ9, but that move is not tackled here.
@jdmpapin

Copy link
Copy Markdown
Contributor Author

I added and removed an empty commit to restart the checks, but it restarted the copyright check as well, so now I've updated the copyright dates.

@jdmpapin

Copy link
Copy Markdown
Contributor Author

Jenkins build all

@vijaysun-omr

Copy link
Copy Markdown
Contributor

I reviewed that all the queries passed in to the new FLAG routines matched what was being printed. Checks have passed. Merging.

@vijaysun-omr
vijaysun-omr merged commit 133f9ba into eclipse-omr:master Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants