Forwarding to bsd-dev-port, but I don't think there is any active work being done on this port at the moment.

David
--- Begin Message ---
Hi,

here a little patch proposal to improve slightly the BSD support.

Thanks.

Kind regards.
# HG changeset patch
# User David Carlier <dcarl...@afilias.info>
# Date 1558430500 0
#      Tue May 21 09:21:40 2019 +0000
# Node ID b7c0ab0c591133c52014b7473acbe8ec9daf73ef
# Parent  566fbca8a89093c5f15157115d70a265aaf28bee
hotspot/bsd: pd_print_cpu_info, display minmal information

diff -r 566fbca8a890 -r b7c0ab0c5911 src/hotspot/os/bsd/os_bsd.cpp
--- a/src/hotspot/os/bsd/os_bsd.cpp	Mon May 20 18:18:42 2019 -0700
+++ b/src/hotspot/os/bsd/os_bsd.cpp	Tue May 21 09:21:40 2019 +0000
@@ -1568,6 +1568,13 @@
 
 void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) {
   // Nothing to do for now.
+  char model[100];
+  size_t size = sizeof(model);
+  int mib[] = { CTL_HW, HW_MODEL };
+  if (sysctl(mib, 2, model, &size, NULL, 0) == 0) {
+    st->print("model name: %s", model);
+    st->cr();
+  }
 }
 
 void os::get_summary_cpu_info(char* buf, size_t buflen) {

--- End Message ---


Reply via email to