8079797: assert(index >= 0 && index < _count) failed: check
authorrbackman
Mon, 11 May 2015 09:44:07 +0200
changeset 30628 3c15b4a3bf4d
parent 30627 d79f16a39a8c
child 30629 b6e5ad2f18d5
8079797: assert(index >= 0 && index < _count) failed: check Reviewed-by: kvn
hotspot/src/share/vm/code/codeCache.cpp
hotspot/src/share/vm/code/nmethod.cpp
hotspot/src/share/vm/compiler/oopMap.hpp
--- a/hotspot/src/share/vm/code/codeCache.cpp	Mon May 11 07:58:02 2015 +0200
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Mon May 11 09:44:07 2015 +0200
@@ -1374,7 +1374,7 @@
           ImmutableOopMapSet* set = cb->oop_maps();
           if (set != NULL) {
             number_of_oop_maps += set->count();
-            map_size           += set->size();
+            map_size           += set->nr_of_bytes();
           }
         }
       }
--- a/hotspot/src/share/vm/code/nmethod.cpp	Mon May 11 07:58:02 2015 +0200
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Mon May 11 09:44:07 2015 +0200
@@ -2989,7 +2989,7 @@
   address base = code_begin();
   ImmutableOopMapSet* oms = oop_maps();
   if (oms != NULL) {
-    for (int i = 0, imax = oms->size(); i < imax; i++) {
+    for (int i = 0, imax = oms->count(); i < imax; i++) {
       const ImmutableOopMapPair* pair = oms->pair_at(i);
       const ImmutableOopMap* om = pair->get_from(oms);
       address pc = base + pair->pc_offset();
--- a/hotspot/src/share/vm/compiler/oopMap.hpp	Mon May 11 07:58:02 2015 +0200
+++ b/hotspot/src/share/vm/compiler/oopMap.hpp	Mon May 11 09:44:07 2015 +0200
@@ -324,7 +324,7 @@
   const ImmutableOopMapPair* pair_at(int index) const { assert(index >= 0 && index < _count, "check"); return &get_pairs()[index]; }
 
   int count() const { return _count; }
-  int size() const { return _size; }
+  int nr_of_bytes() const { return _size; }
 
   void print_on(outputStream* st) const;
   void print() const { print_on(tty); }