Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiExport.cpp @ 7969:1eae78177059
Merge
author | jiangli |
---|---|
date | Fri, 01 Feb 2013 15:25:37 -0500 |
parents | 8b46b0196eb0 |
children | 3c9bc17b9403 |
comparison
equal
deleted
inserted
replaced
7968:44c5fcd9cb25 | 7969:1eae78177059 |
---|---|
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; |
2257 result = JNI_OK; | 2255 result = JNI_OK; |
2258 } | 2256 } |
2259 } | 2257 } |
2260 return result; | 2258 return result; |
2261 } | 2259 } |
2262 #endif // SERVICES_KERNEL | |
2263 | 2260 |
2264 //////////////////////////////////////////////////////////////////////////////////////////////// | 2261 //////////////////////////////////////////////////////////////////////////////////////////////// |
2265 | 2262 |
2266 // Setup current current thread for event collection. | 2263 // Setup current current thread for event collection. |
2267 void JvmtiEventCollector::setup_jvmti_thread_state() { | 2264 void JvmtiEventCollector::setup_jvmti_thread_state() { |
2455 // JVMTI notify gc finish | 2452 // JVMTI notify gc finish |
2456 if (JvmtiExport::should_post_garbage_collection_finish()) { | 2453 if (JvmtiExport::should_post_garbage_collection_finish()) { |
2457 JvmtiExport::post_garbage_collection_finish(); | 2454 JvmtiExport::post_garbage_collection_finish(); |
2458 } | 2455 } |
2459 } | 2456 } |
2460 #endif // JVMTI_KERNEL |