< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp

Print this page
rev 58162 : 8239926: Shenandoah: Shenandoah needs to mark nmethod's metadata
   1 /*
   2  * Copyright (c) 2017, 2019, Red Hat, Inc. 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  *


  94 };
  95 
  96 class ShenandoahCodeRoots : public AllStatic {
  97   friend class ShenandoahHeap;
  98   friend class ShenandoahCodeRootsIterator;
  99 
 100 public:
 101   static void initialize();
 102   static void register_nmethod(nmethod* nm);
 103   static void unregister_nmethod(nmethod* nm);
 104   static void flush_nmethod(nmethod* nm);
 105 
 106   static ShenandoahNMethodTable* table() {
 107     return _nmethod_table;
 108   }
 109 
 110   // Concurrent nmethod unloading support
 111   static void unlink(WorkGang* workers, bool unloading_occurred);
 112   static void purge(WorkGang* workers);
 113   static void arm_nmethods();

 114   static int  disarmed_value()         { return _disarmed_value; }
 115   static int* disarmed_value_address() { return &_disarmed_value; }
 116 
 117 private:
 118   static ShenandoahNMethodTable* _nmethod_table;
 119   static int                     _disarmed_value;
 120 };
 121 
 122 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHCODEROOTS_HPP
   1 /*
   2  * Copyright (c) 2017, 2020, Red Hat, Inc. 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  *


  94 };
  95 
  96 class ShenandoahCodeRoots : public AllStatic {
  97   friend class ShenandoahHeap;
  98   friend class ShenandoahCodeRootsIterator;
  99 
 100 public:
 101   static void initialize();
 102   static void register_nmethod(nmethod* nm);
 103   static void unregister_nmethod(nmethod* nm);
 104   static void flush_nmethod(nmethod* nm);
 105 
 106   static ShenandoahNMethodTable* table() {
 107     return _nmethod_table;
 108   }
 109 
 110   // Concurrent nmethod unloading support
 111   static void unlink(WorkGang* workers, bool unloading_occurred);
 112   static void purge(WorkGang* workers);
 113   static void arm_nmethods();
 114   static void disarm_nmethods();
 115   static int  disarmed_value()         { return _disarmed_value; }
 116   static int* disarmed_value_address() { return &_disarmed_value; }
 117 
 118 private:
 119   static ShenandoahNMethodTable* _nmethod_table;
 120   static int                     _disarmed_value;
 121 };
 122 
 123 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHCODEROOTS_HPP
< prev index next >