src/hotspot/share/gc/z/zNMethod.hpp
author pliden
Thu, 28 Mar 2019 19:43:59 +0100
changeset 54330 69e80a82db9a
parent 53921 a590b6107ab3
permissions -rw-r--r--
8221540: ZGC: Reduce width of zForwardingEntry::from_index field Reviewed-by: stefank, eosterlund
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53894
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     1
/*
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     2
 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     4
 *
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     7
 * published by the Free Software Foundation.
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     8
 *
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    13
 * accompanied this code).
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    14
 *
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    18
 *
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    21
 * questions.
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    22
 */
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    23
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    24
#ifndef SHARE_GC_Z_ZNMETHOD_HPP
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    25
#define SHARE_GC_Z_ZNMETHOD_HPP
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    26
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    27
#include "memory/allocation.hpp"
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    28
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    29
class nmethod;
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    30
class OopClosure;
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    31
class ZReentrantLock;
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    32
class ZWorkers;
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    33
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    34
class ZNMethod : public AllStatic {
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    35
private:
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    36
  static void attach_gc_data(nmethod* nm);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    37
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    38
  static void log_register(const nmethod* nm);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    39
  static void log_unregister(const nmethod* nm);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    40
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    41
public:
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    42
  static void register_nmethod(nmethod* nm);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    43
  static void unregister_nmethod(nmethod* nm);
53921
a590b6107ab3 8218974: Free GC native structures in nmethod::flush
eosterlund
parents: 53894
diff changeset
    44
  static void flush_nmethod(nmethod* nm);
53894
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    45
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    46
  static void disarm_nmethod(nmethod* nm);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    47
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    48
  static void nmethod_oops_do(nmethod* nm, OopClosure* cl);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    49
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    50
  static void oops_do_begin();
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    51
  static void oops_do_end();
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    52
  static void oops_do(OopClosure* cl);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    53
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    54
  static ZReentrantLock* lock_for_nmethod(nmethod* nm);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    55
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    56
  static void unlink(ZWorkers* workers, bool unloading_occurred);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    57
  static void purge(ZWorkers* workers);
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    58
};
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    59
bf1133e7dfba 8219469: ZGC: Extract functions out from ZNMethodTable into new ZNMethod class
stefank
parents:
diff changeset
    60
#endif // SHARE_GC_Z_ZNMETHOD_HPP