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

Consider using S.R.InteropServices.RuntimeInformation.ProcessArchitecture instead pointer based detection of platform #385

Closed
zabulus opened this issue Mar 9, 2017 · 3 comments
Assignees
Milestone

Comments

@zabulus
Copy link

zabulus commented Mar 9, 2017

Follow-up of #381 (comment)

Currently RuntimeInformation.CurrentPlatform is detected based in pointer size: https://github.com/dotnet/BenchmarkDotNet/blob/master/src/BenchmarkDotNet.Core/Portability/RuntimeInformation.cs#L168 and produces wrong result for ARM platform.

Using https://docs.microsoft.com/de-de/dotnet/core/api/system.runtime.interopservices.runtimeinformation#System_Runtime_InteropServices_RuntimeInformation_ProcessArchitecture should fix this issue.

@AndreyAkinshin
Copy link
Member

Ok, it easy to do for the CORE profile. Any idea how to detect ARM on Mono?

@zabulus
Copy link
Author

zabulus commented Mar 9, 2017

Currently on Mono S.R.Interop.RuntimeInformation returns same value as code in BDN:
https://github.com/mono/mono/blob/ff7a2a5114d6da678a5a75c5eebf0731db4f3aed/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/RuntimeInformation.cs#L79

So replacing it won't be regression at least. Though I think this should be fixed in mono

@adamsitnik
Copy link
Member

Implemented in #979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants