< prev index next > src/hotspot/share/prims/jvmti.xml
Print this page
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="jvmti.xsl"?>
<!--
! Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="jvmti.xsl"?>
<!--
! Copyright (c) 2002, 2026, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.
</param>
<param id="value_ptr">
<outptr><jobject/></outptr>
<description>
On return, points to the variable's value.
+ When preview features are enabled, if the requested local is the
+ "<code>this</code>" object, and "<code>this</code>" is a value
+ object under construction, the value_ptr is set to a snapshot
+ of the "<code>this</code>" object that represents the value
+ object's state at the point the snapshot is taken.
</description>
</param>
</parameters>
<errors>
<error id="JVMTI_ERROR_INVALID_SLOT">
</param>
<param id="value_ptr">
<outptr><jobject/></outptr>
<description>
On return, points to the variable's value.
+ When preview features are enabled, and the local instance is a value
+ object under construction, the value_ptr is set to a snapshot
+ of the "<code>this</code>" object that represents the value
+ object's state at the point the snapshot is taken.
</description>
</param>
</parameters>
<errors>
<error id="JVMTI_ERROR_INVALID_SLOT">
</function>
<function id="GetClassModifiers" phase="start" num="51">
<synopsis>Get Class Modifiers</synopsis>
<description>
! For the class indicated by <code>klass</code>, return the access
! flags
! via <code>modifiers_ptr</code>.
! Access flags are defined in <vmspec chapter="4"/>.
! <p/>
! If the class is an array class, then its public, private, and protected
! modifiers are the same as those of its component type. For arrays of
primitives, this component type is represented by one of the primitive
! classes (for example, <code>java.lang.Integer.TYPE</code>).
<p/>
! If the class is a primitive class, its public modifier is always true,
! and its protected and private modifiers are always false.
<p/>
! If the class is an array class or a primitive class then its final
! modifier is always true and its interface modifier is always false.
! The values of its other modifiers are not determined by this specification.
!
</description>
<origin>jvmdi</origin>
<capabilities>
</capabilities>
<parameters>
</function>
<function id="GetClassModifiers" phase="start" num="51">
<synopsis>Get Class Modifiers</synopsis>
<description>
! For the class indicated by <code>klass</code>, return the Java language
! modifiers and class/interface properties of the corresponding
! <code>java.lang.Class</code> object, via <code>modifiers_ptr</code>.
! <p/>
! The modifiers are encoded as a mask of access-flag bit values defined in
! <vmspec chapter="4"/>. The returned value is not necessarily the value of the
! access_flags item in the class file of <code>klass</code>.
+ In particular, for member, local, or anonymous classes and interfaces, the result
+ may include modifiers represented by access flags from the <code>InnerClasses</code>
+ attribute, such as <code>ACC_STATIC</code>.
+ <p/>
+ The modifiers include, as applicable, the Java Virtual Machine constants for
+ public, private, protected, final, static, abstract, and interface, as well as
+ access-flag bit values for other class/interface properties encoded in the
+ result of invoking <code>java.lang.Class.getModifiers()</code> on the
+ corresponding <code>java.lang.Class</code> object.
+ <p/>
+ If <code>klass</code> is an array class, then its public, private, and
+ protected modifiers are the same as those of its component type. For arrays of
primitives, this component type is represented by one of the primitive
! classes, such as <code>java.lang.Integer.TYPE</code>. For array classes, the
+ abstract and final modifiers are set, and the interface modifier is not set.
<p/>
! If <code>klass</code> is a primitive type or void, then its public, abstract,
! and final modifiers are always set, and its protected, private, and interface
+ modifiers are never set.
<p/>
! When preview features are enabled, the <code>ACC_IDENTITY</code> access flag
! is set if and only if <code>klass</code> is an identity class or an array class.
! <p/>
! When preview features are disabled, the <code>ACC_SUPER</code> access flag may be
+ set only if <code>klass</code> is not a primitive type or void. The flag has no
+ effective meaning.
</description>
<origin>jvmdi</origin>
<capabilities>
</capabilities>
<parameters>
</description>
</param>
<param id="modifiers_ptr">
<outptr><jint/></outptr>
<description>
! On return, points to the current access flags of this class.
</description>
</param>
</parameters>
<errors>
</description>
</param>
<param id="modifiers_ptr">
<outptr><jint/></outptr>
<description>
! On return, points to the modifiers of this class.
</description>
</param>
</parameters>
<errors>
Some methods might not have associated bytecodes and are not
native methods, they instead are executed directly by the
VM. These methods should send this event.
Virtual machines which are incapable of bytecode instrumentation
for some or all of their methods can send this event.
+ When preview features are enabled and the allocated object has no identity,
+ <code>null</code> is passed for the <paramlink id="object"></paramlink> parameter.
Note that the <internallink
id="SampledObjectAlloc">SampledObjectAlloc</internallink>
event is triggered on all Java object allocations, including those
caused by bytecode method execution, JNI method execution, and
</param>
<param id="object">
<jobject/>
<description>
JNI local reference to the object that was allocated.
+ Null when preview features are enabled and the allocated object has no identity.
</description>
</param>
<param id="object_klass">
<jclass/>
<description>
<p/>
A typical use case of this system is to determine where heap allocations originate.
In conjunction with weak references and the function
<functionlink id="GetStackTrace"></functionlink>, a user can track which objects were allocated from which
stack trace, and which are still live during the execution of the program.
+ When preview features are enabled and the allocated object has no identity,
+ <code>null</code> is passed for the <paramlink id="object"></paramlink> parameter.
+ Note that weak references support identity objects only.
</description>
<origin>new</origin>
<capabilities>
<required id="can_generate_sampled_object_alloc_events"></required>
</capabilities>
</param>
<param id="object">
<jobject/>
<description>
JNI local reference to the object that was allocated.
+ Null when preview features are enabled and the allocated object has no identity.
</description>
</param>
<param id="object_klass">
<jclass/>
<description>
<p/>
The event handler must not use JNI functions and
must not use <jvmti/> functions except those which
specifically allow such use (see the raw monitor, memory management,
and environment local storage functions).
+ When preview features are enabled, this event does not support value object allocations.
</description>
<origin>new</origin>
<capabilities>
<required id="can_generate_object_free_events"></required>
</capabilities>
< prev index next >