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 #include "precompiled.hpp" 26 #include "jfr/recorder/access/jfrEventClass.hpp" 27 #include "jfr/recorder/checkpoint/constant/traceid/jfrTraceId.inline.hpp" 28 29 bool JdkJfrEvent::is(const Klass* k) { 30 return JfrTraceId::is_jdk_jfr_event(k); 31 } 32 33 bool JdkJfrEvent::is(const jclass jc) { 34 return JfrTraceId::is_jdk_jfr_event(jc); 35 } 36 37 void JdkJfrEvent::tag_as(const Klass* k) { 38 JfrTraceId::tag_as_jdk_jfr_event(k); 39 } 40 41 bool JdkJfrEvent::is_subklass(const Klass* k) { 42 return JfrTraceId::is_jdk_jfr_event_sub(k); 43 } 44 45 bool JdkJfrEvent::is_subklass(const jclass jc) { 46 return JfrTraceId::is_jdk_jfr_event_sub(jc); 47 } 48 49 void JdkJfrEvent::tag_as_subklass(const Klass* k) { 50 JfrTraceId::tag_as_jdk_jfr_event_sub(k); 51 } 52 53 void JdkJfrEvent::tag_as_subklass(const jclass jc) { 54 JfrTraceId::tag_as_jdk_jfr_event_sub(jc); 55 } 56 57 bool JdkJfrEvent::is_a(const Klass* k) { 58 return JfrTraceId::in_jdk_jfr_event_hierarchy(k); 59 } 60 61 bool JdkJfrEvent::is_a(const jclass jc) { 62 return JfrTraceId::in_jdk_jfr_event_hierarchy(jc); 63 } 64 65 bool JdkJfrEvent::is_host(const Klass* k) { 66 return JfrTraceId::is_event_host(k); 67 } 68 69 bool JdkJfrEvent::is_host(const jclass jc) { 70 return JfrTraceId::is_event_host(jc); 71 } 72 73 void JdkJfrEvent::tag_as_host(const Klass* k) { 74 JfrTraceId::tag_as_event_host(k); 75 } 76 77 void JdkJfrEvent::tag_as_host(const jclass jc) { 78 JfrTraceId::tag_as_event_host(jc); 79 } 80 81 bool JdkJfrEvent::is_visible(const Klass* k) { 82 return JfrTraceId::in_visible_set(k); 83 } 84 85 bool JdkJfrEvent::is_visible(const jclass jc) { 86 return JfrTraceId::in_visible_set(jc); 87 }