changeset 7392:ec2c6fdd1ce6

8062870: src/share/vm/services/mallocTracker.hpp:64 assert(_count > 0) failed: Negative counter Summary: Signed bitfield size y can only have (1 << y)-1 values. Reviewed-by: shade, dholmes, jrose, ctornqvi, gtriantafill
author coleenp
date Fri, 14 Nov 2014 17:39:38 -0500
parents 84e11eeec136
children b2399f0d9611 327e7269f90d
files src/share/vm/services/mallocTracker.hpp test/runtime/NMT/MallocSiteHashOverflow.java
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/mallocTracker.hpp	Fri Nov 14 07:51:50 2014 -0800
+++ b/src/share/vm/services/mallocTracker.hpp	Fri Nov 14 17:39:38 2014 -0500
@@ -243,15 +243,15 @@
   size_t           _flags     : 8;
   size_t           _pos_idx   : 16;
   size_t           _bucket_idx: 40;
-#define MAX_MALLOCSITE_TABLE_SIZE ((size_t)1 << 40)
-#define MAX_BUCKET_LENGTH         ((size_t)(1 << 16))
+#define MAX_MALLOCSITE_TABLE_SIZE right_n_bits(40)
+#define MAX_BUCKET_LENGTH         right_n_bits(16)
 #else
   size_t           _size      : 32;
   size_t           _flags     : 8;
   size_t           _pos_idx   : 8;
   size_t           _bucket_idx: 16;
-#define MAX_MALLOCSITE_TABLE_SIZE  ((size_t)(1 << 16))
-#define MAX_BUCKET_LENGTH          ((size_t)(1 << 8))
+#define MAX_MALLOCSITE_TABLE_SIZE  right_n_bits(16)
+#define MAX_BUCKET_LENGTH          right_n_bits(8)
 #endif  // _LP64
 
  public:
--- a/test/runtime/NMT/MallocSiteHashOverflow.java	Fri Nov 14 07:51:50 2014 -0800
+++ b/test/runtime/NMT/MallocSiteHashOverflow.java	Fri Nov 14 17:39:38 2014 -0500
@@ -27,7 +27,6 @@
  * @requires sun.arch.data.model == "32"
  * @key nmt jcmd stress
  * @library /testlibrary /testlibrary/whitebox
- * @ignore 8062870
  * @build MallocSiteHashOverflow
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocSiteHashOverflow