RFR (S) 8217315: Proper units should print more significant digits

Aleksey Shipilev shade at redhat.com
Thu Jan 17 15:05:15 UTC 2019


On 1/17/19 3:53 PM, Thomas Schatzl wrote:
> On Thu, 2019-01-17 at 15:37 +0100, Aleksey Shipilev wrote:
>> RFE:
>>   https://bugs.openjdk.java.net/browse/JDK-8217315
>>
>> Fix:
>>   http://cr.openjdk.java.net/~shade/8217315/webrev.01/
> 
>   looks good to me.

Thanks Thomas. I stared at the patch a bit and realized there is a test bug, which was hidden by
another existing test bug. Fixed here by:

diff -r f552d25a803f test/hotspot/gtest/utilities/test_globalDefinitions.cpp
--- a/test/hotspot/gtest/utilities/test_globalDefinitions.cpp   Thu Jan 17 16:02:30 2019 +0100
+++ b/test/hotspot/gtest/utilities/test_globalDefinitions.cpp   Thu Jan 17 16:02:50 2019 +0100
@@ -125,12 +125,12 @@
   EXPECT_STREQ("K", proper_unit_for_byte_size(50*M));

-#ifdef LP64
-  EXPECT_EQ(1024u,  byte_size_in_proper_unit(G - 1));
+#ifdef _LP64
+  EXPECT_EQ(1023u,  byte_size_in_proper_unit(G - 1));
   EXPECT_STREQ("M", proper_unit_for_byte_size(G - 1));

New webrev:
  http://cr.openjdk.java.net/~shade/8217315/webrev.02/

The fix for original test is here:
  https://bugs.openjdk.java.net/browse/JDK-8217321

Thanks,
-Aleksey



More information about the hotspot-dev mailing list