8201800: Add support for adjusting heap addresses in a TLAB
authorpliden
Thu, 19 Apr 2018 07:54:50 +0200
changeset 49829 19b137cb2d42
parent 49828 ee3555b4a130
child 49830 ac761df837c7
child 56455 3b8a1a702cdc
8201800: Add support for adjusting heap addresses in a TLAB Reviewed-by: shade, stefank
src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp
--- a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp	Thu Apr 19 07:54:50 2018 +0200
+++ b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp	Thu Apr 19 07:54:50 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -164,6 +164,13 @@
 
   static size_t refill_waste_limit_increment()   { return TLABWasteIncrement; }
 
+  template <typename T> void addresses_do(T f) {
+    f(&_start);
+    f(&_top);
+    f(&_pf_top);
+    f(&_end);
+  }
+
   // Code generation support
   static ByteSize start_offset()                 { return byte_offset_of(ThreadLocalAllocBuffer, _start); }
   static ByteSize end_offset()                   { return byte_offset_of(ThreadLocalAllocBuffer, _end  ); }