Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/services/EmptyEventProvider.java @ 23363:56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 28 Apr 2016 15:16:47 +0200 |
parents | jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/events/EmptyEventProvider.java@1bbd4a7c274b |
children | 8153a654bd10 |
rev | line source |
---|---|
15663 | 1 /* |
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
23 package jdk.vm.ci.hotspot.services; |
15663 | 24 |
25 /** | |
26 * An empty implementation for {@link EventProvider}. This implementation is used when no logging is | |
27 * requested. | |
28 */ | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
29 final class EmptyEventProvider extends EventProvider { |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
30 |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
31 public EmptyEventProvider() { |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
32 super(null); |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
33 } |
15663 | 34 |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
35 static InternalError shouldNotReachHere() { |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
36 throw new InternalError("should not reach here"); |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
37 } |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
38 |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
39 @Override |
15663 | 40 public CompilationEvent newCompilationEvent() { |
41 return new EmptyCompilationEvent(); | |
42 } | |
43 | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
44 static class EmptyCompilationEvent implements CompilationEvent { |
15663 | 45 public void commit() { |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
46 throw shouldNotReachHere(); |
15663 | 47 } |
48 | |
49 public boolean shouldWrite() { | |
50 // Events of this class should never been written. | |
51 return false; | |
52 } | |
53 | |
54 public void begin() { | |
55 } | |
56 | |
57 public void end() { | |
58 } | |
59 | |
60 public void setMethod(String method) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
61 throw shouldNotReachHere(); |
15663 | 62 } |
63 | |
64 public void setCompileId(int compileId) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
65 throw shouldNotReachHere(); |
15663 | 66 } |
67 | |
68 public void setCompileLevel(int compileLevel) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
69 throw shouldNotReachHere(); |
15663 | 70 } |
71 | |
72 public void setSucceeded(boolean succeeded) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
73 throw shouldNotReachHere(); |
15663 | 74 } |
75 | |
76 public void setIsOsr(boolean isOsr) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
77 throw shouldNotReachHere(); |
15663 | 78 } |
79 | |
80 public void setCodeSize(int codeSize) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
81 throw shouldNotReachHere(); |
15663 | 82 } |
83 | |
84 public void setInlinedBytes(int inlinedBytes) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
85 throw shouldNotReachHere(); |
15663 | 86 } |
87 } | |
88 | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
89 @Override |
15663 | 90 public CompilerFailureEvent newCompilerFailureEvent() { |
91 return new EmptyCompilerFailureEvent(); | |
92 } | |
93 | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
94 static class EmptyCompilerFailureEvent implements CompilerFailureEvent { |
15663 | 95 public void commit() { |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
96 throw shouldNotReachHere(); |
15663 | 97 } |
98 | |
99 public boolean shouldWrite() { | |
100 // Events of this class should never been written. | |
101 return false; | |
102 } | |
103 | |
104 public void setCompileId(int compileId) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
105 throw shouldNotReachHere(); |
15663 | 106 } |
107 | |
108 public void setMessage(String message) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
109 throw shouldNotReachHere(); |
15663 | 110 } |
111 } | |
112 | |
113 } |