RFR : 8217786: Provide virtualization related info in the hs_error file on linux s390x

Thomas Stüfe thomas.stuefe at gmail.com
Mon Jan 28 10:38:51 UTC 2019


Hi Matthias,

I would reformulate the _scan_and_print_sysinfo_file() function in linux
code to be more generic, e.g. by handing down some sort of matching
condition. In its simplest form this can be one or a collection of
keywords, for example:

--

// keywords_to_match - NULL terminated array of keywords
static bool print_matching_lines_from_sysinfo_file(outputStream* st, const
char* keywords_to_match[]) {
..

  int i = 0;
  while (keywords_to_match[i]) {
   if (strstr(line, keywords_to_match[i]) == line) print line;
   i ++
 }
}

and call this on s390 with:
#ifdef s390
const char* kw[] = { "LPAR", "CPU", "VM", NULL };
#endif
print_matching_lines_from_sysinfo_file  (st, kw);

---

That way this coding can be easliy reused on other architectures.

Alternatively, I would fan out the coding for Linux to the cpu specific
files (os_linux_<cpu>.cpp) and leave all but s390 empty. But I am
personally not fond of those many empty functions.

Cheers, Thomas



On Mon, Jan 28, 2019 at 9:49 AM Baesken, Matthias <matthias.baesken at sap.com>
wrote:

> Hello, please review  this change ; it adds  virtualization related info
> in the hs_error file on linux s390x .
>
> On linux s390x, we usually  (always?)   run in virtualized environments
> (LPAR and/or z/VM / KVM ).
>
> It is helpful for instance in support cases to get some information about
> the virtualized environment in the hs_error file .
> A lot of info can be taken from the /proc/sysinfo file on linux s390x .
>
>
> Bug/webrev :
>
> https://bugs.openjdk.java.net/browse/JDK-8217786
>
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8217786.1/
>
>
>
> Best regards, Matthias
>


More information about the hotspot-dev mailing list