Skip to content

Conversation

@davidwrighton
Copy link
Member

@davidwrighton davidwrighton commented Nov 21, 2020

  • Reduce the boilerplate logic when modifying the jit ee interface
  • 3 new files in superpmi are now autogenerated as well as 2 files in the jit directory are now autogenerated
  • Reduce to only having one copy of the jit-ee interface guid

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 21, 2020
@davidwrighton
Copy link
Member Author

@dotnet/jit-contrib

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

Thanks! I had been thinking we should do something like this for a long time.

Copy link
Member

Choose a reason for hiding this comment

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

Can you leave breadcrumbs here and in the other newly auto-generated files to hiht at how they can be regenerated?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please include pointers to the instructions for re-generation

Copy link
Member

Choose a reason for hiding this comment

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

@AndyAyersMS
Copy link
Member

@BruceForstall @sandreenko think you should look this over too.

@jkotas
Copy link
Member

jkotas commented Nov 21, 2020

Unfortunately requires compiling the libjitinterface with the PAL

Why is that? That's very unfortunate.

I think depending on the PAL headers would be ok, but it would be really nice to avoid linking with the PAL. I was hoping that the number of places we link the PAL will decrease over time...

Copy link
Contributor

@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.

This should make updating the JIT-EE interface easier, which is much appreciated.

Copy link
Contributor

Choose a reason for hiding this comment

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

nit? Looks like you could save lots of duplicated code by extracting a function to output function signatures, and function argument call lists

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like you should have at least minimal argument validation here, like checking the number of arguments, and a "usage" message that would also serve as a short description of what this tool is doing.

Copy link
Contributor

@sandreenko sandreenko left a comment

Choose a reason for hiding this comment

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

looks good, I like the simplified jit ee interface changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: name these paths like ..\..\..\..\..\..\..\ etc?

Copy link
Contributor

Choose a reason for hiding this comment

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

question: why was it renamed?

Copy link
Member Author

Choose a reason for hiding this comment

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

CorInfoException is an enum type in corinfo.h

- Removes duplicate copy of jit ee api version guid
- Sets up for making jit interface wrapper actually implement the jit interface

Update generater to match previous manual modification

Use ICorJitInfo interface for jit thunk directly instead of relying on parallel definition to match up
- Found a bug in handling of TryResolveToken

Generate api names

Generate jit api wrapper from thunk generator

Generate icorjitinfoimpl.h

spmi counter shim icorjitinfo

superpmi-shim-simple

Update linux script

Fix utf8 char out marshalling

Builds on Linux but doesn't work

Compile with PAL

Respond to code review feedback
@davidwrighton
Copy link
Member Author

Updated with code review feedback. I've stepped back from requiring the PAL, as that was causing odd problems. I may address that in a future change.

}
virtual unsigned int getMethodAttribs(
void* ftn)
{
Copy link
Member

Choose a reason for hiding this comment

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

Nit: The indentation is off.

Copy link
Member Author

Choose a reason for hiding this comment

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

The generator is ugly enough as it is. Unless there is pushback, I'd prefer to leave the indentation.

Copy link
Contributor

@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.

A few comment-related comments

@@ -0,0 +1,28 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this file also need a license notice?

0x65a1,
0x487a,
{0x85, 0x53, 0xc8, 0x45, 0x49, 0x6d, 0xa9, 0x01}
}; No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing trailing end-of-line character?

};

#include "jiteeversionguid.h"
//////////////////////////////////////////////////////////////////////////////////////////////////////////
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the "END JITEEVersionIdentifier" comment needs to be in the jiteeversionguid.h file.

We probably should have big, unmiss-able, comments at the top of all the JIT-EE interface files pointing to the JIT-EE version, but that's somewhat unrelated; this system only works when code reviewers know to ask for an interface GUID change.

Maybe the jiteeversionguid.h file should also point to the updating-jitinterface.md documentation.

@davidwrighton davidwrighton merged commit e9a47b7 into dotnet:master Dec 2, 2020
BruceForstall added a commit to BruceForstall/runtime that referenced this pull request Dec 4, 2020
With dotnet#45044 it moved from corinfo.h to jiteeversionguid.h
BruceForstall added a commit to BruceForstall/runtime that referenced this pull request Dec 4, 2020
With dotnet#45044 it moved from corinfo.h to jiteeversionguid.h
BruceForstall added a commit that referenced this pull request Dec 4, 2020
jkotas pushed a commit that referenced this pull request Dec 4, 2020
With #45044 it moved from corinfo.h to jiteeversionguid.h
@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2021
@davidwrighton davidwrighton deleted the better_thunk_gen branch April 20, 2021 17:44
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.

7 participants