src/share/vm/c1/c1_MacroAssembler.hpp

Tue, 18 Jun 2013 12:31:07 -0700

author
johnc
date
Tue, 18 Jun 2013 12:31:07 -0700
changeset 5277
01522ca68fc7
parent 4318
cd3d6a6b95d9
child 6723
0bf37f737702
permissions
-rw-r--r--

8015237: Parallelize string table scanning during strong root processing
Summary: Parallelize the scanning of the intern string table by having each GC worker claim a given number of buckets. Changes were also reviewed by Per Liden <per.liden@oracle.com>.
Reviewed-by: tschatzl, stefank, twisti

duke@435 1 /*
coleenp@4037 2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #ifndef SHARE_VM_C1_C1_MACROASSEMBLER_HPP
stefank@2314 26 #define SHARE_VM_C1_C1_MACROASSEMBLER_HPP
stefank@2314 27
twisti@4318 28 #include "asm/macroAssembler.hpp"
twisti@4318 29 #include "asm/macroAssembler.inline.hpp"
stefank@2314 30
duke@435 31 class CodeEmitInfo;
duke@435 32
duke@435 33 class C1_MacroAssembler: public MacroAssembler {
duke@435 34 public:
duke@435 35 // creation
duke@435 36 C1_MacroAssembler(CodeBuffer* code) : MacroAssembler(code) { pd_init(); }
duke@435 37
duke@435 38 //----------------------------------------------------
duke@435 39 void explicit_null_check(Register base);
duke@435 40
duke@435 41 void inline_cache_check(Register receiver, Register iCache);
duke@435 42 void build_frame(int frame_size_in_bytes);
twisti@1730 43 void remove_frame(int frame_size_in_bytes);
duke@435 44
duke@435 45 void unverified_entry(Register receiver, Register ic_klass);
duke@435 46 void verified_entry();
duke@435 47 void verify_stack_oop(int offset) PRODUCT_RETURN;
duke@435 48 void verify_not_null_oop(Register r) PRODUCT_RETURN;
duke@435 49
stefank@2314 50 #ifdef TARGET_ARCH_x86
stefank@2314 51 # include "c1_MacroAssembler_x86.hpp"
stefank@2314 52 #endif
stefank@2314 53 #ifdef TARGET_ARCH_sparc
stefank@2314 54 # include "c1_MacroAssembler_sparc.hpp"
stefank@2314 55 #endif
bobv@2508 56 #ifdef TARGET_ARCH_arm
bobv@2508 57 # include "c1_MacroAssembler_arm.hpp"
bobv@2508 58 #endif
bobv@2508 59 #ifdef TARGET_ARCH_ppc
bobv@2508 60 # include "c1_MacroAssembler_ppc.hpp"
bobv@2508 61 #endif
stefank@2314 62
duke@435 63 };
duke@435 64
duke@435 65
duke@435 66
duke@435 67 // A StubAssembler is a MacroAssembler w/ extra functionality for runtime
duke@435 68 // stubs. Currently it 'knows' some stub info. Eventually, the information
duke@435 69 // may be set automatically or can be asserted when using specialised
duke@435 70 // StubAssembler functions.
duke@435 71
duke@435 72 class StubAssembler: public C1_MacroAssembler {
duke@435 73 private:
duke@435 74 const char* _name;
duke@435 75 bool _must_gc_arguments;
duke@435 76 int _frame_size;
duke@435 77 int _num_rt_args;
duke@435 78 int _stub_id;
duke@435 79
duke@435 80 public:
duke@435 81 // creation
duke@435 82 StubAssembler(CodeBuffer* code, const char * name, int stub_id);
duke@435 83 void set_info(const char* name, bool must_gc_arguments);
duke@435 84
duke@435 85 void set_frame_size(int size);
duke@435 86 void set_num_rt_args(int args);
duke@435 87
duke@435 88 // accessors
duke@435 89 const char* name() const { return _name; }
duke@435 90 bool must_gc_arguments() const { return _must_gc_arguments; }
duke@435 91 int frame_size() const { return _frame_size; }
duke@435 92 int num_rt_args() const { return _num_rt_args; }
duke@435 93 int stub_id() const { return _stub_id; }
duke@435 94
duke@435 95 // runtime calls (return offset of call to be used by GC map)
coleenp@4037 96 int call_RT(Register oop_result1, Register metadata_result, address entry, int args_size = 0);
coleenp@4037 97 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1);
coleenp@4037 98 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2);
coleenp@4037 99 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3);
duke@435 100 };
stefank@2314 101
stefank@2314 102 #endif // SHARE_VM_C1_C1_MACROASSEMBLER_HPP

mercurial