jvmtiEnv.cpp revision 1825
4601N/A * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. 4601N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4601N/A * This code is free software; you can redistribute it and/or modify it 4601N/A * under the terms of the GNU General Public License version 2 only, as 4601N/A * published by the Free Software Foundation. 4601N/A * This code is distributed in the hope that it will be useful, but WITHOUT 4601N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4601N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4601N/A * version 2 for more details (a copy is included in the LICENSE file that 4601N/A * You should have received a copy of the GNU General Public License version 4601N/A * 2 along with this work; if not, write to the Free Software Foundation, 4601N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4601N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4601N/A#
include "incls/_precompiled.incl" 4601N/A // FIXLATER: hook into JvmtiTrace 4601N/A// VM operation class to copy jni function table at safepoint. 4601N/A// More than one java threads or jvmti agents may be reading/ 4601N/A// modifying jni function tables. To reduce the risk of bad 4601N/A// interaction b/w these threads it is copied at safepoint. // Do not change the "prefix" marker below, everything above it is copied // unchanged into the filled stub, everything below is controlled by the // stub filler (only method bodies are carried forward, and then only for // functionality still in the spec). // Memory Management functions // mem_ptr - pre-checked for NULL // mem - NULL is a valid value, must be checked // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // data - NULL is a valid value, must be checked // leaving state unset same as data set to NULL // otherwise, create the state }
/* end SetThreadLocalStorage */// thread - NOT pre-checked // data_ptr - pre-checked for NULL // jvmti_GetThreadLocalStorage is "in native" and doesn't transition // the thread to _thread_in_vm. However, when the TLS for a thread // other than the current thread is required we need to transition // from native so as to resolve the jthread. }
/* end GetThreadLocalStorage */// class_count_ptr - pre-checked for NULL // classes_ptr - pre-checked for NULL }
/* end GetLoadedClasses */// initiating_loader - NULL is a valid value, must be checked // class_count_ptr - pre-checked for NULL // classes_ptr - pre-checked for NULL }
/* end GetClassLoaderClasses */// k_mirror - may be primitive, this must be checked // is_modifiable_class_ptr - pre-checked for NULL }
/* end IsModifiableClass */// class_count - pre-checked to be greater than or equal to 0 // classes - pre-checked for NULL // not cached, we need to reconstitute the class file from VM representation // it is cached, get it from the cache }
/* end RetransformClasses */// class_count - pre-checked to be greater than or equal to 0 // class_definitions - pre-checked for NULL }
/* end RedefineClasses */// size_ptr - pre-checked for NULL }
/* end GetObjectSize */// prefix - NULL is a valid value, must be checked }
/* end SetNativeMethodPrefix */// prefix_count - pre-checked to be greater than or equal to 0 // prefixes - pre-checked for NULL // Have to grab JVMTI thread state lock to be sure that some thread // isn't accessing the prefixes at the same time we are setting them. // No locks during VM bring-up. }
/* end SetNativeMethodPrefixes */ // Event Management functions // callbacks - NULL is a valid value, must be checked // size_of_callbacks - pre-checked to be greater than or equal to 0 }
/* end SetEventCallbacks */// event_thread - NULL is a valid value, must be checked // event_type must be valid // global events cannot be controlled at thread level. // assure that needed capabilities are present }
/* end SetEventNotificationMode */// capabilities_ptr - pre-checked for NULL }
/* end GetPotentialCapabilities */// capabilities_ptr - pre-checked for NULL }
/* end AddCapabilities */// capabilities_ptr - pre-checked for NULL }
/* end RelinquishCapabilities */// capabilities_ptr - pre-checked for NULL }
/* end GetCapabilities */ // Class Loader Search functions // segment - pre-checked for NULL // This JvmtiEnv requested version 1.0 semantics and this function // is only allowed in the ONLOAD phase in version 1.0 so we need to // The phase is checked by the wrapper that called this function, // but this thread could be racing with the thread that is // terminating the VM so we check one more time. // add the jar file to the bootclasspath }
/* end AddToBootstrapClassLoaderSearch */// segment - pre-checked for NULL // The phase is checked by the wrapper that called this function, // but this thread could be racing with the thread that is // terminating the VM so we check one more time. // create the zip entry (which will open the zip file and hence // check that the segment is indeed a zip file). // need the path as java.lang.String // Invoke the appendToClassPathForInstrumentation method - if the method // is not found it means the loader doesn't support adding to the class path }
/* end AddToSystemClassLoaderSearch */// phase_ptr - pre-checked for NULL }
/* end DisposeEnvironment */// data - NULL is a valid value, must be checked }
/* end SetEnvironmentLocalStorage */// data_ptr - pre-checked for NULL }
/* end GetEnvironmentLocalStorage */// version_ptr - pre-checked for NULL }
/* end GetVersionNumber */// name_ptr - pre-checked for NULL }
/* end SetVerboseFlag */// format_ptr - pre-checked for NULL }
/* end GetJLocationFormat */// thread - NOT pre-checked // thread_state_ptr - pre-checked for NULL }
/* end GetThreadState */// thread_ptr - pre-checked for NULL }
/* end GetCurrentThread */// threads_count_ptr - pre-checked for NULL // threads_ptr - pre-checked for NULL // enumerate threads (including agent threads) // have to make global handles outside of Threads_lock }
/* end GetAllThreads */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // don't allow hidden thread suspend request. // don't allow nested external suspend requests. // the thread was in the process of exiting }
/* end SuspendThread */// request_count - pre-checked to be greater than or equal to 0 // request_list - pre-checked for NULL // results - pre-checked for NULL // the thread has not yet run or has exited (not on threads list) // don't allow hidden thread suspend request. // don't allow nested external suspend requests. // We need to try and suspend native threads here. Threads in // other states will self-suspend on their next transition. // The thread was in the process of exiting. Force another // safepoint to make sure that this thread transitions. // per-thread suspend results returned via results parameter }
/* end SuspendThreadList */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // don't allow hidden thread resume request. // request_count - pre-checked to be greater than or equal to 0 // request_list - pre-checked for NULL // results - pre-checked for NULL // don't allow hidden thread resume request. // per-thread resume results returned via results parameter }
/* end ResumeThreadList */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // thread - NOT pre-checked // Todo: this is a duplicate of JVM_Interrupt; share code in future // Ensure that the C++ Thread and OSThread structures aren't freed before we operate // We need to re-resolve the java_thread, since a GC might have happened during the }
/* end InterruptThread */// thread - NOT pre-checked // info_ptr - pre-checked for NULL // if thread is NULL the current thread is used }
/* end GetThreadInfo */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // owned_monitor_count_ptr - pre-checked for NULL // owned_monitors_ptr - pre-checked for NULL // growable array of jvmti monitors info on the C-heap // JVMTI get monitors info at safepoint. Do not require target thread to // copy into the returned array }
/* end GetOwnedMonitorInfo */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // monitor_info_count_ptr - pre-checked for NULL // monitor_info_ptr - pre-checked for NULL // growable array of jvmti monitors info on the C-heap // JVMTI get owned monitors info at safepoint. Do not require target thread to }
/* end GetOwnedMonitorStackDepthInfo */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // monitor_ptr - pre-checked for NULL // get contended monitor information at safepoint. }
/* end GetCurrentContendedMonitor */// thread - NOT pre-checked // proc - pre-checked for NULL // arg - NULL is a valid value, must be checked // At this point it may be possible that no osthread was created for the // JavaThread due to lack of memory. }
/* end RunAgentThread */ // Thread Group functions // group_count_ptr - pre-checked for NULL // groups_ptr - pre-checked for NULL // Only one top level thread group now. // Allocate memory to store global-refs to the thread groups. // Assume this area is freed by caller. // Convert oop to Handle, then convert Handle to global-ref. }
/* end GetTopThreadGroups */// info_ptr - pre-checked for NULL }
/* end GetThreadGroupInfo */// thread_count_ptr - pre-checked for NULL // threads_ptr - pre-checked for NULL // group_count_ptr - pre-checked for NULL // groups_ptr - pre-checked for NULL // Filter out hidden java threads. // have to make global handles outside of Threads_lock }
/* end GetThreadGroupChildren */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // max_frame_count - pre-checked to be greater than or equal to 0 // frame_buffer - pre-checked for NULL // count_ptr - pre-checked for NULL // JVMTI get stack trace at safepoint. Do not require target thread to }
/* end GetStackTrace */// max_frame_count - pre-checked to be greater than or equal to 0 // stack_info_ptr - pre-checked for NULL // thread_count_ptr - pre-checked for NULL // JVMTI get stack traces at safepoint. }
/* end GetAllStackTraces */// thread_count - pre-checked to be greater than or equal to 0 // thread_list - pre-checked for NULL // max_frame_count - pre-checked to be greater than or equal to 0 // stack_info_ptr - pre-checked for NULL // JVMTI get stack traces at safepoint. }
/* end GetThreadListStackTraces */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // count_ptr - pre-checked for NULL // retrieve or create JvmtiThreadState. // get java stack frame count at safepoint. }
/* end GetFrameCount */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // retrieve or create the state // Check if java_thread is fully suspended // Check to see if a PopFrame was already in progress // Probably possible for JVMTI clients to trigger this, but the // JPDA backend shouldn't allow this to happen // 4812902: popFrame hangs if the method is waiting at a synchronize // Catch this condition and return an error to avoid hanging. // Now JVMTI spec allows an implementation to bail out with an opaque frame error. // Check if there are more than one Java frame in this thread, that the top two frames // are Java (not native) frames, and that there is no intervening VM frame // The 2-nd arg of constructor is needed to stop iterating at java entry frame. // We haven't found two adjacent non-native Java frames on the top. // There can be two situations here: // 1. There are no more java frames // 2. Two top java frames are separated by non-java native frames // Intervening non-java native or VM frames separate java frames. // Current implementation does not support this. See bug #5031735. // In theory it is possible to pop frames in such cases. // If any of the top 2 frames is a compiled one, need to deoptimize it for (
int i = 0; i <
2; i++) {
// Update the thread state to reflect that the top frame is popped // so that cur_stack_depth is maintained properly and all frameIDs // The current frame will be popped later when the suspended thread // is resumed and right before returning from VM to Java. // (see call_VM_base() in assembler_<cpu>.cpp). // It's fine to update the thread state here because no JVMTI events // shall be posted for this PopFrame. // Set pending step flag for this popframe and it is cleared when next // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // method_ptr - pre-checked for NULL // location_ptr - pre-checked for NULL // JVMTI get java stack frame location at safepoint. }
/* end GetFrameLocation */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative }
/* end NotifyFramePop */ // Force Early Return functions // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked }
/* end ForceEarlyReturnObject */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked }
/* end ForceEarlyReturnInt */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked }
/* end ForceEarlyReturnLong */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked }
/* end ForceEarlyReturnFloat */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked }
/* end ForceEarlyReturnDouble */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked }
/* end ForceEarlyReturnVoid */// klass - NULL is a valid value, must be checked // initial_object - NULL is a valid value, must be checked // callbacks - pre-checked for NULL // user_data - NULL is a valid value, must be checked // check klass if provided }
/* end FollowReferences */// klass - NULL is a valid value, must be checked // callbacks - pre-checked for NULL // user_data - NULL is a valid value, must be checked // check klass if provided }
/* end IterateThroughHeap */// tag_ptr - pre-checked for NULL // tag_count - pre-checked to be greater than or equal to 0 // tags - pre-checked for NULL // count_ptr - pre-checked for NULL // object_result_ptr - NULL is a valid value, must be checked // tag_result_ptr - NULL is a valid value, must be checked }
/* end GetObjectsWithTags */}
/* end ForceGarbageCollection */// object_reference_callback - pre-checked for NULL // user_data - NULL is a valid value, must be checked }
/* end IterateOverObjectsReachableFromObject */// heap_root_callback - NULL is a valid value, must be checked // stack_ref_callback - NULL is a valid value, must be checked // object_ref_callback - NULL is a valid value, must be checked // user_data - NULL is a valid value, must be checked }
/* end IterateOverReachableObjects */// heap_object_callback - pre-checked for NULL // user_data - NULL is a valid value, must be checked }
/* end IterateOverHeap */// k_mirror - may be primitive, this must be checked // heap_object_callback - pre-checked for NULL // user_data - NULL is a valid value, must be checked // DO PRIMITIVE CLASS PROCESSING }
/* end IterateOverInstancesOfClass */ // Local Variable functions // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // value_ptr - pre-checked for NULL // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. }
/* end GetLocalObject */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // value_ptr - pre-checked for NULL // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // value_ptr - pre-checked for NULL // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // value_ptr - pre-checked for NULL // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. }
/* end GetLocalFloat */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // value_ptr - pre-checked for NULL // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. }
/* end GetLocalDouble */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. }
/* end SetLocalObject */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. }
/* end SetLocalFloat */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // java_thread - unchecked // depth - pre-checked as non-negative // rm object is created to clean up the javaVFrame created in // doit_prologue(), but after doit() is finished with it. }
/* end SetLocalDouble */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method if (
location < 0) {
// simple invalid location check first // verify that the breakpoint is not past the end of the method }
/* end SetBreakpoint */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method if (
location < 0) {
// simple invalid location check first // verify that the breakpoint is not past the end of the method }
/* end ClearBreakpoint */ // Watched Field functions // make sure we haven't set this watch before }
/* end SetFieldAccessWatch */ // make sure we have a watch to clear }
/* end ClearFieldAccessWatch */ // make sure we haven't set this watch before }
/* end SetFieldModificationWatch */ // make sure we have a watch to clear }
/* end ClearFieldModificationWatch */// k_mirror - may be primitive, this must be checked // signature_ptr - NULL is a valid value, must be checked // generic_ptr - NULL is a valid value, must be checked }
/* end GetClassSignature */// k_mirror - may be primitive, this must be checked // status_ptr - pre-checked for NULL }
/* end GetClassStatus */// k_mirror - may be primitive, this must be checked // source_name_ptr - pre-checked for NULL }
/* end GetSourceFileName */// k_mirror - may be primitive, this must be checked // modifiers_ptr - pre-checked for NULL // Reset the deleted ACC_SUPER bit ( deleted in compute_modifier_flags()). }
/* end GetClassModifiers */// k_mirror - may be primitive, this must be checked // method_count_ptr - pre-checked for NULL // methods_ptr - pre-checked for NULL // Return CLASS_NOT_PREPARED error as per JVMTI spec. // Allocate the result and fill it in // Use the original method ordering indices stored in the class, so we can emit // jmethodIDs in the order they appeared in the class file // otherwise just copy in any order }
/* end GetClassMethods */// k_mirror - may be primitive, this must be checked // field_count_ptr - pre-checked for NULL // fields_ptr - pre-checked for NULL // Return CLASS_NOT_PREPARED error as per JVMTI spec. // First, count the fields. // Allocate the result and fill it in // The JVMTI spec requires fields in the order they occur in the class file, // this is the reverse order of what FieldStream hands out. }
/* end GetClassFields */// k_mirror - may be primitive, this must be checked // interface_count_ptr - pre-checked for NULL // interfaces_ptr - pre-checked for NULL // Return CLASS_NOT_PREPARED error as per JVMTI spec. }
/* end GetImplementedInterfaces */// k_mirror - may be primitive, this must be checked // minor_version_ptr - pre-checked for NULL // major_version_ptr - pre-checked for NULL }
/* end GetClassVersionNumbers */// k_mirror - may be primitive, this must be checked // constant_pool_count_ptr - pre-checked for NULL // constant_pool_byte_count_ptr - pre-checked for NULL // constant_pool_bytes_ptr - pre-checked for NULL }
/* end GetConstantPool */// k_mirror - may be primitive, this must be checked // is_interface_ptr - pre-checked for NULL // k_mirror - may be primitive, this must be checked // is_array_class_ptr - pre-checked for NULL // k_mirror - may be primitive, this must be checked // classloader_ptr - pre-checked for NULL }
/* end GetClassLoader */// k_mirror - may be primitive, this must be checked // source_debug_extension_ptr - pre-checked for NULL }
/* end GetSourceDebugExtension */// hash_code_ptr - pre-checked for NULL }
/* end GetObjectHashCode */// info_ptr - pre-checked for NULL // Some of the critical threads were not suspended. go to a safepoint and try again }
/* end GetObjectMonitorUsage */// name_ptr - NULL is a valid value, must be checked // signature_ptr - NULL is a valid value, must be checked // generic_ptr - NULL is a valid value, must be checked // just don't return the name // just don't return the signature // declaring_class_ptr - pre-checked for NULL }
/* end GetFieldDeclaringClass */// modifiers_ptr - pre-checked for NULL }
/* end GetFieldModifiers */// is_synthetic_ptr - pre-checked for NULL }
/* end IsFieldSynthetic */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // name_ptr - NULL is a valid value, must be checked // signature_ptr - NULL is a valid value, must be checked // generic_ptr - NULL is a valid value, must be checked // just don't return the name // just don't return the signature }
/* end GetMethodName */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // declaring_class_ptr - pre-checked for NULL }
/* end GetMethodDeclaringClass */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // modifiers_ptr - pre-checked for NULL }
/* end GetMethodModifiers */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // max_ptr - pre-checked for NULL // method_oop - pre-checked for validity, but may be NULL meaning obsolete method // size_ptr - pre-checked for NULL }
/* end GetArgumentsSize */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // entry_count_ptr - pre-checked for NULL // table_ptr - pre-checked for NULL // The line number table is compressed so we don't know how big it is until decompressed. // Decompression is really fast so we just do it twice. }
/* end GetLineNumberTable */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // start_location_ptr - pre-checked for NULL // end_location_ptr - pre-checked for NULL // get start and end location // there is no code so there is no start location }
/* end GetMethodLocation */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // entry_count_ptr - pre-checked for NULL // table_ptr - pre-checked for NULL // does the klass have any local variable information? // in the vm localvariable table representation, 6 consecutive elements in the table // represent a 6-tuple of shorts // [start_pc, length, name_index, descriptor_index, signature_index, index] // get the 5 tuple information from the vm table // get utf8 name and signature // fill in the jvmti local variable table }
/* end GetLocalVariableTable */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // bytecode_count_ptr - pre-checked for NULL // bytecodes_ptr - pre-checked for NULL // method_oop - pre-checked for validity, but may be NULL meaning obsolete method // is_native_ptr - pre-checked for NULL }
/* end IsMethodNative */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // is_synthetic_ptr - pre-checked for NULL }
/* end IsMethodSynthetic */// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // is_obsolete_ptr - pre-checked for NULL // This JvmtiEnv requested version 1.0 semantics and this function // requires the can_redefine_classes capability in version 1.0 so // we need to return an error here. }
/* end IsMethodObsolete */// name - pre-checked for NULL // monitor_ptr - pre-checked for NULL }
/* end CreateRawMonitor */// rmonitor - pre-checked for validity // Remove this monitor from pending raw monitors list // if it has entered in onload or start phase. // The caller owns this monitor which we are about to destroy. // We exit the underlying synchronization object so that the // "delete monitor" call below can work without an assertion // failure on systems that don't like destroying synchronization // objects that are locked. // The caller is trying to destroy a monitor that is locked by // someone else. While this is not forbidden by the JVMTI // spec, it will cause an assertion failure on systems that don't // like destroying synchronization objects that are locked. // We indicate a problem with the error return (and leak the }
/* end DestroyRawMonitor */// rmonitor - pre-checked for validity // No JavaThreads exist so ObjectMonitor enter cannot be // used, add this raw monitor to the pending list. // The pending monitors will be actually entered when // See transition_pending_raw_monitors in create_vm() // Not really unknown but ThreadInVMfromNative does more than we want /* Transition to thread_blocked without entering vm state */ /* This is really evil. Normally you can't undo _thread_blocked */ /* transitions like this because it would cause us to miss a */ /* safepoint but since the thread was already in _thread_in_native */ /* the thread is not leaving a safepoint safe state and it will */ /* block when it tries to return from native. We can't safepoint */ /* block in here because we could deadlock the vmthread. Blech. */ // frame should already be walkable since we are in native // restore state, still at a safepoint safe state #
endif /* PROPER_TRANSITIONS */}
/* end RawMonitorEnter */// rmonitor - pre-checked for validity // No JavaThreads exist so just remove this monitor from the pending list. // Bool value from exit is false if rmonitor is not in the list. // Not really unknown but ThreadInVMfromNative does more than we want #
endif /* PROPER_TRANSITIONS */}
/* end RawMonitorExit */// rmonitor - pre-checked for validity // Not really unknown but ThreadInVMfromNative does more than we want /* Transition to thread_blocked without entering vm state */ /* This is really evil. Normally you can't undo _thread_blocked */ /* transitions like this because it would cause us to miss a */ /* safepoint but since the thread was already in _thread_in_native */ /* the thread is not leaving a safepoint safe state and it will */ /* block when it tries to return from native. We can't safepoint */ /* block in here because we could deadlock the vmthread. Blech. */ // frame should already be walkable since we are in native // restore state, still at a safepoint safe state #
endif /* PROPER_TRANSITIONS */}
/* end RawMonitorWait */// rmonitor - pre-checked for validity // Not really unknown but ThreadInVMfromNative does more than we want }
/* end RawMonitorNotify */// rmonitor - pre-checked for validity }
/* end RawMonitorNotifyAll */ // JNI Function Interception functions // function_table - pre-checked for NULL // Copy jni function table at safepoint. }
/* end SetJNIFunctionTable */// function_table - pre-checked for NULL }
/* end GetJNIFunctionTable */ // Event Management functions // can only generate two event types // for compiled_method_load events we must check that the environment // has the can_generate_compiled_method_load_events capability. }
/* end GenerateEvents */ // Extension Mechanism functions // extension_count_ptr - pre-checked for NULL // extensions - pre-checked for NULL }
/* end GetExtensionFunctions */// extension_count_ptr - pre-checked for NULL // extensions - pre-checked for NULL }
/* end GetExtensionEvents */// callback - NULL is a valid value, must be checked }
/* end SetExtensionEventCallback */// info_ptr - pre-checked for NULL }
/* end GetCurrentThreadCpuTimerInfo */// nanos_ptr - pre-checked for NULL }
/* end GetCurrentThreadCpuTime */// info_ptr - pre-checked for NULL }
/* end GetThreadCpuTimerInfo */// Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked // nanos_ptr - pre-checked for NULL }
/* end GetThreadCpuTime */// info_ptr - pre-checked for NULL // nanos_ptr - pre-checked for NULL // processor_count_ptr - pre-checked for NULL }
/* end GetAvailableProcessors */ // System Properties functions // count_ptr - pre-checked for NULL // property_ptr - pre-checked for NULL // clean up previously allocated memory. for (
int j=0; j<i; j++) {
}
/* end GetSystemProperties */// property - pre-checked for NULL // value_ptr - pre-checked for NULL }
/* end GetSystemProperty */// property - pre-checked for NULL // value - NULL is a valid value, must be checked }
/* end SetSystemProperty */