< prev index next >

src/hotspot/share/ci/ciMethodData.cpp

     // data (concurrent deoptimizations before we acquired
     // extra_data_lock above) or can be removed (a safepoint may occur
     // in the prepare_metadata call above) as we translate the copy:
     // update the copy as we go.
     int tag = dp_src->tag();
-    if (tag != DataLayout::arg_info_data_tag) {
-      memcpy(dp_dst, dp_src, ((intptr_t)MethodData::next_extra(dp_src)) - ((intptr_t)dp_src));
+    size_t entry_size = DataLayout::header_size_in_bytes();
+    if (tag != DataLayout::no_tag) {
+      ProfileData* src_data = dp_src->data_in();
+      entry_size = src_data->size_in_bytes();
     }
+    memcpy(dp_dst, dp_src, entry_size);
 
     switch(tag) {
     case DataLayout::speculative_trap_data_tag: {
       ciSpeculativeTrapData data_dst(dp_dst);
       SpeculativeTrapData   data_src(dp_src);
    
< prev index next >