1 /* |
1 /* |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
675 vm_exit_during_initialization("Java Kernel does not support JVMTI."); |
675 vm_exit_during_initialization("Java Kernel does not support JVMTI."); |
676 } |
676 } |
677 } |
677 } |
678 |
678 |
679 |
679 |
680 #ifndef JVMTI_KERNEL |
|
681 static inline Klass* oop_to_klass(oop obj) { |
680 static inline Klass* oop_to_klass(oop obj) { |
682 Klass* k = obj->klass(); |
681 Klass* k = obj->klass(); |
683 |
682 |
684 // if the object is a java.lang.Class then return the java mirror |
683 // if the object is a java.lang.Class then return the java mirror |
685 if (k == SystemDictionary::Class_klass()) { |
684 if (k == SystemDictionary::Class_klass()) { |
2176 // type for the Agent_OnAttach entry point |
2175 // type for the Agent_OnAttach entry point |
2177 extern "C" { |
2176 extern "C" { |
2178 typedef jint (JNICALL *OnAttachEntry_t)(JavaVM*, char *, void *); |
2177 typedef jint (JNICALL *OnAttachEntry_t)(JavaVM*, char *, void *); |
2179 } |
2178 } |
2180 |
2179 |
2181 #ifndef SERVICES_KERNEL |
|
2182 jint JvmtiExport::load_agent_library(AttachOperation* op, outputStream* st) { |
2180 jint JvmtiExport::load_agent_library(AttachOperation* op, outputStream* st) { |
2183 char ebuf[1024]; |
2181 char ebuf[1024]; |
2184 char buffer[JVM_MAXPATHLEN]; |
2182 char buffer[JVM_MAXPATHLEN]; |
2185 void* library = NULL; |
2183 void* library = NULL; |
2186 jint result = JNI_ERR; |
2184 jint result = JNI_ERR; |