Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/hotspot/share/jfr/support/jfrJdkJfrEvent.hpp
41149 views
1
/*
2
* Copyright (c) 2012, 2019, 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
*
23
*/
24
25
#ifndef SHARE_JFR_SUPPORT_JFRJDKJFREVENT_HPP
26
#define SHARE_JFR_SUPPORT_JFRJDKJFREVENT_HPP
27
28
#include "jni.h"
29
#include "memory/allocation.hpp"
30
#include "utilities/exceptions.hpp"
31
32
class Klass;
33
34
//
35
// For convenient access to the event klass hierarchy:
36
//
37
// - jdk.internal.event.Event (java.base)
38
// - jdk.jfr.Event (jdk.jfr)
39
// - sub klasses (...)
40
//
41
// Although the top level klass is really jdk.internal.event.Event,
42
// its role is primarily to allow event programming in module java.base.
43
// We still call it the jdk.jfr.Event klass hierarchy, including
44
// jdk.internal.event.Event.
45
//
46
class JdkJfrEvent : AllStatic {
47
public:
48
// jdk.jfr.Event
49
static bool is(const Klass* k);
50
static bool is(const jclass jc);
51
static void tag_as(const Klass* k);
52
53
// jdk.jfr.Event subklasses
54
static bool is_subklass(const Klass* k);
55
static bool is_subklass(const jclass jc);
56
static void tag_as_subklass(const Klass* k);
57
static void tag_as_subklass(const jclass jc);
58
59
// jdk.jfr.Event hierarchy
60
static bool is_a(const Klass* k);
61
static bool is_a(const jclass jc);
62
63
// klasses that host a jdk.jfr.Event
64
static bool is_host(const Klass* k);
65
static bool is_host(const jclass jc);
66
static void tag_as_host(const Klass* k);
67
static void tag_as_host(const jclass jc);
68
69
// in the set of classes made visible to java
70
static bool is_visible(const Klass* k);
71
static bool is_visible(const jclass jc);
72
73
// all klasses in the hierarchy
74
static jobject get_all_klasses(TRAPS);
75
};
76
77
#endif // SHARE_JFR_SUPPORT_JFRJDKJFREVENT_HPP
78
79