From ce580dad18b07514557ddf6793d9fcc952a0820e Mon Sep 17 00:00:00 2001 From: lxw Date: Mon, 5 Aug 2024 14:12:26 +0800 Subject: [PATCH] [GC] Fix data type in IOPrioritySizePolicy Summary: use SIZE_FORMAT to avoid build failure on windows Testing: jtreg Reviewers: maoliang.ml, yude.lyd Issue: https://github.com/dragonwell-project/dragonwell11/issues/855 --- src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp b/src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp index 3a0387fae11..5f76366c987 100644 --- a/src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp +++ b/src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp @@ -89,8 +89,8 @@ class IOPolicy : public CHeapObj { * cpu 417487649 75106 102895030 23107566512 152075 65480092 6013218 0 0 0 */ size_t user, nice, system, idle, iowait_time, irq, softirq, steal, guest, guest_nice; - int parse_line = sscanf(line, "cpu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu", &user, - &nice, &system, &idle, &iowait_time, &irq, &softirq, &steal, &guest, &guest_nice); + int parse_line = sscanf(line, "cpu " SIZE_FORMAT " " SIZE_FORMAT " " SIZE_FORMAT " " SIZE_FORMAT " " SIZE_FORMAT " " SIZE_FORMAT " " SIZE_FORMAT " " SIZE_FORMAT " " SIZE_FORMAT " " SIZE_FORMAT, + &user, &nice, &system, &idle, &iowait_time, &irq, &softirq, &steal, &guest, &guest_nice); if (parse_line != 10) { fill_value_fail(file); return;