< prev index next >

src/hotspot/share/gc/shared/referenceProcessor.hpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -23,10 +23,11 @@
  */
 
 #ifndef SHARE_VM_GC_SHARED_REFERENCEPROCESSOR_HPP
 #define SHARE_VM_GC_SHARED_REFERENCEPROCESSOR_HPP
 
+#include "gc/shared/referenceDiscoverer.hpp"
 #include "gc/shared/referencePolicy.hpp"
 #include "gc/shared/referenceProcessorPhaseTimes.hpp"
 #include "gc/shared/referenceProcessorStats.hpp"
 #include "memory/referenceType.hpp"
 #include "oops/instanceRefKlass.hpp"

@@ -164,11 +165,11 @@
     assert(_ref != _first_seen, "cyclic ref_list found");
     NOT_PRODUCT(_processed++);
   }
 };
 
-class ReferenceProcessor : public CHeapObj<mtGC> {
+class ReferenceProcessor : public ReferenceDiscoverer {
 
  private:
   size_t total_count(DiscoveredList lists[]) const;
 
  protected:

@@ -403,11 +404,11 @@
   // Balance each of the discovered lists.
   void balance_all_queues();
   void verify_list(DiscoveredList& ref_list);
 
   // Discover a Reference object, using appropriate discovery criteria
-  bool discover_reference(oop obj, ReferenceType rt);
+  virtual bool discover_reference(oop obj, ReferenceType rt);
 
   // Has discovered references that need handling
   bool has_discovered_references();
 
   // Process references found during GC (called by the garbage collector)
< prev index next >