RFR: 8261966: macOS M1: report in hs_err log if we are running x86 code in emulation mode (Rosetta)

Daniel D.Daugherty dcubed at openjdk.java.net
Thu Mar 18 19:06:39 UTC 2021


On Thu, 18 Mar 2021 18:24:24 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

> Please review this simple enhancement where we indicate in hs_err log file whether the CPU is being emulated. Right now the only use case is for Apple's M1 aarch64 running x64 code, i.e. "Rosetta" emulation.
> 
> This enhancement will insert `(EMULATED)` label after we print host CPU type, ex:
> 
> `Host: Oracles-MacBook-Pro-16.local, MacBookPro16,1 x86_64 2600 MHz (EMULATED), 12 cores, 32G, Darwin 19.6.0, macOS 10.15.7 (19H114)`

In the bug report, @dholmes-ora mentions two different places where
"(EMULATED)" should show up.  This change covers the first:

> Host: MacBookPro17,1 x86_64 2400 MHz, 8 cores, 16G, Darwin 20.3.0
> 
> becomes
> 
> Host: MacBookPro17,1 x86_64 (EMULATED) 2400 MHz, 8 cores, 16G, Darwin 20.3.0 

but I don't think that it covers the second:

> CPU: total 8 (initial active 8) (1 cores per cpu, 1 threads per core) family 6 model 44 stepping 0 microcode 0x0, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, aes, clmul, tsc, tscinvbit, tscinv, clflush
> 
> becomes:
> 
> CPU: (EMULATED) total 8 (initial active 8) (1 cores per cpu, 1 threads per core) family 6 model 44 stepping 0 microcode 0x0, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, aes, clmul, tsc, tscinvbit, tscinv, clflush 

Am I missing something here?

-------------

Changes requested by dcubed (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3077


More information about the hotspot-runtime-dev mailing list