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-3894) [drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds and groups
Date Thu, 17 May 2007 12:12:17 GMT
[drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds
and groups
-----------------------------------------------------------------------------------------------------

                 Key: HARMONY-3894
                 URL: https://issues.apache.org/jira/browse/HARMONY-3894
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: Windows, Linux, harmony-hdk-r538813
            Reporter: Ivan Popov


Implementation of JVMTI function GetThreadGroupChildren() uses internal arrays of 10 elements
to return child threads and groups (see jvmti_thred_group.cpp):

    jclass cl = GetObjectClass(jvmti_test_jenv, group);
    jobjectArray jg = jvmti_test_jenv -> NewObjectArray(10, cl, 0);
    jmethodID id = jvmti_test_jenv -> GetMethodID(cl, "enumerate","([Ljava/lang/ThreadGroup;)I");
    int cc = jvmti_test_jenv -> CallIntMethod (group, id, jg);

    jclass cll = struct_Class_to_java_lang_Class_Handle(VM_Global_State::loader_env->java_lang_Thread_Class);
    jobjectArray jt = jvmti_test_jenv -> NewObjectArray(10, cll, 0);
    id = jvmti_test_jenv -> GetMethodID(cl, "enumerate","([Ljava/lang/Thread;Z)I");
    cc = jvmti_test_jenv -> CallIntMethod (group, id, jt, JNI_FALSE);

The other problem is that used ThreadGroup methods with array argument are not precise and
may report not all threads and groups. Instead, similar methods with List argument should
be used.


-- 
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