Mercurial > hg > truffle
annotate src/share/vm/jvmci/jvmciRuntime.hpp @ 21791:cd36556e1b78
Remove conditional makefile-based compilation of jvmci from mx_graal.py
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Mon, 08 Jun 2015 14:25:25 +0200 |
parents | 7a7cf422160b |
children | 431b127fc0d1 |
rev | line source |
---|---|
5526
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
87e4aed94b26
Remove HotSpotCompiler interface, let HotSpotCompilerImpl implement GraalRuntime (in preparation of renaming).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
24 #ifndef SHARE_VM_JVMCI_JVMCI_RUNTIME_HPP |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
25 #define SHARE_VM_JVMCI_JVMCI_RUNTIME_HPP |
5747
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5526
diff
changeset
|
26 |
7125
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
6559
diff
changeset
|
27 #include "interpreter/interpreter.hpp" |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
6559
diff
changeset
|
28 #include "memory/allocation.hpp" |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
6559
diff
changeset
|
29 #include "runtime/deoptimization.hpp" |
21562 | 30 #include "jvmci/jvmciOptions.hpp" |
7125
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
6559
diff
changeset
|
31 |
21515
1ab7802d35c9
Factor GraalRuntime::parse_lines out of GraalRuntime::get_service_impls
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
19920
diff
changeset
|
32 class ParseClosure : public StackObj { |
21516
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
33 int _lineNo; |
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
34 char* _filename; |
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
35 bool _abort; |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
36 protected: |
21516
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
37 void abort() { _abort = true; } |
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
38 void warn_and_abort(const char* message) { |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
39 warn(message); |
21516
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
40 abort(); |
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
41 } |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
42 void warn(const char* message) { |
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
43 warning("Error at line %d while parsing %s: %s", _lineNo, _filename == NULL ? "?" : _filename, message); |
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
44 } |
21515
1ab7802d35c9
Factor GraalRuntime::parse_lines out of GraalRuntime::get_service_impls
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
19920
diff
changeset
|
45 public: |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
46 ParseClosure() : _lineNo(0), _filename(NULL), _abort(false) {} |
21516
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
47 void parse_line(char* line) { |
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
48 _lineNo++; |
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
49 do_line(line); |
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
50 } |
21515
1ab7802d35c9
Factor GraalRuntime::parse_lines out of GraalRuntime::get_service_impls
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
19920
diff
changeset
|
51 virtual void do_line(char* line) = 0; |
21516
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
52 int lineNo() { return _lineNo; } |
fe4a77bec5b7
Use GraalRuntime::parse_lines in GraalRuntime::parse_graal_options_file
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21515
diff
changeset
|
53 bool is_aborted() { return _abort; } |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
54 void set_filename(char* path) {_filename = path; _lineNo = 0;} |
21515
1ab7802d35c9
Factor GraalRuntime::parse_lines out of GraalRuntime::get_service_impls
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
19920
diff
changeset
|
55 }; |
7125
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
6559
diff
changeset
|
56 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
57 class JVMCIRuntime: public CHeapObj<mtCompiler> { |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
58 private: |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
59 static jobject _HotSpotJVMCIRuntime_instance; |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
60 static bool _HotSpotJVMCIRuntime_initialized; |
15870
fe608a56e3f7
made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents:
15603
diff
changeset
|
61 |
18303
ab47ef2f2207
disable blocking compilation requests once GraalRuntime::shutdown has been called
Doug Simon <doug.simon@oracle.com>
parents:
18227
diff
changeset
|
62 static bool _shutdown_called; |
ab47ef2f2207
disable blocking compilation requests once GraalRuntime::shutdown has been called
Doug Simon <doug.simon@oracle.com>
parents:
18227
diff
changeset
|
63 |
15870
fe608a56e3f7
made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents:
15603
diff
changeset
|
64 /** |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
65 * Loads default option value overrides from a <jre_home>/lib/jvmci.options if it exists. Each |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
66 * line in this file must have the format of a JVMCI command line option without the |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
67 * leading "-G:" prefix. These option values are set prior to processing of any JVMCI |
15870
fe608a56e3f7
made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents:
15603
diff
changeset
|
68 * options present on the command line. |
fe608a56e3f7
made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents:
15603
diff
changeset
|
69 */ |
21562 | 70 static void parse_jvmci_options_file(OptionsValueTable* options); |
16870
11b22ccafccd
Correctly parse string option values that start with + or -.
Roland Schatz <roland.schatz@oracle.com>
parents:
16683
diff
changeset
|
71 |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
72 static void print_flags_helper(TRAPS); |
21563
4f63449b4422
revived post option parsing handler notification
Doug Simon <doug.simon@oracle.com>
parents:
21562
diff
changeset
|
73 |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
74 /** |
15941
b35b1dc75ec0
added comments to explain the origin of generated sources
Doug Simon <doug.simon@oracle.com>
parents:
15916
diff
changeset
|
75 * Instantiates a service object, calls its default constructor and returns it. |
15916
6aa352b260f4
removed use of ServiceLoader in runtime initialization
Doug Simon <doug.simon@oracle.com>
parents:
15870
diff
changeset
|
76 * |
21604
93f282187d90
moved JVMCI service API into separate com.oracle.jvmci.service module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21564
diff
changeset
|
77 * @param name the name of a class implementing com.oracle.jvmci.service.Service |
15916
6aa352b260f4
removed use of ServiceLoader in runtime initialization
Doug Simon <doug.simon@oracle.com>
parents:
15870
diff
changeset
|
78 */ |
6aa352b260f4
removed use of ServiceLoader in runtime initialization
Doug Simon <doug.simon@oracle.com>
parents:
15870
diff
changeset
|
79 static Handle create_Service(const char* name, TRAPS); |
6aa352b260f4
removed use of ServiceLoader in runtime initialization
Doug Simon <doug.simon@oracle.com>
parents:
15870
diff
changeset
|
80 |
7125
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
6559
diff
changeset
|
81 public: |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
82 |
16628
d3fec84757ed
improved generated sources up-to-date check by using SHA1 digests
Doug Simon <doug.simon@oracle.com>
parents:
16623
diff
changeset
|
83 /** |
21562 | 84 * Parses the JVMCI specific VM options that were presented by the launcher and sets |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
85 * the relevants Java fields. |
16628
d3fec84757ed
improved generated sources up-to-date check by using SHA1 digests
Doug Simon <doug.simon@oracle.com>
parents:
16623
diff
changeset
|
86 */ |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
87 static OptionsValueTable* parse_arguments(); |
16628
d3fec84757ed
improved generated sources up-to-date check by using SHA1 digests
Doug Simon <doug.simon@oracle.com>
parents:
16623
diff
changeset
|
88 |
21523
4b3b38415adf
make GraalRuntime::parse_argument public to avoid needing the firend declaration
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21520
diff
changeset
|
89 static bool parse_argument(OptionsValueTable* options, const char* arg); |
4b3b38415adf
make GraalRuntime::parse_argument public to avoid needing the firend declaration
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21520
diff
changeset
|
90 |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
91 static void set_options(OptionsValueTable* options, TRAPS); |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
92 |
18614
c307546c7b0a
made initialization of the Graal class loader and well known Graal classes lazy
Doug Simon <doug.simon@oracle.com>
parents:
18303
diff
changeset
|
93 /** |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
94 * Ensures that the JVMCI class loader is initialized and the well known JVMCI classes are loaded. |
18614
c307546c7b0a
made initialization of the Graal class loader and well known Graal classes lazy
Doug Simon <doug.simon@oracle.com>
parents:
18303
diff
changeset
|
95 */ |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
96 static void ensure_jvmci_class_loader_is_initialized(); |
18614
c307546c7b0a
made initialization of the Graal class loader and well known Graal classes lazy
Doug Simon <doug.simon@oracle.com>
parents:
18303
diff
changeset
|
97 |
15603
b7fb36e57da8
made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents:
15589
diff
changeset
|
98 static void initialize_natives(JNIEnv *env, jclass c2vmClass); |
15916
6aa352b260f4
removed use of ServiceLoader in runtime initialization
Doug Simon <doug.simon@oracle.com>
parents:
15870
diff
changeset
|
99 |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
100 static bool is_HotSpotJVMCIRuntime_initialized() { return _HotSpotJVMCIRuntime_initialized; } |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
101 |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
102 /** |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
103 * Gets the singleton HotSpotJVMCIRuntime instance, initializing it if necessary |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
104 */ |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
105 static Handle get_HotSpotJVMCIRuntime() { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
106 initialize_JVMCI(); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
107 return Handle(JNIHandles::resolve_non_null(_HotSpotJVMCIRuntime_instance)); |
19920
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
108 } |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
109 |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
110 static jobject get_HotSpotJVMCIRuntime_jobject() { |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
111 initialize_JVMCI(); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
112 assert(_HotSpotJVMCIRuntime_initialized, "must be"); |
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
113 return _HotSpotJVMCIRuntime_instance; |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
114 } |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
115 |
19920
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
116 static Handle callInitializer(const char* className, const char* methodName, const char* returnType); |
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
117 |
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
118 /** |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
119 * Trigger initialization of HotSpotJVMCIRuntime through JVMCI.getRuntime() |
19920
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
120 */ |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
121 static void initialize_JVMCI(); |
19920
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
122 |
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
123 /** |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
124 * Explicitly initialize HotSpotJVMCIRuntime itself |
19920
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
125 */ |
21527
07b088d61d5d
added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21473
diff
changeset
|
126 static void initialize_HotSpotJVMCIRuntime(); |
19920
7366593c0610
Make the native initialization path for Graal more robust
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19009
diff
changeset
|
127 |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
128 static void shutdown(); |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
129 |
18303
ab47ef2f2207
disable blocking compilation requests once GraalRuntime::shutdown has been called
Doug Simon <doug.simon@oracle.com>
parents:
18227
diff
changeset
|
130 static bool shutdown_called() { |
ab47ef2f2207
disable blocking compilation requests once GraalRuntime::shutdown has been called
Doug Simon <doug.simon@oracle.com>
parents:
18227
diff
changeset
|
131 return _shutdown_called; |
ab47ef2f2207
disable blocking compilation requests once GraalRuntime::shutdown has been called
Doug Simon <doug.simon@oracle.com>
parents:
18227
diff
changeset
|
132 } |
ab47ef2f2207
disable blocking compilation requests once GraalRuntime::shutdown has been called
Doug Simon <doug.simon@oracle.com>
parents:
18227
diff
changeset
|
133 |
15941
b35b1dc75ec0
added comments to explain the origin of generated sources
Doug Simon <doug.simon@oracle.com>
parents:
15916
diff
changeset
|
134 /** |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
135 * Given an interface representing a JVMCI service (i.e. sub-interface of |
21604
93f282187d90
moved JVMCI service API into separate com.oracle.jvmci.service module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21564
diff
changeset
|
136 * com.oracle.jvmci.api.service.Service), gets an array of objects, one per |
15941
b35b1dc75ec0
added comments to explain the origin of generated sources
Doug Simon <doug.simon@oracle.com>
parents:
15916
diff
changeset
|
137 * known implementation of the service. |
b35b1dc75ec0
added comments to explain the origin of generated sources
Doug Simon <doug.simon@oracle.com>
parents:
15916
diff
changeset
|
138 */ |
21563
4f63449b4422
revived post option parsing handler notification
Doug Simon <doug.simon@oracle.com>
parents:
21562
diff
changeset
|
139 static objArrayHandle get_service_impls(KlassHandle serviceKlass, TRAPS); |
15916
6aa352b260f4
removed use of ServiceLoader in runtime initialization
Doug Simon <doug.simon@oracle.com>
parents:
15870
diff
changeset
|
140 |
21519
cecb4e39521c
Use files in lib/graal/options to define Graal options (-G:...) instead of generating code for them
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21516
diff
changeset
|
141 static void parse_lines(char* path, ParseClosure* closure, bool warnStatFailure); |
21515
1ab7802d35c9
Factor GraalRuntime::parse_lines out of GraalRuntime::get_service_impls
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
19920
diff
changeset
|
142 |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
143 /** |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
144 * Aborts the VM due to an unexpected exception. |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
145 */ |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
146 static void abort_on_pending_exception(Handle exception, const char* message, bool dump_core = false); |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
147 |
16273
d6ffc6164830
handle any exception raised during Graal option checking/parsing, not just those with a non-null message
Doug Simon <doug.simon@oracle.com>
parents:
16270
diff
changeset
|
148 /** |
d6ffc6164830
handle any exception raised during Graal option checking/parsing, not just those with a non-null message
Doug Simon <doug.simon@oracle.com>
parents:
16270
diff
changeset
|
149 * Calls Throwable.printStackTrace() on a given exception. |
d6ffc6164830
handle any exception raised during Graal option checking/parsing, not just those with a non-null message
Doug Simon <doug.simon@oracle.com>
parents:
16270
diff
changeset
|
150 */ |
d6ffc6164830
handle any exception raised during Graal option checking/parsing, not just those with a non-null message
Doug Simon <doug.simon@oracle.com>
parents:
16270
diff
changeset
|
151 static void call_printStackTrace(Handle exception, Thread* thread); |
d6ffc6164830
handle any exception raised during Graal option checking/parsing, not just those with a non-null message
Doug Simon <doug.simon@oracle.com>
parents:
16270
diff
changeset
|
152 |
16428
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
153 #define CHECK_ABORT THREAD); \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
154 if (HAS_PENDING_EXCEPTION) { \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
155 char buf[256]; \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
156 jio_snprintf(buf, 256, "Uncaught exception at %s:%d", __FILE__, __LINE__); \ |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
157 JVMCIRuntime::abort_on_pending_exception(PENDING_EXCEPTION, buf); \ |
16428
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
158 return; \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
159 } \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
160 (void)(0 |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
161 |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
162 #define CHECK_ABORT_(result) THREAD); \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
163 if (HAS_PENDING_EXCEPTION) { \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
164 char buf[256]; \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
165 jio_snprintf(buf, 256, "Uncaught exception at %s:%d", __FILE__, __LINE__); \ |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
166 JVMCIRuntime::abort_on_pending_exception(PENDING_EXCEPTION, buf); \ |
16428
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
167 return result; \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
168 } \ |
78ddecd6255f
added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
Doug Simon <doug.simon@oracle.com>
parents:
16395
diff
changeset
|
169 (void)(0 |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
170 |
16395
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
171 /** |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
172 * Same as SystemDictionary::resolve_or_null but uses the JVMCI loader. |
16395
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
173 */ |
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
174 static Klass* resolve_or_null(Symbol* name, TRAPS); |
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
175 |
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
176 /** |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
177 * Same as SystemDictionary::resolve_or_fail but uses the JVMCI loader. |
16395
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
178 */ |
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
179 static Klass* resolve_or_fail(Symbol* name, TRAPS); |
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
180 |
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
181 /** |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
182 * Loads a given JVMCI class and aborts the VM if it fails. |
16395
ad431bf0de07
added support to load classes from graal.jar with a separate class loader
Doug Simon <doug.simon@oracle.com>
parents:
16273
diff
changeset
|
183 */ |
16006
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
184 static Klass* load_required_class(Symbol* name); |
66a9286203a2
decoupled Graal runtime initialization and Graal compilation queue initialization
Doug Simon <doug.simon@oracle.com>
parents:
15941
diff
changeset
|
185 |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
186 static BufferBlob* initialize_buffer_blob(); |
15870
fe608a56e3f7
made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents:
15603
diff
changeset
|
187 |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
188 static BasicType kindToBasicType(jchar ch); |
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
189 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
190 // The following routines are all called from compiled JVMCI code |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
191 |
9352
d4684b468e93
made NewInstanceStub a RuntimeStub that directly calls the C runtime (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9338
diff
changeset
|
192 static void new_instance(JavaThread* thread, Klass* klass); |
9338
0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9232
diff
changeset
|
193 static void new_array(JavaThread* thread, Klass* klass, jint length); |
9355
4e260c2ced0e
removed new_multi_array assembler stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9354
diff
changeset
|
194 static void new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims); |
12423
370b5f07f9e2
The runtime entries need to use oopDesc* rather than oop in their signature
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10953
diff
changeset
|
195 static void dynamic_new_array(JavaThread* thread, oopDesc* element_mirror, jint length); |
13578
d8143c431d63
Add DynamicNewInstanceNode and use it to intrinsify Unsafe.allocateInstance
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12435
diff
changeset
|
196 static void dynamic_new_instance(JavaThread* thread, oopDesc* type_mirror); |
12423
370b5f07f9e2
The runtime entries need to use oopDesc* rather than oop in their signature
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10953
diff
changeset
|
197 static jboolean thread_is_interrupted(JavaThread* thread, oopDesc* obj, jboolean clear_interrupted); |
9471
5fa54bf57f8c
replaced exception_handler_nofpu assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9463
diff
changeset
|
198 static void vm_message(jboolean vmError, jlong format, jlong v1, jlong v2, jlong v3); |
12423
370b5f07f9e2
The runtime entries need to use oopDesc* rather than oop in their signature
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10953
diff
changeset
|
199 static jint identity_hash_code(JavaThread* thread, oopDesc* obj); |
9471
5fa54bf57f8c
replaced exception_handler_nofpu assembler stub with a compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9463
diff
changeset
|
200 static address exception_handler_for_pc(JavaThread* thread); |
9590
5f9c41cd3b1e
replaced monitorenter/monitorexit assembler stubs with compiled stubs (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9581
diff
changeset
|
201 static void monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock); |
5f9c41cd3b1e
replaced monitorenter/monitorexit assembler stubs with compiled stubs (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9581
diff
changeset
|
202 static void monitorexit (JavaThread* thread, oopDesc* obj, BasicLock* lock); |
9591
0381c7937e7a
replaced create_null_pointer_exception assembler stub with compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9590
diff
changeset
|
203 static void create_null_exception(JavaThread* thread); |
9592
efb8c1918ea5
replaced create_out_of_bounds_exception assembler stub with compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9591
diff
changeset
|
204 static void create_out_of_bounds_exception(JavaThread* thread, jint index); |
14731
0cb5c4d276d4
use raw data support to fix incorrect use of String.intern() for embedding strings in code
Doug Simon <doug.simon@oracle.com>
parents:
13578
diff
changeset
|
205 static void vm_error(JavaThread* thread, jlong where, jlong format, jlong value); |
12423
370b5f07f9e2
The runtime entries need to use oopDesc* rather than oop in their signature
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10953
diff
changeset
|
206 static oopDesc* load_and_clear_exception(JavaThread* thread); |
370b5f07f9e2
The runtime entries need to use oopDesc* rather than oop in their signature
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10953
diff
changeset
|
207 static void log_printf(JavaThread* thread, oopDesc* format, jlong v1, jlong v2, jlong v3); |
9592
efb8c1918ea5
replaced create_out_of_bounds_exception assembler stub with compiled stub (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9591
diff
changeset
|
208 static void log_primitive(JavaThread* thread, jchar typeChar, jlong value, jboolean newline); |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
209 // Note: Must be kept in sync with constants in com.oracle.jvmci.replacements.Log |
9593
a3b4bcc22313
replaced log_* assembler stubs with compiled stubs (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9592
diff
changeset
|
210 enum { |
a3b4bcc22313
replaced log_* assembler stubs with compiled stubs (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9592
diff
changeset
|
211 LOG_OBJECT_NEWLINE = 0x01, |
a3b4bcc22313
replaced log_* assembler stubs with compiled stubs (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9592
diff
changeset
|
212 LOG_OBJECT_STRING = 0x02, |
a3b4bcc22313
replaced log_* assembler stubs with compiled stubs (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9592
diff
changeset
|
213 LOG_OBJECT_ADDRESS = 0x04 |
a3b4bcc22313
replaced log_* assembler stubs with compiled stubs (GRAAL-81)
Doug Simon <doug.simon@oracle.com>
parents:
9592
diff
changeset
|
214 }; |
12423
370b5f07f9e2
The runtime entries need to use oopDesc* rather than oop in their signature
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
10953
diff
changeset
|
215 static void log_object(JavaThread* thread, oopDesc* msg, jint flags); |
10434
8b22524df53b
Add G1 Barriers' foreign calls
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10072
diff
changeset
|
216 static void write_barrier_pre(JavaThread* thread, oopDesc* obj); |
8b22524df53b
Add G1 Barriers' foreign calls
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10072
diff
changeset
|
217 static void write_barrier_post(JavaThread* thread, void* card); |
10953
97e282186b5b
Add heap sanity checker with premature hard crash for debugging write barriers
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10770
diff
changeset
|
218 static jboolean validate_object(JavaThread* thread, oopDesc* parent, oopDesc* child); |
12433
808348377021
Fix inconsistent oops in slow path allocation
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10953
diff
changeset
|
219 static void new_store_pre_barrier(JavaThread* thread); |
18227
bcb1e5c232d8
Test deoptimization inside ForeignCallNode
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17033
diff
changeset
|
220 |
bcb1e5c232d8
Test deoptimization inside ForeignCallNode
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17033
diff
changeset
|
221 // Test only function |
bcb1e5c232d8
Test deoptimization inside ForeignCallNode
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17033
diff
changeset
|
222 static int test_deoptimize_call_int(JavaThread* thread, int value); |
7125
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
6559
diff
changeset
|
223 }; |
1baf7f1e3f23
decoupled C++ Graal runtime from C1
Doug Simon <doug.simon@oracle.com>
parents:
6559
diff
changeset
|
224 |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
225 // Tracing macros |
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
226 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
227 #define IF_TRACE_jvmci_1 if (!(TraceJVMCI >= 1)) ; else |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
228 #define IF_TRACE_jvmci_2 if (!(TraceJVMCI >= 2)) ; else |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
229 #define IF_TRACE_jvmci_3 if (!(TraceJVMCI >= 3)) ; else |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
230 #define IF_TRACE_jvmci_4 if (!(TraceJVMCI >= 4)) ; else |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
231 #define IF_TRACE_jvmci_5 if (!(TraceJVMCI >= 5)) ; else |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
232 |
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
233 // using commas and else to keep one-instruction semantics |
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
234 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
235 #define TRACE_jvmci_1 if (!(TraceJVMCI >= 1 && (tty->print("TraceJVMCI-1: "), true))) ; else tty->print_cr |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
236 #define TRACE_jvmci_2 if (!(TraceJVMCI >= 2 && (tty->print(" TraceJVMCI-2: "), true))) ; else tty->print_cr |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
237 #define TRACE_jvmci_3 if (!(TraceJVMCI >= 3 && (tty->print(" TraceJVMCI-3: "), true))) ; else tty->print_cr |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
238 #define TRACE_jvmci_4 if (!(TraceJVMCI >= 4 && (tty->print(" TraceJVMCI-4: "), true))) ; else tty->print_cr |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
239 #define TRACE_jvmci_5 if (!(TraceJVMCI >= 5 && (tty->print(" TraceJVMCI-5: "), true))) ; else tty->print_cr |
15582
063ec2920d21
made Graal runtime initialization in hosted mode lazy
Doug Simon <doug.simon@oracle.com>
parents:
14731
diff
changeset
|
240 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21527
diff
changeset
|
241 #endif // SHARE_VM_JVMCI_JVMCI_RUNTIME_HPP |