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 */
23
24 #ifndef SHARE_COMPILER_COMPILEREVENT_HPP
25 #define SHARE_COMPILER_COMPILEREVENT_HPP
26
27 #include "jni.h"
28 #include "compiler/compilerDefinitions.hpp"
29 #include "jfr/jfrEvents.hpp"
30 #include "memory/allocation.hpp"
31 #include "utilities/macros.hpp"
32 #include "utilities/ticks.hpp"
33
34 #if INCLUDE_JFR
35 #include "jfr/utilities/jfrTime.hpp"
36 #endif
37
38 class ciMethod;
39 template <typename>
40 class GrowableArray;
41 class Method;
42
43 class CompilerEvent : AllStatic {
44 public:
45 static jlong ticksNow() {
46 // Using Ticks for consistent usage outside JFR folder.
47 JFR_ONLY(return JfrTime::is_ft_enabled() ? Ticks::now().ft_value() : Ticks::now().value();) NOT_JFR_RETURN_(0L);
48 }
49
50 class CompilationEvent : AllStatic {
51 public:
52 static void post(EventCompilation& event, int compile_id, CompilerType type, Method* method, int compile_level, bool success, bool is_osr, int code_size, int inlined_bytecodes) NOT_JFR_RETURN();
53 };
54
55 class CompilationFailureEvent : AllStatic {
56 public:
57 static void post(EventCompilationFailure& event, int compile_id, const char* reason) NOT_JFR_RETURN();
58 };
59
60 class PhaseEvent : AllStatic {
61 friend class CompilerPhaseTypeConstant;
|
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 */
23
24 #ifndef SHARE_COMPILER_COMPILEREVENT_HPP
25 #define SHARE_COMPILER_COMPILEREVENT_HPP
26
27 #include "jni.h"
28 #include "compiler/compilerDefinitions.hpp"
29 #include "memory/allocation.hpp"
30 #include "utilities/macros.hpp"
31 #include "utilities/ticks.hpp"
32
33 #if INCLUDE_JFR
34 #include "jfr/utilities/jfrTime.hpp"
35 #endif
36
37 class ciMethod;
38 template <typename>
39 class GrowableArray;
40 class Method;
41 class EventCompilation;
42 class EventCompilationFailure;
43 class EventCompilerInlining;
44 class EventCompilerPhase;
45 struct JfrStructCalleeMethod;
46
47 class CompilerEvent : AllStatic {
48 public:
49 static jlong ticksNow() {
50 // Using Ticks for consistent usage outside JFR folder.
51 JFR_ONLY(return JfrTime::is_ft_enabled() ? Ticks::now().ft_value() : Ticks::now().value();) NOT_JFR_RETURN_(0L);
52 }
53
54 class CompilationEvent : AllStatic {
55 public:
56 static void post(EventCompilation& event, int compile_id, CompilerType type, Method* method, int compile_level, bool success, bool is_osr, int code_size, int inlined_bytecodes) NOT_JFR_RETURN();
57 };
58
59 class CompilationFailureEvent : AllStatic {
60 public:
61 static void post(EventCompilationFailure& event, int compile_id, const char* reason) NOT_JFR_RETURN();
62 };
63
64 class PhaseEvent : AllStatic {
65 friend class CompilerPhaseTypeConstant;
|