Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/events/EventProvider.java @ 22672:1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Thu, 08 Oct 2015 17:28:41 -0700 |
parents | jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/events/EventProvider.java@0e095e2c24e2 |
children |
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 */ | |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22054
diff
changeset
|
23 package jdk.vm.ci.hotspot.events; |
21631
77acf6ba2fc0
Move EventProvider to jvmci.hotspot, make it a JVMCI Service
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
15663
diff
changeset
|
24 |
15663 | 25 /** |
26 * A provider that provides a specific implementation for events that can be logged in the compiler. | |
27 */ | |
21937
3a292e8b9e51
replaced Service marker interface with non-standard META-INF directory names to differentiate JVMCI providers from standard service providers
Doug Simon <doug.simon@oracle.com>
parents:
21798
diff
changeset
|
28 public interface EventProvider { |
15663 | 29 |
30 /** | |
31 * An instant event is an event that is not considered to have taken any time. | |
32 */ | |
33 interface InstantEvent { | |
34 /** | |
35 * Commits the event. | |
36 */ | |
37 void commit(); | |
38 | |
39 /** | |
40 * Determines if this particular event instance would be committed to the data stream right | |
41 * now if application called {@link #commit()}. This in turn depends on whether the event is | |
42 * enabled and possible other factors. | |
43 * | |
44 * @return if this event would be committed on a call to {@link #commit()}. | |
45 */ | |
46 boolean shouldWrite(); | |
47 } | |
48 | |
49 /** | |
50 * Timed events describe an operation that somehow consumes time. | |
51 */ | |
52 interface TimedEvent extends InstantEvent { | |
53 /** | |
54 * Starts the timing for this event. | |
55 */ | |
56 void begin(); | |
57 | |
58 /** | |
59 * Ends the timing period for this event. | |
60 */ | |
61 void end(); | |
62 } | |
63 | |
64 /** | |
65 * Creates a new {@link CompilationEvent}. | |
66 * | |
67 * @return a compilation event | |
68 */ | |
69 CompilationEvent newCompilationEvent(); | |
70 | |
71 /** | |
72 * A compilation event. | |
73 */ | |
74 interface CompilationEvent extends TimedEvent { | |
75 void setMethod(String method); | |
76 | |
77 void setCompileId(int compileId); | |
78 | |
79 void setCompileLevel(int compileLevel); | |
80 | |
81 void setSucceeded(boolean succeeded); | |
82 | |
83 void setIsOsr(boolean isOsr); | |
84 | |
85 void setCodeSize(int codeSize); | |
86 | |
87 void setInlinedBytes(int inlinedBytes); | |
88 } | |
89 | |
90 /** | |
91 * Creates a new {@link CompilerFailureEvent}. | |
92 * | |
93 * @return a compiler failure event | |
94 */ | |
95 CompilerFailureEvent newCompilerFailureEvent(); | |
96 | |
97 /** | |
98 * A compiler failure event. | |
99 */ | |
100 interface CompilerFailureEvent extends InstantEvent { | |
101 void setCompileId(int compileId); | |
102 | |
103 void setMessage(String message); | |
104 } | |
105 } |