harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Popov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4390) [drlvm][jvmti] provide compatible JVMTI extension for class unload event
Date Sun, 08 Jul 2007 05:31:06 GMT
[drlvm][jvmti] provide compatible JVMTI extension for class unload event
------------------------------------------------------------------------

                 Key: HARMONY-4390
                 URL: https://issues.apache.org/jira/browse/HARMONY-4390
             Project: Harmony
          Issue Type: New Feature
          Components: JDK
            Reporter: Ivan Popov


JVMTI spec does not include class unload event, but for JDI and JDWP specification this event
is specified as one of basic events. RI provides JVMTI extension for reporting class unload
event. To support this event in Harmony, JDWP agent uses such extension (HARMONY-2891), which
should be provided by DRLVM to complete JPDA support.

JVMTI extension functions can be used to explore extensions provided by Sun and JRockit VM,
here is gathered info:

----------------------------------------------------------------

sun-jre1.5.0_09-win-ia32:

JVMTI version: 1.0.36
Found JVMTI extension functions: 1
  func 0
    id:     com.sun.hotspot.functions.IsClassUnloadingEnabled
    desc:   Tell if class unloading is enabled (-noclassgc)
    params: 1
       param #0
         name:    IsClassUnloadingEnabled
         kind:    96/JVMTI_KIND_OUT
         type:    108/JVMTI_TYPE_JBOOLEAN
         null_ok: 0
    errors: 0
Found JVMTI extension events: 1
  event 0
    id:     com.sun.hotspot.events.ClassUnload
    desc:   CLASS_UNLOAD event
    index:  49
    params: 3
       param #0
         name:    JNI Environment
         kind:    91/JVMTI_KIND_IN
         type:    117/JVMTI_TYPE_JNIENV
         null_ok: 0
       param #1
         name:    Thread
         kind:    91/JVMTI_KIND_IN
         type:    110/JVMTI_TYPE_JTHREAD
         null_ok: 0
       param #2
         name:    Class
         kind:    91/JVMTI_KIND_IN
         type:    111/JVMTI_TYPE_JCLASS
         null_ok: 0

----------------------------------------------------------------

jrockit-R26.4.0-jre1.5.0_06-win-ia32:

JVMTI version: 1.0.33
Found JVMTI extension functions: 1
  func 0
    id:     jrockitPrettyPrintThreadState
    desc:   Takes the result of a thread state query and prints a text representation into
the supplied char buffer.
    params: 3
       param #0
         name:    Thread State
         kind:    91/JVMTI_KIND_IN
         type:    104/JVMTI_TYPE_JINT
         null_ok: 1
       param #1
         name:    Result Buffer
         kind:    97/JVMTI_KIND_OUT_BUF
         type:    115/JVMTI_TYPE_CCHAR
         null_ok: 0
       param #2
         name:    Result Buffer Size
         kind:    91/JVMTI_KIND_IN
         type:    104/JVMTI_TYPE_JINT
         null_ok: 0
    errors: 0
Found JVMTI extension events: 0

----------------------------------------------------------------

Current implementation of JDWP agent (HARMONY-2891) uses only "com.sun.hotspot.events.ClassUnload"
event (if provided) and does not use "com.sun.hotspot.functions.IsClassUnloadingEnabled".


Unfortunately, there are no formal specifications for these extensions and any limitations
for their usage. Simple experiments showed that invoking JVMTI function GetClassSignature()
for a class passed to "com.sun.hotspot.events.ClassUnload" event callback in Sun's JRE 1.5
and 1.6 leads to JVMTI error 115 (JVMTI_ERROR_UNATTACHED_THREAD) and further crash in jvm.dll,
which looks like JVM bug. BEA's JRockit 1.5 does not provide any extensions for ClassUnload
event.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message