Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make JitPrintInlinedMethods less verbose #61208

Merged
merged 4 commits into from
Nov 6, 2021

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Nov 4, 2021

Was:

image

Now:

image

We can also introduce a verbosity level e.g. to only print successful inlinees after [guarded] devirtualizations. The goal is to allow developers to easily find out which call-sites were devirtualized (and inlined because devirtualization without inlining is not interesting) with PGO and which were not.

cc @dotnet/jit-contrib @AndyAyersMS

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 4, 2021
@ghost
Copy link

ghost commented Nov 4, 2021

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

Was:

image

Now:

image

We can also introduce a verbosity level e.g. to only print successful inlinees after [guarded] devirtualizations. The goal is to allow developers to easily find out which call-sites were devirtualized with PGO and which were not.

cc @dotnet/jit-contrib @AndyAyersMS

Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member

I'm not a fan of removing the ordinal and IL offset, I've been using those a lot in my debug info work. Can we keep those?

@EgorBo
Copy link
Member Author

EgorBo commented Nov 4, 2021

I'm not a fan of removing the ordinal and IL offset, I've been using those a lot in my debug info work. Can we keep those?

I can make the "verbose mode" to be default. If make Checked jits available for external developers I'd love it to be more friendly and less verbose for them at least with an additional config switch. Especially when ="*" mode is used.

@jakobbotsch
Copy link
Member

I'm not a fan of removing the ordinal and IL offset, I've been using those a lot in my debug info work. Can we keep those?

I can make the "verbose mode" to be default. Since we're going to publish a Checked jit for external developers I'd love it to be more friendly and less verbose for them at least with an additional config switch. Especially when ="*" mode is used.

Do we expect external developers to use the full JitDump mode? If we had a separate variable to report the things that may be interesting for external devs then we could have the less verbose output for this mode, and keep the more verbose mode for JitDump.

@EgorBo
Copy link
Member Author

EgorBo commented Nov 4, 2021

I'm not a fan of removing the ordinal and IL offset, I've been using those a lot in my debug info work. Can we keep those?

I can make the "verbose mode" to be default. Since we're going to publish a Checked jit for external developers I'd love it to be more friendly and less verbose for them at least with an additional config switch. Especially when ="*" mode is used.

Do we expect external developers to use the full JitDump mode? If we had a separate variable to report the things that may be interesting for external devs then we could have the less verbose output for this mode, and keep the more verbose mode for JitDump.

It's not part of JitDump, it's printed for DOTNET_JitPrintInlinedMethods=Test (or DOTNET_JitPrintInlinedMethods=*).

@jakobbotsch
Copy link
Member

It's not part of JitDump, it's printed for DOTNET_JitPrintInlinedMethods=Test (or DOTNET_JitPrintInlinedMethods=*).

The inline tree is also printed in JitDump using this code.

@jakobbotsch
Copy link
Member

Maybe pass verbose parameter to InlineStrategy::Dump and InlineContext::Dump for JitDump case? Then we can get rid of the new COMPlus variable too, I think the less verbose output makes sense if one is only looking at the inline tree without full jit dump.

@EgorBo
Copy link
Member Author

EgorBo commented Nov 4, 2021

@jakobbotsch good point! addressed in the latest commit.

Copy link
Member

@jakobbotsch jakobbotsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would personally prefer that "leaf" methods like these do not change behavior based on environment variables, e.g. using a verbose parameter instead (similar to what is already happening in InlineStrategy::Dump with its showBudget parameter). But that's not terribly important, if you prefer it this way that's fine with me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants