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

Gerard Ziemski gziemski at openjdk.java.net
Wed Mar 24 15:21:41 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 in the **Host** and **CPU** section, ex:
> 
> 
> `Host: Oracles-MacBook-Pro-16.local, MacBookPro16,1 x86_64 2600 MHz, 12 cores, 32G, Darwin 19.6.0, macOS 10.15.7 (19H114)`
> 
> becomes
> 
> `Host: Oracles-MacBook-Pro-16.local, "MacBookPro16,1" x86_64 (EMULATED) 2600 MHz, 12 cores, 32G, Darwin 19.6.0, macOS 10.15.7 (19H114)`
> 
> and
> 
> `CPU: total 12 (initial active 12) (6 cores per cpu, 2 threads per core) family 6 model 158 stepping 10 microcode 0xde, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, adx, fma, vzeroupper, clflush, clflushopt
> `
> 
> becomes
> 
> `CPU: (EMULATED) total 12 (initial active 12) (6 cores per cpu, 2 threads per core) family 6 model 158 stepping 10 microcode 0xde, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, adx, fma, vzeroupper, clflush, clflushopt
> `
> 
> I also took the opportunity here to fix the model name by adding **"** around it as Apple uses commas in the name, which makes it harder to parse the **Host** section, since we also use commas to delineate, ex: `MacBookPro16,1` becomes `"MacBookPro16,1"`

This pull request has now been integrated.

Changeset: 4d8e9860
Author:    Gerard Ziemski <gziemski at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/4d8e9860
Stats:     12 lines in 2 files changed: 11 ins; 0 del; 1 mod

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

Reviewed-by: dcubed, mikael, dholmes

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

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


More information about the hotspot-runtime-dev mailing list