[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-dev
Subject:    Re: [PATCH] Mac print cpu model name
From:       David CARLIER <devnexen () gmail ! com>
Date:       2019-08-29 21:38:03
Message-ID: CA+XhMqxDuJEorB=4X2rnQbtkAR-ryNFi8mFy7PT0LqWvd_-2HA () mail ! gmail ! com
[Download RAW message or body]

Alright :-) hopes It fits better.
Regards.

# HG changeset patch

# User David Carlier <devnexen@gmail.com>

# Date 1567104150 -3600

#      Thu Aug 29 19:42:30 2019 +0100

# Node ID 8dcf8637118199e40e1015684fe10df2aa4a6693

# Parent  4612a3cfb92729002deb3c86056b1104a12c9d27

hotspot, darwin: print cpu model name


diff -r 4612a3cfb927 -r 8dcf86371181 src/hotspot/os/bsd/os_bsd.cpp

--- a/src/hotspot/os/bsd/os_bsd.cpp Thu Aug 29 10:52:21 2019 -0700

+++ b/src/hotspot/os/bsd/os_bsd.cpp Thu Aug 29 19:42:30 2019 +0100

@@ -1597,7 +1597,15 @@

 }


 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_model[] = {CTL_HW, HW_MODEL };

+  if (sysctl(mib_model, sizeof(mib_model)/sizeof(mib_model[0]),

+    model, &size, NULL, 0) == 0) {

+    st->print_raw("CPU Model:\n");

+    st->print_raw(model);

+    st->cr();

+  }

 }


 void os::get_summary_cpu_info(char* buf, size_t buflen) {

On Thu, 29 Aug 2019 at 22:03, <mark.reinhold@oracle.com> wrote:
>
> 2019/8/29 13:31:35 -0700, Remi Forax <forax@univ-mlv.fr>:
> > Hi David,
> > the attachment has been scrubbed :)
>
> FYI, the allowed attachment types are:
>
>   message/rfc822
>   multipart/alternative
>   multipart/mixed
>   multipart/related
>   multipart/signed
>   text/plain
>   text/x-diff
>   text/x-patch
>
> - Mark
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic