mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
8035074: hs_err improvement: Add time zone information in the hs_err file
8026335: hs_err improvement: Print exact compressed oops mode and the heap base value 8026331: hs_err improvement: Print if we have seen any OutOfMemoryErrors or StackOverflowErrors Add requested things to hs_err file. Reviewed-by: ctornqvi, dholmes
This commit is contained in:
parent
f286447281
commit
9e5e7f9e5a
11 changed files with 116 additions and 21 deletions
|
@ -843,7 +843,7 @@ void os::print_cpu_info(outputStream* st) {
|
|||
pd_print_cpu_info(st);
|
||||
}
|
||||
|
||||
void os::print_date_and_time(outputStream *st) {
|
||||
void os::print_date_and_time(outputStream *st, char* buf, size_t buflen) {
|
||||
const int secs_per_day = 86400;
|
||||
const int secs_per_hour = 3600;
|
||||
const int secs_per_min = 60;
|
||||
|
@ -852,6 +852,12 @@ void os::print_date_and_time(outputStream *st) {
|
|||
(void)time(&tloc);
|
||||
st->print("time: %s", ctime(&tloc)); // ctime adds newline.
|
||||
|
||||
struct tm tz;
|
||||
if (localtime_pd(&tloc, &tz) != NULL) {
|
||||
::strftime(buf, buflen, "%Z", &tz);
|
||||
st->print_cr("timezone: %s", buf);
|
||||
}
|
||||
|
||||
double t = os::elapsedTime();
|
||||
// NOTE: It tends to crash after a SEGV if we want to printf("%f",...) in
|
||||
// Linux. Must be a bug in glibc ? Workaround is to round "t" to int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue