src/hotspot/share/gc/g1/g1BarrierSetRuntime.hpp
author eosterlund
Mon, 04 Jun 2018 12:59:51 +0200
changeset 50375 bfbe7d8369bb
permissions -rw-r--r--
8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime Reviewed-by: rkennke, tschatzl
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50375
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     1
/*
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     2
 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     4
 *
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     7
 * published by the Free Software Foundation.
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     8
 *
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    13
 * accompanied this code).
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    14
 *
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    18
 *
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    21
 * questions.
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    22
 *
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    23
 */
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    24
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    25
#ifndef SHARE_GC_G1_G1BARRIERSETRUNTIME_HPP
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    26
#define SHARE_GC_G1_G1BARRIERSETRUNTIME_HPP
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    27
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    28
#include "memory/allocation.hpp"
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    29
#include "oops/oopsHierarchy.hpp"
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    30
#include "utilities/globalDefinitions.hpp"
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    31
#include "utilities/macros.hpp"
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    32
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    33
class oopDesc;
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    34
class JavaThread;
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    35
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    36
class G1BarrierSetRuntime: public AllStatic {
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    37
public:
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    38
  // Arraycopy stub generator
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    39
  static void write_ref_array_pre_oop_entry(oop* dst, size_t length);
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    40
  static void write_ref_array_pre_narrow_oop_entry(narrowOop* dst, size_t length);
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    41
  static void write_ref_array_post_entry(HeapWord* dst, size_t length);
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    42
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    43
  // C2 slow-path runtime calls.
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    44
  static void write_ref_field_pre_entry(oopDesc* orig, JavaThread *thread);
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    45
  static void write_ref_field_post_entry(void* card_addr, JavaThread* thread);
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    46
};
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    47
bfbe7d8369bb 8202547: Move G1 runtime calls used by generated code to G1BarrierSetRuntime
eosterlund
parents:
diff changeset
    48
#endif // SHARE_GC_G1_G1BARRIERSETRUNTIME_HPP