changeset 49130:950c35ea6237

8165929: Constify arguments of Copy methods Reviewed-by: hseigel, kbarrett
author coleenp
date Fri, 09 Feb 2018 08:23:42 -0500
parents f323537c9b75
children e999964446d7
files src/hotspot/cpu/ppc/copy_ppc.hpp src/hotspot/cpu/s390/copy_s390.hpp src/hotspot/cpu/sparc/copy_sparc.hpp src/hotspot/cpu/zero/copy_zero.hpp src/hotspot/os_cpu/bsd_x86/copy_bsd_x86.inline.hpp src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp src/hotspot/os_cpu/linux_arm/copy_linux_arm.inline.hpp src/hotspot/os_cpu/linux_x86/copy_linux_x86.inline.hpp src/hotspot/os_cpu/solaris_x86/copy_solaris_x86.inline.hpp src/hotspot/os_cpu/windows_x86/copy_windows_x86.inline.hpp src/hotspot/share/utilities/copy.cpp src/hotspot/share/utilities/copy.hpp
diffstat 12 files changed, 271 insertions(+), 273 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/ppc/copy_ppc.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/cpu/ppc/copy_ppc.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,11 +32,11 @@
 
 // Inline functions for memory copy and fill.
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   (void)memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   switch (count) {
   case 8:  to[7] = from[7];
   case 7:  to[6] = from[6];
@@ -52,7 +52,7 @@
   }
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
   switch (count) {
   case 8:  to[7] = from[7];
   case 7:  to[6] = from[6];
@@ -70,25 +70,25 @@
   }
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   (void)memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
   (void)memmove(to, from, count);
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   (void)memmove(to, from, count);
 }
 
 // Template for atomic, element-wise copy.
 template <class T>
