代码拉取完成,页面将自动刷新
同步操作将从 misaka00251/openjdk-1.8.0 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 2b0e2ff142de992d943a0df1aca605283f3449ab Mon Sep 17 00:00:00 2001
From: z30010524 <[email protected]>
Date: Thu, 16 Mar 2023 11:06:12 +0800
Subject: [PATCH 09/15] Fix localtime_r() not defined on windows
DTS/AR: DTS2023031516597
Summary: <JDK> :Fix localtime_r() not defined on windows, get system time by os::localtime_pd()
LLT: NA
Patch Type: huawei
Bug url: NA
---
hotspot/src/share/vm/services/memReporter.cpp | 2 +-
hotspot/src/share/vm/services/nmtDCmd.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hotspot/src/share/vm/services/memReporter.cpp b/hotspot/src/share/vm/services/memReporter.cpp
index 8ea363805..9fc309c74 100644
--- a/hotspot/src/share/vm/services/memReporter.cpp
+++ b/hotspot/src/share/vm/services/memReporter.cpp
@@ -298,7 +298,7 @@ void MemSummaryDiffReporter::report_diff() {
time_t startTime = NMTDCmd::get_start_time();
time_t endTime = time(0);
struct tm endTimeTm = {0};
- if (localtime_r(&endTime, &endTimeTm) == NULL) {
+ if (os::localtime_pd(&endTime, &endTimeTm) == NULL) {
out->print_cr("\nNative Memory Tracking:\n");
} else {
out->print_cr("\nNative Memory Tracking: end time is %d-%02d-%02d %02d:%02d:%02d, elapsed time is %d secs\n",
diff --git a/hotspot/src/share/vm/services/nmtDCmd.cpp b/hotspot/src/share/vm/services/nmtDCmd.cpp
index 417a58c59..5f6842a99 100644
--- a/hotspot/src/share/vm/services/nmtDCmd.cpp
+++ b/hotspot/src/share/vm/services/nmtDCmd.cpp
@@ -132,7 +132,7 @@ void NMTDCmd::execute(DCmdSource source, TRAPS) {
NMTDCmd::set_start_time(time(0));
time_t startTime = NMTDCmd::get_start_time();
struct tm startTimeTm = {0};
- if (localtime_r(&startTime, &startTimeTm) == NULL) {
+ if (os::localtime_pd(&startTime, &startTimeTm) == NULL) {
output()->print_cr("Baseline succeeded");
} else {
output()->print_cr("Baseline succeeded, start time is %d-%02d-%02d %02d:%02d:%02d",
--
2.19.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。