--- a/hotspot/src/share/vm/code/codeBlob.cpp Fri Apr 24 10:49:38 2015 +0200
+++ b/hotspot/src/share/vm/code/codeBlob.cpp Tue May 05 16:50:25 2015 +0200
@@ -129,9 +129,7 @@
// Danger Will Robinson! This method allocates a big
// chunk of memory, its your job to free it.
if (p != NULL) {
- // We need to allocate a chunk big enough to hold the OopMapSet and all of its OopMaps
- _oop_maps = (OopMapSet* )NEW_C_HEAP_ARRAY(unsigned char, p->heap_size(), mtCode);
- p->copy_to((address)_oop_maps);
+ _oop_maps = ImmutableOopMapSet::build_from(p);
} else {
_oop_maps = NULL;
}
@@ -175,7 +173,7 @@
}
-OopMap* CodeBlob::oop_map_for_return_address(address return_address) {
+const ImmutableOopMap* CodeBlob::oop_map_for_return_address(address return_address) {
assert(oop_maps() != NULL, "nope");
return oop_maps()->find_map_at_offset((intptr_t) return_address - (intptr_t) code_begin());
}