[8u-dev] Request for approval for CR 8069124: runtime/NMT/MallocSiteHashOverflow.java failing in nightlies

Kevin Walls kevin.walls at oracle.com
Mon Jun 25 14:07:50 UTC 2018


Hi,

I'd like to request approval to backport from 9 to 8u:

8069124: runtime/NMT/MallocSiteHashOverflow.java failing in nightlies
JBS: https://bugs.openjdk.java.net/browse/JDK-8069124

9 changeset:
URL:   http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/e0c6eb5fce97
http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/e0c6eb5fce97

9 review thread:
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2015-March/014113.html


This is a "clean backport, or imports with minimal/trivial changes".
Specifically, this is a clean import except for 
src/share/vm/services/mallocSiteTable.cpp where the change of "int 
index" to "unsigned int index" failed to happen automatically: on a 
neighbouring line, the jdk9 change also removes an assert,  which we 
don't have here in 8u.  The rejected 9 change and proposed 8u change are 
pasted in below (will webrev if not clear...?).

The bug title is a test failure, but this is wanted in 8u as it cleans 
up the types and avoids a compile error on later Windows
compilers, i.e.:
...hotspot\src\share\vm\utilities\nativeCallStack.cpp(78): warning 
C4311: 'type cast': pointer truncation from 'const address' to 'long'
...hotspot\src\share\vm\utilities\nativeCallStack.cpp(78): warning 
C4302: 'type cast': truncation from 'const address' to 'long'


Many thanks!
Kevin


9 change rejected for 8u:

bash-4.2$ cat src/share/vm/services/mallocSiteTable.cpp.rej
--- mallocSiteTable.cpp
+++ mallocSiteTable.cpp
@@ -135,8 +135,7 @@
   */
  MallocSite* MallocSiteTable::lookup_or_add(const NativeCallStack& key, 
size_t* bucket_idx,
    size_t* pos_idx) {
-  int index = hash_to_index(key.hash());
-  assert(index >= 0, err_msg("Negative index %d", index));
+  unsigned int index = hash_to_index(key.hash());
    *bucket_idx = (size_t)index;
    *pos_idx = 0;


8u change:

bash-4.2$ hg diff src/share/vm/services/mallocSiteTable.cpp
diff -r 0fa4c2b668b9 src/share/vm/services/mallocSiteTable.cpp
--- a/src/share/vm/services/mallocSiteTable.cpp Fri Jun 22 01:55:23 2018 
-0700
+++ b/src/share/vm/services/mallocSiteTable.cpp Mon Jun 25 06:54:46 2018 
-0700
@@ -136,7 +136,7 @@
  MallocSite* MallocSiteTable::lookup_or_add(const NativeCallStack& key, 
size_t* bucket_idx,
    size_t* pos_idx, MEMFLAGS flags) {
    assert(flags != mtNone, "Should have a real memory type");
-  int index = hash_to_index(key.hash());
+  unsigned int index = hash_to_index(key.hash());
    assert(index >= 0, "Negative index");
    *bucket_idx = (size_t)index;
    *pos_idx = 0;
bash-4.2$



More information about the jdk8u-dev mailing list