hotspot/src/share/vm/gc/parallel/parMarkBitMap.hpp
changeset 35877 a2a62511d0f8
parent 33105 294e48b4f704
child 38177 b0c9cb06506b
--- a/hotspot/src/share/vm/gc/parallel/parMarkBitMap.hpp	Thu Jan 28 10:18:45 2016 +0100
+++ b/hotspot/src/share/vm/gc/parallel/parMarkBitMap.hpp	Thu Jan 28 13:30:12 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, 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,6 +31,7 @@
 
 class ParMarkBitMapClosure;
 class PSVirtualSpace;
+class ParCompactionManager;
 
 class ParMarkBitMap: public CHeapObj<mtGC>
 {
@@ -124,7 +125,7 @@
   // the range are included in the result. The end of the range must be a live object,
   // which is the case when updating pointers.  This allows a branch to be removed
   // from inside the loop.
-  size_t live_words_in_range(HeapWord* beg_addr, oop end_obj) const;
+  size_t live_words_in_range(ParCompactionManager* cm, HeapWord* beg_addr, oop end_obj) const;
 
   inline HeapWord* region_start() const;
   inline HeapWord* region_end() const;
@@ -167,6 +168,12 @@
 #endif  // #ifdef ASSERT
 
 private:
+  size_t live_words_in_range_helper(HeapWord* beg_addr, oop end_obj) const;
+
+  bool is_live_words_in_range_in_cache(ParCompactionManager* cm, HeapWord* beg_addr) const;
+  size_t live_words_in_range_use_cache(ParCompactionManager* cm, HeapWord* beg_addr, oop end_obj) const;
+  void update_live_words_in_range_cache(ParCompactionManager* cm, HeapWord* beg_addr, oop end_obj, size_t result) const;
+
   // Each bit in the bitmap represents one unit of 'object granularity.' Objects
   // are double-word aligned in 32-bit VMs, but not in 64-bit VMs, so the 32-bit
   // granularity is 2, 64-bit is 1.