IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Using the JVMTI > IBM JVMTI extensions - API reference



Querying JVM log options

You can query the JVM log options that are set for a JVM using the QueryVmLogOptions() API.

The QueryVmLogOptions() API has the JVMTI Extension Function identifier com.ibm.QueryVmLogOptions. The identifier is declared as macro COM_IBM_QUERY_VM_LOG_OPTIONS in ibmjvmti.h.

To query the current JVM log options, use:

jvmtiError QueryVmLogOptions(jvmtiEnv* jvmti_env, jint buffer_size, void* options, 
jint* data_size_ptr)
This extension returns the current log options as an ASCII string. The syntax of the string is the same as the -Xlog command-line option, with the initial -Xlog: omitted. For example, the string "error,warn" indicates that the JVM is set to log error and warning messages only. For more information about using the -Xlog option, see JVM command-line options. If the memory buffer is too small to contain the current JVM log option string, you can expect the following results:

Parameters:

jvmti_env: A pointer to the JVMTI environment.

buffer_size: The size of the supplied memory buffer in bytes.

options_buffer: A pointer to the supplied memory buffer.

data_size_ptr: A pointer to a variable, used to return the total size of the option string.

Returns:

JVMTI_ERROR_NONE: Success

JVMTI_ERROR_NULL_POINTER: The options or data_size_ptr parameters are null.

JVMTI_ERROR_INVALID_ENVIRONMENT: The jvmti_env parameter is invalid.

JVMTI_ERROR_WRONG_PHASE: The extension has been called outside the JVMTI live phase.

JVMTI_ERROR_ILLEGAL_ARGUMENT: The supplied memory buffer is too small.


Parent: IBM JVMTI extensions - API reference








Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.