Skip to content
Permalink
Browse files
8269175: [macosx-aarch64] wrong CPU speed in hs_err file
Backport-of: bcbe3845d92e38ad0086cc337dc5957842eef056
  • Loading branch information
Vladimir Kempik committed Dec 20, 2021
1 parent 2e9b271 commit c0ab12db5d1f8234ca97ced6a4943ef3dd4266b4
Showing 1 changed file with 7 additions and 3 deletions.
@@ -1392,13 +1392,17 @@ void os::get_summary_cpu_info(char* buf, size_t buflen) {
strncpy(machine, "", sizeof(machine));
}

const char* emulated = "";
#if defined(__APPLE__) && !defined(ZERO)
if (VM_Version::is_cpu_emulated()) {
emulated = " (EMULATED)";
snprintf(buf, buflen, "\"%s\" %s (EMULATED) %d MHz", model, machine, mhz);
} else {
NOT_AARCH64(snprintf(buf, buflen, "\"%s\" %s %d MHz", model, machine, mhz));
// aarch64 CPU doesn't report its speed
AARCH64_ONLY(snprintf(buf, buflen, "\"%s\" %s", model, machine));
}
#else
snprintf(buf, buflen, "\"%s\" %s %d MHz", model, machine, mhz);
#endif
snprintf(buf, buflen, "\"%s\" %s%s %d MHz", model, machine, emulated, mhz);
}

void os::print_memory_info(outputStream* st) {

1 comment on commit c0ab12d

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on c0ab12d Dec 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.