pharo-vm
pharo-vm copied to clipboard
SmalltalkImage>>#highResClock doesn't work on ARM 64bit
So AndreasSystemProfiler doesn't work.
Smalltalk highResClock
returns 0.
Hi
https://github.com/pharo-project/pharo-vm/commit/bc5fda682bbe08bfa33c5c8b6ab2de02621a4131 added support for high res clock on ARM64 linux, however it broke Windows ARM64 build. The issue is due to removed defined(_M_ARM64)
in the above mentioned commit, which causes the case switches on ARM64 Windows to fallback to
#elif defined(_WIN32)
value = __rdtsc();
#else
https://github.com/pharo-project/pharo-vm/blob/809b6e08a721ed5c12e745600d2bf3d0c2e0f517/extracted/vm/src/common/heartbeat.c#L241
__rdtsc
is not available on ARM64 architectures: https://learn.microsoft.com/en-us/cpp/intrinsics/rdtsc?view=msvc-170
Learn more about: __rdtsc