Path: blob/master/src/hotspot/share/jfr/support/jfrJdkJfrEvent.hpp
41149 views
/*1* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_JFR_SUPPORT_JFRJDKJFREVENT_HPP25#define SHARE_JFR_SUPPORT_JFRJDKJFREVENT_HPP2627#include "jni.h"28#include "memory/allocation.hpp"29#include "utilities/exceptions.hpp"3031class Klass;3233//34// For convenient access to the event klass hierarchy:35//36// - jdk.internal.event.Event (java.base)37// - jdk.jfr.Event (jdk.jfr)38// - sub klasses (...)39//40// Although the top level klass is really jdk.internal.event.Event,41// its role is primarily to allow event programming in module java.base.42// We still call it the jdk.jfr.Event klass hierarchy, including43// jdk.internal.event.Event.44//45class JdkJfrEvent : AllStatic {46public:47// jdk.jfr.Event48static bool is(const Klass* k);49static bool is(const jclass jc);50static void tag_as(const Klass* k);5152// jdk.jfr.Event subklasses53static bool is_subklass(const Klass* k);54static bool is_subklass(const jclass jc);55static void tag_as_subklass(const Klass* k);56static void tag_as_subklass(const jclass jc);5758// jdk.jfr.Event hierarchy59static bool is_a(const Klass* k);60static bool is_a(const jclass jc);6162// klasses that host a jdk.jfr.Event63static bool is_host(const Klass* k);64static bool is_host(const jclass jc);65static void tag_as_host(const Klass* k);66static void tag_as_host(const jclass jc);6768// in the set of classes made visible to java69static bool is_visible(const Klass* k);70static bool is_visible(const jclass jc);7172// all klasses in the hierarchy73static jobject get_all_klasses(TRAPS);74};7576#endif // SHARE_JFR_SUPPORT_JFRJDKJFREVENT_HPP777879