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

Add ISMETHOD and ISMETHODHASH macros #59993

Merged
merged 5 commits into from
Oct 9, 2021
Merged

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Oct 5, 2021

This PR adds ISMETHOD and ISMETHODHASH macros so one can do something like:

if (ISMETHOD("Main"))
{
; // break or some printf when JIT compiles "Main" function
}

Same for ISMETHODHASH(424242) which is useful when one debugs superpmi failures

@dotnet/jit-contrib @SingleAccretion do you find it useful? I personally write such strcmp quite often 🙂

Also, this PR changes types for gtCallType and gtReturnType to corresponding enums for better intellisense (enums have the same underlying type - unsigned char)

@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 Oct 5, 2021
@ghost
Copy link

ghost commented Oct 5, 2021

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

Issue Details

This PR adds ISMETHOD and ISMETHODHASH macros so one can do something like:

if (ISMETHOD("Main"))
{
; // break or some printf when JIT compiles "Main" function
}

Same for ISMETHODHASH(424242) which is useful when one debugs superpmi failures

@dotnet/jit-contrib @SingleAccretion do you find it useful?

Also, this PR changes types for gtCallType and gtReturnType to corresponding enums for better intellisense (enums have the same underlying type - unsigned char)

Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

src/coreclr/jit/jit.h Outdated Show resolved Hide resolved
Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

These are intended to be used only when you are actively working on an issue and writing custom debugging code, right? So you would never expect to check in code that uses them?

It seems like you should add comments to that effect. In fact, maybe you should check these in commented out, and anyone who wants to use them can uncomment them at the same time as writing code to use them?

@EgorBo
Copy link
Member Author

EgorBo commented Oct 9, 2021

These are intended to be used only when you are actively working on an issue and writing custom debugging code, right? So you would never expect to check in code that uses them?

It seems like you should add comments to that effect. In fact, maybe you should check these in commented out, and anyone who wants to use them can uncomment them at the same time as writing code to use them?

Changed to be available only in DEBUG/CHECKED and it won't compile in Release so nobody will be able to check it in

@EgorBo EgorBo merged commit 9381777 into dotnet:main Oct 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 9, 2021
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.

4 participants