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

[ Memory consumption ] PC-relative addresses instead of relocations in code section on ARM32 #7989

Closed
ruben-ayrapetyan opened this issue May 2, 2017 · 4 comments
Labels
arch-arm32 os-linux Linux OS (any supported distro) os-tizen tenet-performance Performance related issue
Milestone

Comments

@ruben-ayrapetyan
Copy link
Contributor

Hello.

We propose to reduce consumption of memory, which currently occurs due to applying relocations to code section of ngen-ed images.

To achieve this, we propose to replace movw+movt relocations with movw+movt+add pc instruction sequence. In the second case, the movw+movt encodes offset, which is relative to instruction position, so applying relocations becomes unnecessary.

We plan to add JitFlags::JIT_FLAG_RELATIVE_CODE_RELOCS as switch for relocated/position-independent mode for code section.

What do you think about enabling the option by default for ARM32?

Estimation on Tizen Xamarin GUI Application (specifically, Puzzle.Tizen - see tables at #7694 (comment)) is about 1 megabytes (15%) savings of per-application CoreCLR's memory part in Fragile mode.

@lemmaa @egavrin @Dmitri-Botcharnikov @gbalykov

@ruben-ayrapetyan
Copy link
Contributor Author

@jkotas, Please take a look.

@ruben-ayrapetyan
Copy link
Contributor Author

For now, we implemented prototype for the changes.
We plan to open pull request with complete patch this week.

@jkotas
Copy link
Member

jkotas commented May 2, 2017

What do you think about enabling the option by default for ARM32?

I think it make sense for Linux ARM32 native images. I do not think it makes sense for Windows ARM32. The relocations are handled by the OS kernel on Windows ARM32 that makes them cheap.

cc @BruceForstall

@ruben-ayrapetyan
Copy link
Contributor Author

ruben-ayrapetyan commented May 2, 2017

@jkotas, Thank you.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm32 os-linux Linux OS (any supported distro) os-tizen tenet-performance Performance related issue
Projects
None yet
Development

No branches or pull requests

3 participants