-static void copy_conjoint_atomic(T* from, T* to, size_t count) {
+static void copy_conjoint_atomic(const T* from, T* to, size_t count) {
   if (from > to) {
     while (count-- > 0) {
       // Copy forwards
@@ -104,44 +104,44 @@
   }
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   // TODO: contribute optimized version.
   copy_conjoint_atomic<jshort>(from, to, count);
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
   // TODO: contribute optimized version.
   copy_conjoint_atomic<jint>(from, to, count);
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
   copy_conjoint_atomic<jlong>(from, to, count);
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
   copy_conjoint_atomic<oop>(from, to, count);
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
   pd_conjoint_bytes_atomic(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
   // TODO: contribute optimized version.
-  pd_conjoint_jshorts_atomic((jshort*)from, (jshort*)to, count);
+  pd_conjoint_jshorts_atomic((const jshort*)from, (jshort*)to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
   // TODO: contribute optimized version.
-  pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+  pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 }
 
 static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) {
--- a/src/hotspot/cpu/s390/copy_s390.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/cpu/s390/copy_s390.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -73,7 +73,7 @@
 
 #undef USE_INLINE_ASM
 
-static void copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void copy_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   if (from > to) {
     while (count-- > 0) {
       // Copy forwards
@@ -89,7 +89,7 @@
   }
 }
 
-static void copy_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void copy_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
   if (from > to) {
     while (count-- > 0) {
       // Copy forwards
@@ -105,7 +105,7 @@
   }
 }
 
-static bool has_destructive_overlap(char* from, char* to, size_t byte_count) {
+static bool has_destructive_overlap(const char* from, char* to, size_t byte_count) {
   return (from < to) && ((to-from) < (ptrdiff_t)byte_count);
 }
 
@@ -662,7 +662,7 @@
 //   D I S J O I N T   C O P Y I N G   //
 //*************************************//
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   // JVM2008: very frequent, some tests frequent.
 
   // Copy HeapWord (=DW) aligned storage. Use MVCLE in inline-asm code.
@@ -756,7 +756,7 @@
 //   C O N J O I N T   C O P Y I N G   //
 //*************************************//
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   // JVM2008: between some and lower end of frequent.
 
 #ifdef USE_INLINE_ASM
@@ -836,13 +836,13 @@
 #endif
 }
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 
   // Just delegate. HeapWords are optimally aligned anyway.
   pd_aligned_conjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
 
 #ifdef USE_INLINE_ASM
   size_t count_in = count;
@@ -866,16 +866,16 @@
 //   C O N J O I N T  A T O M I C   C O P Y I N G   //
 //**************************************************//
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   // Call arraycopy stubs to do the job.
   pd_conjoint_bytes(from, to, count); // bytes are always accessed atomically.
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
 
 #ifdef USE_INLINE_ASM
   size_t count_in = count;
-  if (has_destructive_overlap((char*)from, (char*)to, count_in*BytesPerShort)) {
+  if (has_destructive_overlap((const char*)from, (char*)to, count_in*BytesPerShort)) {
     // Use optimizations from shared code where no z-specific optimization exists.
     copy_conjoint_jshorts_atomic(from, to, count);
   } else {
@@ -890,11 +890,11 @@
 #endif
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
 
 #ifdef USE_INLINE_ASM
   size_t count_in = count;
-  if (has_destructive_overlap((char*)from, (char*)to, count_in*BytesPerInt)) {
+  if (has_destructive_overlap((const char*)from, (char*)to, count_in*BytesPerInt)) {
     switch (count_in) {
       case 4: COPY4_ATOMIC_4(to,from)
               return;
@@ -922,7 +922,7 @@
 #endif
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
 
 #ifdef USE_INLINE_ASM
   size_t count_in = count;
@@ -970,11 +970,11 @@
     }
   }
   else
-    pd_aligned_disjoint_words((HeapWord*)from, (HeapWord*)to, count_in); // rare calls -> just delegate.
+    pd_aligned_disjoint_words((const HeapWord*)from, (HeapWord*)to, count_in); // rare calls -> just delegate.
 #endif
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
 
 #ifdef USE_INLINE_ASM
   size_t count_in = count;
@@ -1011,24 +1011,24 @@
 #endif
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
   pd_conjoint_bytes_atomic(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jshorts_atomic((jshort*)from, (jshort*)to, count);
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jshorts_atomic((const jshort*)from, (jshort*)to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 }
 
 //**********************************************//
--- a/src/hotspot/cpu/sparc/copy_sparc.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/cpu/sparc/copy_sparc.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
 
 // Inline functions for memory copy and fill.
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   (void)memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   switch (count) {
   case 8:  to[7] = from[7];
   case 7:  to[6] = from[6];
@@ -47,7 +47,7 @@
   }
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
   switch (count) {
   case 8:  to[7] = from[7];
   case 7:  to[6] = from[6];
@@ -65,23 +65,23 @@
   }
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   (void)memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
   (void)memmove(to, from, count);
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   (void)memmove(to, from, count);
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   if (from > to) {
     while (count-- > 0) {
       // Copy forwards
@@ -97,7 +97,7 @@
   }
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
   if (from > to) {
     while (count-- > 0) {
       // Copy forwards
@@ -113,12 +113,12 @@
   }
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
   // Do better than this: inline memmove body  NEEDS CLEANUP
   if (from > to) {
     while (count-- > 0) {
@@ -135,24 +135,24 @@
   }
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
   pd_conjoint_bytes_atomic(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jshorts_atomic((jshort*)from, (jshort*)to, count);
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jshorts_atomic((const jshort*)from, (jshort*)to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 }
 
 static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) {
--- a/src/hotspot/cpu/zero/copy_zero.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/cpu/zero/copy_zero.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,11 +28,11 @@
 
 // Inline functions for memory copy and fill.
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   switch (count) {
   case 8:  to[7] = from[7];
   case 7:  to[6] = from[6];
@@ -49,7 +49,7 @@
   }
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from,
+static void pd_disjoint_words_atomic(const HeapWord* from,
                                      HeapWord* to,
                                      size_t count) {
   switch (count) {
@@ -70,73 +70,73 @@
   }
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from,
+static void pd_aligned_conjoint_words(const HeapWord* from,
                                       HeapWord* to,
                                       size_t count) {
   memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from,
+static void pd_aligned_disjoint_words(const HeapWord* from,
                                       HeapWord* to,
                                       size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
   memmove(to, from, count);
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   memmove(to, from, count);
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   _Copy_conjoint_jshorts_atomic(from, to, count);
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
   _Copy_conjoint_jints_atomic(from, to, count);
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
   _Copy_conjoint_jlongs_atomic(from, to, count);
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
 #ifdef _LP64
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
-  _Copy_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+  _Copy_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 #else
   assert(BytesPerInt == BytesPerOop, "jints and oops must be the same size");
-  _Copy_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+  _Copy_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 #endif // _LP64
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from,
+static void pd_arrayof_conjoint_bytes(const HeapWord* from,
                                       HeapWord* to,
                                       size_t    count) {
   _Copy_arrayof_conjoint_bytes(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from,
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from,
                                         HeapWord* to,
                                         size_t    count) {
   _Copy_arrayof_conjoint_jshorts(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from,
+static void pd_arrayof_conjoint_jints(const HeapWord* from,
                                       HeapWord* to,
                                       size_t    count) {
   _Copy_arrayof_conjoint_jints(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from,
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from,
                                        HeapWord* to,
                                        size_t    count) {
   _Copy_arrayof_conjoint_jlongs(from, to, count);
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from,
+static void pd_arrayof_conjoint_oops(const HeapWord* from,
                                      HeapWord* to,
                                      size_t    count) {
 #ifdef _LP64
--- a/src/hotspot/os_cpu/bsd_x86/copy_bsd_x86.inline.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/os_cpu/bsd_x86/copy_bsd_x86.inline.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #ifndef OS_CPU_BSD_X86_VM_COPY_BSD_X86_INLINE_HPP
 #define OS_CPU_BSD_X86_VM_COPY_BSD_X86_INLINE_HPP
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   (void)memmove(to, from, count * HeapWordSize);
 #else
@@ -70,7 +70,7 @@
 #endif // AMD64
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   switch (count) {
   case 8:  to[7] = from[7];
@@ -108,7 +108,7 @@
 #endif // AMD64
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   switch (count) {
   case 8:  to[7] = from[7];
@@ -132,15 +132,15 @@
 #endif // AMD64
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_conjoint_words(from, to, count);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
 #ifdef AMD64
   (void)memmove(to, from, count);
 #else
@@ -219,25 +219,25 @@
 #endif // AMD64
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   pd_conjoint_bytes(from, to, count);
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   _Copy_conjoint_jshorts_atomic(from, to, count);
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
 #ifdef AMD64
   _Copy_conjoint_jints_atomic(from, to, count);
 #else
   assert(HeapWordSize == BytesPerInt, "heapwords and jints must be the same size");
   // pd_conjoint_words is word-atomic in this implementation.
-  pd_conjoint_words((HeapWord*)from, (HeapWord*)to, count);
+  pd_conjoint_words((const HeapWord*)from, (HeapWord*)to, count);
 #endif // AMD64
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
 #ifdef AMD64
   _Copy_conjoint_jlongs_atomic(from, to, count);
 #else
@@ -262,47 +262,47 @@
 #endif // AMD64
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
 #ifdef AMD64
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
-  _Copy_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+  _Copy_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 #else
   assert(HeapWordSize == BytesPerOop, "heapwords and oops must be the same size");
   // pd_conjoint_words is word-atomic in this implementation.
-  pd_conjoint_words((HeapWord*)from, (HeapWord*)to, count);
+  pd_conjoint_words((const HeapWord*)from, (HeapWord*)to, count);
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_bytes(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_jshorts(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
    _Copy_arrayof_conjoint_jints(from, to, count);
 #else
-  pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+  pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   _Copy_arrayof_conjoint_jlongs(from, to, count);
 #else
-  pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+  pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
   _Copy_arrayof_conjoint_jlongs(from, to, count);
 #else
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 #endif // AMD64
 }
 
--- a/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -99,7 +99,7 @@
   : "memory", "cc");                                                    \
 }
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   __asm volatile( "prfm pldl1strm, [%[s], #0];" :: [s]"r"(from) : "memory");
   if (__builtin_expect(count <= 8, 1)) {
     COPY_SMALL(from, to, count);
@@ -108,7 +108,7 @@
   _Copy_conjoint_words(from, to, count);
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   if (__builtin_constant_p(count)) {
     memcpy(to, from, count * sizeof(HeapWord));
     return;
@@ -121,7 +121,7 @@
   _Copy_disjoint_words(from, to, count);
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
   __asm volatile( "prfm pldl1strm, [%[s], #0];" :: [s]"r"(from) : "memory");
   if (__builtin_expect(count <= 8, 1)) {
     COPY_SMALL(from, to, count);
@@ -130,56 +130,56 @@
   _Copy_disjoint_words(from, to, count);
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_conjoint_words(from, to, count);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
   (void)memmove(to, from, count);
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   pd_conjoint_bytes(from, to, count);
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   _Copy_conjoint_jshorts_atomic(from, to, count);
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
   _Copy_conjoint_jints_atomic(from, to, count);
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
   _Copy_conjoint_jlongs_atomic(from, to, count);
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
-  _Copy_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+  _Copy_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_bytes(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_jshorts(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
    _Copy_arrayof_conjoint_jints(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_jlongs(from, to, count);
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
   assert(!UseCompressedOops, "foo!");
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
   _Copy_arrayof_conjoint_jlongs(from, to, count);
--- a/src/hotspot/os_cpu/linux_arm/copy_linux_arm.inline.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/os_cpu/linux_arm/copy_linux_arm.inline.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #ifndef OS_CPU_LINUX_ARM_VM_COPY_LINUX_ARM_INLINE_HPP
 #define OS_CPU_LINUX_ARM_VM_COPY_LINUX_ARM_INLINE_HPP
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AARCH64
   _Copy_conjoint_words(from, to, count * HeapWordSize);
 #else
@@ -34,7 +34,7 @@
 #endif
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AARCH64
   _Copy_disjoint_words(from, to, count * HeapWordSize);
 #else
@@ -42,27 +42,27 @@
 #endif // AARCH64
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_conjoint_words(from, to, count);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
   memmove(to, from, count);
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   pd_conjoint_bytes(from, to, count);
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
 #ifdef AARCH64
   _Copy_conjoint_jshorts_atomic(from, to, count * BytesPerShort);
 #else
@@ -70,58 +70,58 @@
 #endif
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
 #ifdef AARCH64
   _Copy_conjoint_jints_atomic(from, to, count * BytesPerInt);
 #else
   assert(HeapWordSize == BytesPerInt, "heapwords and jints must be the same size");
   // pd_conjoint_words is word-atomic in this implementation.
-  pd_conjoint_words((HeapWord*)from, (HeapWord*)to, count);
+  pd_conjoint_words((const HeapWord*)from, (HeapWord*)to, count);
 #endif
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
 #ifdef AARCH64
   assert(HeapWordSize == BytesPerLong, "64-bit architecture");
-  pd_conjoint_words((HeapWord*)from, (HeapWord*)to, count);
+  pd_conjoint_words((const HeapWord*)from, (HeapWord*)to, count);
 #else
   _Copy_conjoint_jlongs_atomic(to, from, count * BytesPerLong);
 #endif
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
 #ifdef AARCH64
   if (UseCompressedOops) {
     assert(BytesPerHeapOop == BytesPerInt, "compressed oops");
-    pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+    pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
   } else {
     assert(BytesPerHeapOop == BytesPerLong, "64-bit architecture");
-    pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+    pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
   }
 #else
   assert(BytesPerHeapOop == BytesPerInt, "32-bit architecture");
-  pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+  pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 #endif
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_bytes_atomic((void*)from, (void*)to, count);
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_bytes_atomic((const void*)from, (void*)to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jshorts_atomic((jshort*)from, (jshort*)to, count);
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jshorts_atomic((const jshort*)from, (jshort*)to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 }
 
 #endif // OS_CPU_LINUX_ARM_VM_COPY_LINUX_ARM_INLINE_HPP
--- a/src/hotspot/os_cpu/linux_x86/copy_linux_x86.inline.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/os_cpu/linux_x86/copy_linux_x86.inline.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #ifndef OS_CPU_LINUX_X86_VM_COPY_LINUX_X86_INLINE_HPP
 #define OS_CPU_LINUX_X86_VM_COPY_LINUX_X86_INLINE_HPP
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   (void)memmove(to, from, count * HeapWordSize);
 #else
@@ -70,7 +70,7 @@
 #endif // AMD64
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   switch (count) {
   case 8:  to[7] = from[7];
@@ -108,7 +108,7 @@
 #endif // AMD64
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   switch (count) {
   case 8:  to[7] = from[7];
@@ -132,15 +132,15 @@
 #endif // AMD64
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_conjoint_words(from, to, count);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
 #ifdef AMD64
   (void)memmove(to, from, count);
 #else
@@ -219,25 +219,25 @@
 #endif // AMD64
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   pd_conjoint_bytes(from, to, count);
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   _Copy_conjoint_jshorts_atomic(from, to, count);
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
 #ifdef AMD64
   _Copy_conjoint_jints_atomic(from, to, count);
 #else
   assert(HeapWordSize == BytesPerInt, "heapwords and jints must be the same size");
   // pd_conjoint_words is word-atomic in this implementation.
-  pd_conjoint_words((HeapWord*)from, (HeapWord*)to, count);
+  pd_conjoint_words((const HeapWord*)from, (HeapWord*)to, count);
 #endif // AMD64
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
 #ifdef AMD64
   _Copy_conjoint_jlongs_atomic(from, to, count);
 #else
@@ -262,47 +262,47 @@
 #endif // AMD64
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
 #ifdef AMD64
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
-  _Copy_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+  _Copy_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 #else
   assert(HeapWordSize == BytesPerOop, "heapwords and oops must be the same size");
   // pd_conjoint_words is word-atomic in this implementation.
-  pd_conjoint_words((HeapWord*)from, (HeapWord*)to, count);
+  pd_conjoint_words((const HeapWord*)from, (HeapWord*)to, count);
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_bytes(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_jshorts(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
    _Copy_arrayof_conjoint_jints(from, to, count);
 #else
-  pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+  pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   _Copy_arrayof_conjoint_jlongs(from, to, count);
 #else
-  pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+  pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
   _Copy_arrayof_conjoint_jlongs(from, to, count);
 #else
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 #endif // AMD64
 }
 
--- a/src/hotspot/os_cpu/solaris_x86/copy_solaris_x86.inline.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/os_cpu/solaris_x86/copy_solaris_x86.inline.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
 #ifndef OS_CPU_SOLARIS_X86_VM_COPY_SOLARIS_X86_INLINE_HPP
 #define OS_CPU_SOLARIS_X86_VM_COPY_SOLARIS_X86_INLINE_HPP
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   (void)memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 #ifndef AMD64
   (void)memcpy(to, from, count * HeapWordSize);
 #else
@@ -50,7 +50,7 @@
 #endif // AMD64
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
   switch (count) {
   case 8:  to[7] = from[7];
   case 7:  to[6] = from[6];
@@ -68,15 +68,15 @@
   }
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   (void)memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
 #ifdef AMD64
   (void)memmove(to, from, count);
 #else
@@ -84,53 +84,53 @@
 #endif // AMD64
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   pd_conjoint_bytes(from, to, count);
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   _Copy_conjoint_jshorts_atomic(from, to, count);
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
   _Copy_conjoint_jints_atomic(from, to, count);
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
   // Guarantee use of fild/fistp or xmm regs via some asm code, because compilers won't.
   _Copy_conjoint_jlongs_atomic(from, to, count);
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
 #ifdef AMD64
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
-  _Copy_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+  _Copy_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 #else
-  _Copy_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+  _Copy_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_bytes(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_jshorts(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
   _Copy_arrayof_conjoint_jints(from, to, count);
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   _Copy_arrayof_conjoint_jlongs(from, to, count);
 #else
-  pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+  pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
   _Copy_arrayof_conjoint_jlongs(from, to, count);
--- a/src/hotspot/os_cpu/windows_x86/copy_windows_x86.inline.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/os_cpu/windows_x86/copy_windows_x86.inline.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
 #ifndef OS_CPU_WINDOWS_X86_VM_COPY_WINDOWS_X86_INLINE_HPP
 #define OS_CPU_WINDOWS_X86_VM_COPY_WINDOWS_X86_INLINE_HPP
 
-static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   (void)memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   switch (count) {
   case 8:  to[7] = from[7];
@@ -50,7 +50,7 @@
 #endif // AMD64
 }
 
-static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
   switch (count) {
   case 8:  to[7] = from[7];
   case 7:  to[6] = from[6];
@@ -68,23 +68,23 @@
   }
 }
 
-static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   (void)memmove(to, from, count * HeapWordSize);
 }
 
-static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
   pd_disjoint_words(from, to, count);
 }
 
-static void pd_conjoint_bytes(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes(const void* from, void* to, size_t count) {
   (void)memmove(to, from, count);
 }
 
-static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) {
+static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) {
   pd_conjoint_bytes(from, to, count);
 }
 
-static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
   if (from > to) {
     while (count-- > 0) {
       // Copy forwards
@@ -100,7 +100,7 @@
   }
 }
 
-static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
   if (from > to) {
     while (count-- > 0) {
       // Copy forwards
@@ -116,10 +116,10 @@
   }
 }
 
-static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
 #ifdef AMD64
   assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size");
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 #else
   // Guarantee use of fild/fistp or xmm regs via some asm code, because compilers won't.
   __asm {
@@ -149,7 +149,7 @@
 #endif // AMD64
 }
 
-static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
   // Do better than this: inline memmove body  NEEDS CLEANUP
   if (from > to) {
     while (count-- > 0) {
@@ -166,7 +166,7 @@
   }
 }
 
-static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) {
+static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef AMD64
   pd_conjoint_bytes_atomic(from, to, count);
 #else
@@ -174,20 +174,20 @@
 #endif // AMD64
 }
 
-static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jshorts_atomic((jshort*)from, (jshort*)to, count);
+static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jshorts_atomic((const jshort*)from, (jshort*)to, count);
 }
 
-static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
 }
 
-static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count);
+static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count);
 }
 
-static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
-  pd_conjoint_oops_atomic((oop*)from, (oop*)to, count);
+static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
+  pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count);
 }
 
 #endif // OS_CPU_WINDOWS_X86_VM_COPY_WINDOWS_X86_INLINE_HPP
--- a/src/hotspot/share/utilities/copy.cpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/share/utilities/copy.cpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,10 +29,8 @@
 
 
 // Copy bytes; larger units are filled atomically if everything is aligned.
-void Copy::conjoint_memory_atomic(void* from, void* to, size_t size) {
-  address src = (address) from;
-  address dst = (address) to;
-  uintptr_t bits = (uintptr_t) src | (uintptr_t) dst | (uintptr_t) size;
+void Copy::conjoint_memory_atomic(const void* from, void* to, size_t size) {
+  uintptr_t bits = (uintptr_t) from | (uintptr_t) to | (uintptr_t) size;
 
   // (Note:  We could improve performance by ignoring the low bits of size,
   // and putting a short cleanup loop after each bulk copy loop.
@@ -43,14 +41,14 @@
   // which may or may not want to include such optimizations.)
 
   if (bits % sizeof(jlong) == 0) {
-    Copy::conjoint_jlongs_atomic((jlong*) src, (jlong*) dst, size / sizeof(jlong));
+    Copy::conjoint_jlongs_atomic((const jlong*) from, (jlong*) to, size / sizeof(jlong));
   } else if (bits % sizeof(jint) == 0) {
-    Copy::conjoint_jints_atomic((jint*) src, (jint*) dst, size / sizeof(jint));
+    Copy::conjoint_jints_atomic((const jint*) from, (jint*) to, size / sizeof(jint));
   } else if (bits % sizeof(jshort) == 0) {
-    Copy::conjoint_jshorts_atomic((jshort*) src, (jshort*) dst, size / sizeof(jshort));
+    Copy::conjoint_jshorts_atomic((const jshort*) from, (jshort*) to, size / sizeof(jshort));
   } else {
     // Not aligned, so no need to be atomic.
-    Copy::conjoint_jbytes((void*) src, (void*) dst, size);
+    Copy::conjoint_jbytes((const void*) from, (void*) to, size);
   }
 }
 
--- a/src/hotspot/share/utilities/copy.hpp	Fri Feb 09 13:09:55 2018 +0100
+++ b/src/hotspot/share/utilities/copy.hpp	Fri Feb 09 08:23:42 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,28 +31,28 @@
 
 // Assembly code for platforms that need it.
 extern "C" {
-  void _Copy_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
-  void _Copy_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_conjoint_words(const HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_disjoint_words(const HeapWord* from, HeapWord* to, size_t count);
 
-  void _Copy_conjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
-  void _Copy_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_conjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count);
 
-  void _Copy_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
-  void _Copy_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count);
 
-  void _Copy_conjoint_bytes(void* from, void* to, size_t count);
+  void _Copy_conjoint_bytes(const void* from, void* to, size_t count);
 
-  void _Copy_conjoint_bytes_atomic  (void*   from, void*   to, size_t count);
-  void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count);
-  void _Copy_conjoint_jints_atomic  (jint*   from, jint*   to, size_t count);
-  void _Copy_conjoint_jlongs_atomic (jlong*  from, jlong*  to, size_t count);
-  void _Copy_conjoint_oops_atomic   (oop*    from, oop*    to, size_t count);
+  void _Copy_conjoint_bytes_atomic  (const void*   from, void*   to, size_t count);
+  void _Copy_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count);
+  void _Copy_conjoint_jints_atomic  (const jint*   from, jint*   to, size_t count);
+  void _Copy_conjoint_jlongs_atomic (const jlong*  from, jlong*  to, size_t count);
+  void _Copy_conjoint_oops_atomic   (const oop*    from, oop*    to, size_t count);
 
-  void _Copy_arrayof_conjoint_bytes  (HeapWord* from, HeapWord* to, size_t count);
-  void _Copy_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count);
-  void _Copy_arrayof_conjoint_jints  (HeapWord* from, HeapWord* to, size_t count);
-  void _Copy_arrayof_conjoint_jlongs (HeapWord* from, HeapWord* to, size_t count);
-  void _Copy_arrayof_conjoint_oops   (HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_arrayof_conjoint_bytes  (const HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_arrayof_conjoint_jints  (const HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_arrayof_conjoint_jlongs (const HeapWord* from, HeapWord* to, size_t count);
+  void _Copy_arrayof_conjoint_oops   (const HeapWord* from, HeapWord* to, size_t count);
 }
 
 class Copy : AllStatic {
@@ -87,33 +87,33 @@
   // HeapWords
 
   // Word-aligned words,    conjoint, not atomic on each word
-  static void conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+  static void conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogHeapWordSize);
     pd_conjoint_words(from, to, count);
   }
 
   // Word-aligned words,    disjoint, not atomic on each word
-  static void disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+  static void disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogHeapWordSize);
     assert_disjoint(from, to, count);
     pd_disjoint_words(from, to, count);
   }
 
   // Word-aligned words,    disjoint, atomic on each word
-  static void disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) {
+  static void disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogHeapWordSize);
     assert_disjoint(from, to, count);
     pd_disjoint_words_atomic(from, to, count);
   }
 
   // Object-aligned words,  conjoint, not atomic on each word
-  static void aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+  static void aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_aligned(from, to);
     pd_aligned_conjoint_words(from, to, count);
   }
 
   // Object-aligned words,  disjoint, not atomic on each word
-  static void aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) {
+  static void aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_aligned(from, to);
     assert_disjoint(from, to, count);
     pd_aligned_disjoint_words(from, to, count);
@@ -122,77 +122,77 @@
   // bytes, jshorts, jints, jlongs, oops
 
   // bytes,                 conjoint, not atomic on each byte (not that it matters)
-  static void conjoint_jbytes(void* from, void* to, size_t count) {
+  static void conjoint_jbytes(const void* from, void* to, size_t count) {
     pd_conjoint_bytes(from, to, count);
   }
 
   // bytes,                 conjoint, atomic on each byte (not that it matters)
-  static void conjoint_jbytes_atomic(void* from, void* to, size_t count) {
+  static void conjoint_jbytes_atomic(const void* from, void* to, size_t count) {
     pd_conjoint_bytes(from, to, count);
   }
 
   // jshorts,               conjoint, atomic on each jshort
-  static void conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
+  static void conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerShort);
     pd_conjoint_jshorts_atomic(from, to, count);
   }
 
   // jints,                 conjoint, atomic on each jint
-  static void conjoint_jints_atomic(jint* from, jint* to, size_t count) {
+  static void conjoint_jints_atomic(const jint* from, jint* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerInt);
     pd_conjoint_jints_atomic(from, to, count);
   }
 
   // jlongs,                conjoint, atomic on each jlong
-  static void conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) {
+  static void conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerLong);
     pd_conjoint_jlongs_atomic(from, to, count);
   }
 
   // oops,                  conjoint, atomic on each oop
-  static void conjoint_oops_atomic(oop* from, oop* to, size_t count) {
+  static void conjoint_oops_atomic(const oop* from, oop* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerHeapOop);
     pd_conjoint_oops_atomic(from, to, count);
   }
 
   // overloaded for UseCompressedOops
-  static void conjoint_oops_atomic(narrowOop* from, narrowOop* to, size_t count) {
+  static void conjoint_oops_atomic(const narrowOop* from, narrowOop* to, size_t count) {
     assert(sizeof(narrowOop) == sizeof(jint), "this cast is wrong");
     assert_params_ok(from, to, LogBytesPerInt);
-    pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
+    pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count);
   }
 
   // Copy a span of memory.  If the span is an integral number of aligned
   // longs, words, or ints, copy those units atomically.
   // The largest atomic transfer unit is 8 bytes, or the largest power
   // of two which divides all of from, to, and size, whichever is smaller.
-  static void conjoint_memory_atomic(void* from, void* to, size_t size);
+  static void conjoint_memory_atomic(const void* from, void* to, size_t size);
 
   // bytes,                 conjoint array, atomic on each byte (not that it matters)
-  static void arrayof_conjoint_jbytes(HeapWord* from, HeapWord* to, size_t count) {
+  static void arrayof_conjoint_jbytes(const HeapWord* from, HeapWord* to, size_t count) {
     pd_arrayof_conjoint_bytes(from, to, count);
   }
 
   // jshorts,               conjoint array, atomic on each jshort
-  static void arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) {
+  static void arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerShort);
     pd_arrayof_conjoint_jshorts(from, to, count);
   }
 
   // jints,                 conjoint array, atomic on each jint
-  static void arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) {
+  static void arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerInt);
     pd_arrayof_conjoint_jints(from, to, count);
   }
 
   // jlongs,                conjoint array, atomic on each jlong
-  static void arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) {
+  static void arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerLong);
     pd_arrayof_conjoint_jlongs(from, to, count);
   }
 
   // oops,                  conjoint array, atomic on each oop
-  static void arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
+  static void arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) {
     assert_params_ok(from, to, LogBytesPerHeapOop);
     pd_arrayof_conjoint_oops(from, to, count);
   }
@@ -200,7 +200,7 @@
   // Known overlap methods
 
   // Copy word-aligned words from higher to lower addresses, not atomic on each word
-  inline static void conjoint_words_to_lower(HeapWord* from, HeapWord* to, size_t byte_count) {
+  inline static void conjoint_words_to_lower(const HeapWord* from, HeapWord* to, size_t byte_count) {
     // byte_count is in bytes to check its alignment
     assert_params_ok(from, to, LogHeapWordSize);
     assert_byte_count_ok(byte_count, HeapWordSize);
@@ -214,7 +214,7 @@
   }
 
   // Copy word-aligned words from lower to higher addresses, not atomic on each word
-  inline static void conjoint_words_to_higher(HeapWord* from, HeapWord* to, size_t byte_count) {
+  inline static void conjoint_words_to_higher(const HeapWord* from, HeapWord* to, size_t byte_count) {
     // byte_count is in bytes to check its alignment
     assert_params_ok(from, to, LogHeapWordSize);
     assert_byte_count_ok(byte_count, HeapWordSize);
@@ -305,7 +305,7 @@
   }
 
  private:
-  static bool params_disjoint(HeapWord* from, HeapWord* to, size_t count) {
+  static bool params_disjoint(const HeapWord* from, HeapWord* to, size_t count) {
     if (from < to) {
       return pointer_delta(to, from) >= count;
     }
@@ -314,14 +314,14 @@
 
   // These methods raise a fatal if they detect a problem.
 
-  static void assert_disjoint(HeapWord* from, HeapWord* to, size_t count) {
+  static void assert_disjoint(const HeapWord* from, HeapWord* to, size_t count) {
 #ifdef ASSERT
     if (!params_disjoint(from, to, count))
       basic_fatal("source and dest overlap");
 #endif
   }
 
-  static void assert_params_ok(void* from, void* to, intptr_t log_align) {
+  static void assert_params_ok(const void* from, void* to, intptr_t log_align) {
 #ifdef ASSERT
     if (mask_bits((uintptr_t)from, right_n_bits(log_align)) != 0)
       basic_fatal("not aligned");
@@ -336,7 +336,7 @@
       basic_fatal("not word aligned");
 #endif
   }
-  static void assert_params_aligned(HeapWord* from, HeapWord* to) {
+  static void assert_params_aligned(const HeapWord* from, HeapWord* to) {
 #ifdef ASSERT
     if (mask_bits((uintptr_t)from, BytesPerLong-1) != 0)
       basic_fatal("not long aligned");