src/hotspot/share/code/codeCache.hpp
changeset 52781 436097b038a1
parent 52661 4f45c682eab0
child 52870 a76b7884b59a
equal deleted inserted replaced
52780:be588be89f68 52781:436097b038a1
   178   // "unloading_occurred" controls whether metadata should be cleaned because of class unloading.
   178   // "unloading_occurred" controls whether metadata should be cleaned because of class unloading.
   179   class UnloadingScope: StackObj {
   179   class UnloadingScope: StackObj {
   180     ClosureIsUnloadingBehaviour _is_unloading_behaviour;
   180     ClosureIsUnloadingBehaviour _is_unloading_behaviour;
   181 
   181 
   182   public:
   182   public:
   183     UnloadingScope(BoolObjectClosure* is_alive)
   183     UnloadingScope(BoolObjectClosure* is_alive);
   184       : _is_unloading_behaviour(is_alive)
   184     ~UnloadingScope();
   185     {
       
   186       IsUnloadingBehaviour::set_current(&_is_unloading_behaviour);
       
   187       increment_unloading_cycle();
       
   188     }
       
   189 
       
   190     ~UnloadingScope() {
       
   191       IsUnloadingBehaviour::set_current(NULL);
       
   192     }
       
   193   };
   185   };
       
   186 
   194   static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);
   187   static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);
   195   static uint8_t unloading_cycle() { return _unloading_cycle; }
   188   static uint8_t unloading_cycle() { return _unloading_cycle; }
   196   static void increment_unloading_cycle();
   189   static void increment_unloading_cycle();
   197   static void asserted_non_scavengable_nmethods_do(CodeBlobClosure* f = NULL) PRODUCT_RETURN;
   190   static void asserted_non_scavengable_nmethods_do(CodeBlobClosure* f = NULL) PRODUCT_RETURN;
   198   static void release_exception_cache(ExceptionCache* entry);
   191   static void release_exception_cache(ExceptionCache* entry);