annotate graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCompiledNmethod.java @ 21556:48c1ebd24120

renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Wed, 27 May 2015 00:36:16 +0200
parents 9579a3c62a9e
children d563baeca9df
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
18176
c2270ad35f57 Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents: 15463
diff changeset
2 * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
21552
9579a3c62a9e use skeleton findbugs jar containing only SuppresFBWarnings to avoid external dependency for JVMCI classes (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21411
diff changeset
23 package com.oracle.jvmci.hotspot;
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21552
diff changeset
25 import com.oracle.jvmci.code.*;
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
26
19426
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
27 import edu.umd.cs.findbugs.annotations.*;
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
28
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29 /**
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 * {@link HotSpotCompiledCode} destined for installation as an nmethod.
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31 */
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
32 public final class HotSpotCompiledNmethod extends HotSpotCompiledCode {
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
33
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
34 public final HotSpotResolvedJavaMethod method;
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
35 public final int entryBCI;
13630
b1838411e896 Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9669
diff changeset
36 public final int id;
19321
98592ae4b1fa only record method dependencies if JVMTI hotswapping or breakpointing is enabled
Doug Simon <doug.simon@oracle.com>
parents: 19315
diff changeset
37 public final long graalEnv;
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
38
19426
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
39 /**
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
40 * May be set by VM if code installation fails. It will describe in more detail why installation
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
41 * failed (e.g., exactly which dependency failed).
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
42 */
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
43 @SuppressFBWarnings("UWF_UNWRITTEN_FIELD") private String installationFailureMessage;
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
44
18176
c2270ad35f57 Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents: 15463
diff changeset
45 public HotSpotCompiledNmethod(HotSpotResolvedJavaMethod method, CompilationResult compResult) {
c2270ad35f57 Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents: 15463
diff changeset
46 this(method, compResult, 0L);
15463
a20be10ad437 made Graal work with the HotSpot compiler queue and compiler threads, enabled by -XX:-UseGraalCompilationQueue
Doug Simon <doug.simon@oracle.com>
parents: 14559
diff changeset
47 }
a20be10ad437 made Graal work with the HotSpot compiler queue and compiler threads, enabled by -XX:-UseGraalCompilationQueue
Doug Simon <doug.simon@oracle.com>
parents: 14559
diff changeset
48
19321
98592ae4b1fa only record method dependencies if JVMTI hotswapping or breakpointing is enabled
Doug Simon <doug.simon@oracle.com>
parents: 19315
diff changeset
49 public HotSpotCompiledNmethod(HotSpotResolvedJavaMethod method, CompilationResult compResult, long graalEnv) {
18176
c2270ad35f57 Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents: 15463
diff changeset
50 super(compResult);
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
51 this.method = method;
13630
b1838411e896 Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9669
diff changeset
52 this.entryBCI = compResult.getEntryBCI();
b1838411e896 Use compile ids assigned by hotspot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9669
diff changeset
53 this.id = compResult.getId();
19321
98592ae4b1fa only record method dependencies if JVMTI hotswapping or breakpointing is enabled
Doug Simon <doug.simon@oracle.com>
parents: 19315
diff changeset
54 this.graalEnv = graalEnv;
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
55 }
19315
5664cadb3cee don't record method dependencies for snippets, stubs or replacements
Doug Simon <doug.simon@oracle.com>
parents: 18176
diff changeset
56
5664cadb3cee don't record method dependencies for snippets, stubs or replacements
Doug Simon <doug.simon@oracle.com>
parents: 18176
diff changeset
57 @Override
5664cadb3cee don't record method dependencies for snippets, stubs or replacements
Doug Simon <doug.simon@oracle.com>
parents: 18176
diff changeset
58 public String toString() {
5664cadb3cee don't record method dependencies for snippets, stubs or replacements
Doug Simon <doug.simon@oracle.com>
parents: 18176
diff changeset
59 return getClass().getSimpleName() + "[" + id + ":" + method.format("%H.%n(%p)%r@") + entryBCI + "]";
5664cadb3cee don't record method dependencies for snippets, stubs or replacements
Doug Simon <doug.simon@oracle.com>
parents: 18176
diff changeset
60 }
19426
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
61
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
62 public String getInstallationFailureMessage() {
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
63 return installationFailureMessage;
dd8989d5547f provide more detail when Graal code installation fails due to a failed dependency check
Doug Simon <doug.simon@oracle.com>
parents: 19321
diff changeset
64 }
9669
ed6202820ecf renamed HotSpotCompilationResult to HotSpotCompiledCode and added subclasses HotSpotCompiledNmethod and HotSpotCompiledRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
65 }