You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ivan Popov (JIRA)" <ji...@apache.org> on 2007/05/17 14:12:17 UTC

[jira] Created: (HARMONY-3894) [drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds and groups

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


[jira] Commented: (HARMONY-3894) [drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds and groups

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498276 ] 

Gregory Shimansky commented on HARMONY-3894:
--------------------------------------------

Hello Eugene. Could you please fix the warning in j.l.ThreadGroup compilation that was added by your patch? I'll commit it if tests pass but new warning is not good.

> [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
>         Assigned To: Gregory Shimansky
>         Attachments: H3894-GetThreadGroupChildren-fix.patch, H3894-Regression-test.patch
>
>
> 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.


[jira] Resolved: (HARMONY-3894) [drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds and groups

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky resolved HARMONY-3894.
----------------------------------------

    Resolution: Fixed

Patch and regression test were applied at 541084. I had to modify the test a bit to make it compile, you used preprocessor not quite correctly. It is not possible to overload macros with different number of their arguments.

Please check that the bug is fixed now.

> [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
>         Assigned To: Gregory Shimansky
>         Attachments: H3894-GetThreadGroupChildren-fix.patch, H3894-Regression-test.patch
>
>
> 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.


[jira] Closed: (HARMONY-3894) [drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds and groups

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov closed HARMONY-3894.
-------------------------------


I verified this in harmony-jdk-r542123 together with HARMONY-3820 . Now Eclipse debugger shows more then 10 threads in a thread group, so the problem looks fixed. Closing this issue.

> [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
>            Assignee: Gregory Shimansky
>         Attachments: H3894-GetThreadGroupChildren-fix.patch, H3894-Regression-test.patch
>
>
> 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.


[jira] Assigned: (HARMONY-3894) [drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds and groups

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky reassigned HARMONY-3894:
------------------------------------------

    Assignee: Gregory Shimansky

> [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
>         Assigned To: Gregory Shimansky
>         Attachments: H3894-GetThreadGroupChildren-fix.patch, H3894-Regression-test.patch
>
>
> 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.


[jira] Updated: (HARMONY-3894) [drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds and groups

Posted by "Eugene S. Ostrovsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene S. Ostrovsky updated HARMONY-3894:
-----------------------------------------

    Attachment: H3894-GetThreadGroupChildren-fix.patch

Added file:
  H3894-GetThreadGroupChildren-fix.patch

Fix for the issue.
Adds getActiveChildren() method to java.lang.ThreadGroup kernel class.
This method provides information used in GetThreadGroupChildren() implementation.

> [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
>         Attachments: H3894-GetThreadGroupChildren-fix.patch, H3894-Regression-test.patch
>
>
> 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.


[jira] Updated: (HARMONY-3894) [drlvm][jvmti] JVMTI function GetThreadGroupChildren() return no more than 10 child threds and groups

Posted by "Eugene S. Ostrovsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene S. Ostrovsky updated HARMONY-3894:
-----------------------------------------

    Attachment: H3894-Regression-test.patch

Added file:
  H3894-Regression-test.patch

Regression test for the issue.

> [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
>         Attachments: H3894-Regression-test.patch
>
>
> 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.