< prev index next >

src/share/vm/oops/klass.hpp

Print this page
rev 12851 : 8138737: Remove oop_ms_adjust_pointers and use oop_iterate instead
Reviewed-by:
rev 12852 : [mq]: 8138737-remove-oop-ms-adjust-kbarrett-rev1
   1 /*
   2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 590   jlong last_biased_lock_bulk_revocation_time() { return _last_biased_lock_bulk_revocation_time; }
 591   void  set_last_biased_lock_bulk_revocation_time(jlong cur_time) { _last_biased_lock_bulk_revocation_time = cur_time; }
 592 
 593   TRACE_DEFINE_TRACE_ID_METHODS;
 594 
 595   // garbage collection support
 596   void oops_do(OopClosure* cl);
 597 
 598   // Iff the class loader (or mirror for anonymous classes) is alive the
 599   // Klass is considered alive.
 600   // The is_alive closure passed in depends on the Garbage Collector used.
 601   bool is_loader_alive(BoolObjectClosure* is_alive);
 602 
 603   static void clean_weak_klass_links(BoolObjectClosure* is_alive, bool clean_alive_klasses = true);
 604   static void clean_subklass_tree(BoolObjectClosure* is_alive) {
 605     clean_weak_klass_links(is_alive, false /* clean_alive_klasses */);
 606   }
 607 
 608   // GC specific object visitors
 609   //
 610   // Mark Sweep
 611   virtual int  oop_ms_adjust_pointers(oop obj) = 0;
 612 #if INCLUDE_ALL_GCS
 613   // Parallel Scavenge
 614   virtual void oop_ps_push_contents(  oop obj, PSPromotionManager* pm)   = 0;
 615   // Parallel Compact
 616   virtual void oop_pc_follow_contents(oop obj, ParCompactionManager* cm) = 0;
 617   virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0;
 618 #endif
 619 
 620   // Iterators specialized to particular subtypes
 621   // of ExtendedOopClosure, to avoid closure virtual calls.
 622 #define Klass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)                                           \
 623   virtual void oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) = 0;                        \
 624   /* Iterates "closure" over all the oops in "obj" (of type "this") within "mr". */                     \
 625   virtual void oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr) = 0;
 626 
 627   ALL_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_DECL)
 628   ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL)
 629 
 630 #if INCLUDE_ALL_GCS
 631 #define Klass_OOP_OOP_ITERATE_DECL_BACKWARDS(OopClosureType, nv_suffix)                     \


   1 /*
   2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 590   jlong last_biased_lock_bulk_revocation_time() { return _last_biased_lock_bulk_revocation_time; }
 591   void  set_last_biased_lock_bulk_revocation_time(jlong cur_time) { _last_biased_lock_bulk_revocation_time = cur_time; }
 592 
 593   TRACE_DEFINE_TRACE_ID_METHODS;
 594 
 595   // garbage collection support
 596   void oops_do(OopClosure* cl);
 597 
 598   // Iff the class loader (or mirror for anonymous classes) is alive the
 599   // Klass is considered alive.
 600   // The is_alive closure passed in depends on the Garbage Collector used.
 601   bool is_loader_alive(BoolObjectClosure* is_alive);
 602 
 603   static void clean_weak_klass_links(BoolObjectClosure* is_alive, bool clean_alive_klasses = true);
 604   static void clean_subklass_tree(BoolObjectClosure* is_alive) {
 605     clean_weak_klass_links(is_alive, false /* clean_alive_klasses */);
 606   }
 607 
 608   // GC specific object visitors
 609   //


 610 #if INCLUDE_ALL_GCS
 611   // Parallel Scavenge
 612   virtual void oop_ps_push_contents(  oop obj, PSPromotionManager* pm)   = 0;
 613   // Parallel Compact
 614   virtual void oop_pc_follow_contents(oop obj, ParCompactionManager* cm) = 0;
 615   virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0;
 616 #endif
 617 
 618   // Iterators specialized to particular subtypes
 619   // of ExtendedOopClosure, to avoid closure virtual calls.
 620 #define Klass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)                                           \
 621   virtual void oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) = 0;                        \
 622   /* Iterates "closure" over all the oops in "obj" (of type "this") within "mr". */                     \
 623   virtual void oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr) = 0;
 624 
 625   ALL_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_DECL)
 626   ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL)
 627 
 628 #if INCLUDE_ALL_GCS
 629 #define Klass_OOP_OOP_ITERATE_DECL_BACKWARDS(OopClosureType, nv_suffix)                     \


< prev index next >