Skip to content

Commit c0ab12d

Browse files
author
Vladimir Kempik
committed
8269175: [macosx-aarch64] wrong CPU speed in hs_err file
Backport-of: bcbe3845d92e38ad0086cc337dc5957842eef056
1 parent 2e9b271 commit c0ab12d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/hotspot/os/bsd/os_bsd.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,13 +1392,17 @@ void os::get_summary_cpu_info(char* buf, size_t buflen) {
13921392
strncpy(machine, "", sizeof(machine));
13931393
}
13941394

1395-
const char* emulated = "";
13961395
#if defined(__APPLE__) && !defined(ZERO)
13971396
if (VM_Version::is_cpu_emulated()) {
1398-
emulated = " (EMULATED)";
1397+
snprintf(buf, buflen, "\"%s\" %s (EMULATED) %d MHz", model, machine, mhz);
1398+
} else {
1399+
NOT_AARCH64(snprintf(buf, buflen, "\"%s\" %s %d MHz", model, machine, mhz));
1400+
// aarch64 CPU doesn't report its speed
1401+
AARCH64_ONLY(snprintf(buf, buflen, "\"%s\" %s", model, machine));
13991402
}
1403+
#else
1404+
snprintf(buf, buflen, "\"%s\" %s %d MHz", model, machine, mhz);
14001405
#endif
1401-
snprintf(buf, buflen, "\"%s\" %s%s %d MHz", model, machine, emulated, mhz);
14021406
}
14031407

14041408
void os::print_memory_info(outputStream* st) {

0 commit comments

Comments
 (0)