From 81806b786e0ec9c29d2e3d64ef099f710724fba1 Mon Sep 17 00:00:00 2001 From: "t.ogata" Date: Mon, 28 Aug 2023 09:31:02 +0000 Subject: [PATCH] 8217850: CompressedClassSpaceSizeInJmapHeap fails after JDK-8217612 Backport-of: 49c91b7f9522a991bcac789b9fcccfee8bf08b5d --- .../share/classes/sun/jvm/hotspot/tools/HeapSummary.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java index 8ed5bc2d4b8..6a439716a83 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -293,6 +293,8 @@ private long getFlagValue(String name, Map flagMap) { if (f != null) { if (f.isBool()) { return f.getBool()? 1L : 0L; + } else if (f.isUIntx() || f.isSizet() || f.isUint64t()) { + return Long.parseUnsignedLong(f.getValue()); } else { return Long.parseLong(f.getValue()); }