Skip to content

Commit bcbe384

Browse files
author
Gerard Ziemski
committed
8269175: [macosx-aarch64] wrong CPU speed in hs_err file
Reviewed-by: dholmes, dcubed, stuefe
1 parent 426bcee commit bcbe384

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
@@ -1311,13 +1311,17 @@ void os::get_summary_cpu_info(char* buf, size_t buflen) {
13111311
strncpy(machine, "", sizeof(machine));
13121312
}
13131313

1314-
const char* emulated = "";
13151314
#if defined(__APPLE__) && !defined(ZERO)
13161315
if (VM_Version::is_cpu_emulated()) {
1317-
emulated = " (EMULATED)";
1316+
snprintf(buf, buflen, "\"%s\" %s (EMULATED) %d MHz", model, machine, mhz);
1317+
} else {
1318+
NOT_AARCH64(snprintf(buf, buflen, "\"%s\" %s %d MHz", model, machine, mhz));
1319+
// aarch64 CPU doesn't report its speed
1320+
AARCH64_ONLY(snprintf(buf, buflen, "\"%s\" %s", model, machine));
13181321
}
1322+
#else
1323+
snprintf(buf, buflen, "\"%s\" %s %d MHz", model, machine, mhz);
13191324
#endif
1320-
snprintf(buf, buflen, "\"%s\" %s%s %d MHz", model, machine, emulated, mhz);
13211325
}
13221326

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

0 commit comments

Comments
 (0)