-
Notifications
You must be signed in to change notification settings - Fork 5k
Replace CodeManState with cache in EECodeInfo for x86. #114170
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
Conversation
Tagging subscribers to this area: @mangod9 |
This is not an universal win. It makes On other platforms it saves an unused space. There seem to be no downsides. It gets rid of one x86 quirk and makes it easier to reuse the cache in Thoughts? (I am aware of the build issues due to mismatching offsets; not worth resolving if this whole direction gets abandoned) |
LGTM! I like that it gets rid of the unused cache on !x86. |
Thanks for having a look. I made some progress on this locally and it helped me improve the performance on x86+funclet platforms. I'll clean up the PR soon. |
fbe883d
to
16b67b1
Compare
On all other platforms CodeManState was unused and taking space in StackFrameIterator. Optimize some code paths to cache GC info early or decode the method size without decoding the whole table. Move PCTAddr (Eip pointer) into KNONVOLATILE_CONTEXT_POINTERS_EX to avoid recomputing it when switching between callee and caller contexts.
ca82fc0
to
363f5f7
Compare
inline TADDR GetRegdisplayPCTAddr(REGDISPLAY *display) | ||
{ | ||
return display->PCTAddr; | ||
} | ||
|
||
inline void SetRegdisplayPCTAddr(REGDISPLAY *display, TADDR addr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially tried to optimize how the PCTAddr
is stored for callee context to avoid recomputation. Unfortunately it results in some bugs (eg. CopyRegDisplay
doesn't transfer the information correctly, IsInCalleesFrames
depends on quirks in the initial state, etc.) and I opted not to pursue this optimization at this time. I left the helper methods in place to make it easier to address this in future and to create a central place where we can _ASSERTE
on invalid values.
…e and thus avoid repeated GetGCInfoToken() calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
@janvorli Could you please take a look as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
/ba-g the test failure has been happening consistently on all runs since yesterday. #114426 |
On all other platforms CodeManState was unused and taking space in StackFrameIterator.
Optimize some code paths to cache GC info early or decode the method size without decoding the whole table.