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

[NativeAOT] Unnecessary lookup in TrailingEpilogueInstructionsCount #75807

Closed
filipnavara opened this issue Sep 18, 2022 · 2 comments · Fixed by #87664
Closed

[NativeAOT] Unnecessary lookup in TrailingEpilogueInstructionsCount #75807

filipnavara opened this issue Sep 18, 2022 · 2 comments · Fixed by #87664

Comments

@filipnavara
Copy link
Member

UnixNativeCodeManager::TrailingEpilogueInstructionsCount for TARGET_ARM64 calls FindMethodInfo which is rather expensive. When called from UnixNativeCodeManager::GetReturnAddressHijackInfo it is already known so it can be passed over instead of doing extra lookup.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 18, 2022
@jkotas
Copy link
Member

jkotas commented Sep 18, 2022

cc @VSadov

@filipnavara
Copy link
Member Author

There is room for other similar optimisations. For example, the codeManager->IsSafePoint also does the method lookup early in Thread::HijackCallback. That same method info could be used in codeManager->IsUnwindable debug-only ASSERT on ARM64. And it will inevitably be looked up again in Thread::HijackReturnAddress.

Some of these places are easier to patch than others but they all contribute to the signal handling response time when hijacking threads. That, in turn, contributes to GC pause times.

@MichalStrehovsky MichalStrehovsky added this to the 8.0.0 milestone Sep 22, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Sep 22, 2022
@agocke agocke added this to AppModel Apr 3, 2023
jkotas added a commit to jkotas/runtime that referenced this issue Jun 16, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 16, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants