You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrey Yakushev (JIRA)" <ji...@apache.org> on 2007/02/19 11:18:05 UTC

[jira] Updated: (HARMONY-2059) [drlvm] ThreadMXBean native methods implementation

     [ https://issues.apache.org/jira/browse/HARMONY-2059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Yakushev updated HARMONY-2059:
-------------------------------------

    Attachment: jlm_drlvm_tm_support.v2.patch

I've tried to rebase and modify jlm_drlvm_tm_support.patch according to Salikh's issues:

> I have reviewed the patch and noticed following issues:
>
> Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_findMonitorDeadlockedThreadsImpl(): leaks threads and dead_threads
>
> Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getAllThreadIdsImpl(): leaks threads
>
> Java_org_apache_harmony_lang_management_ThreadMXBeanImpl_getDaemonThreadCountImpl(): leaks threads

Fixed

> Several global variables introduced, which should have been made HyThreadLibrary fields instead.
> vm/thread/src/thread_ti_timing.c: thread_cpu_time_enabled,
> vm/thread/src/thread_ti_others: thread_contention_monitoring_enabled, total_started_thread_count, peak_thread_count

I think all these variables should be localized in the VM instance. Will we have different HyThreadLibrary instances for each VM instance or shared one? I suggest leaving these variables global at present as other VM instance locals.

> FIXMEs in the patch look like they should be fixed before committing:
> update_peak_count():
> // FIXME: exclude iterator and use global alive_java_thread_count
> I think it should be fixed before committing.

Fixed

> // FIXME: there are two different ids for one thread now - one returned by
> // java.lang.Thread.getId() and the other returned by hythread_get_id(native thread).
> // They have to be the same.
> // This method returns the same id as java.lang.Thread.getId()
>
> // FIXME: there are two different ids for one thread now - one returned by
> // java.lang.Thread.getId() and the other returned by hythread_get_id(native thread).
> // They have to be the same and iterator have to be excluded here.
> // The parameter of the method is the same id as java.lang.Thread.getId()

Really it is known DRLVM issue which is not related to java.lang.management implementation.
I rewrote the code, removed these FIXME and put problem description to Wiki: http://wiki.apache.org/harmony/KnownNonBugIssuesAndLimitations issue #12.

New patch file name is jlm_drlvm_tm_support.v2.patch. Checked at win32 and linux32/64.

Salikh, could you please review the new patch version.

Thanks,
Andrey
 



> [drlvm] ThreadMXBean native methods implementation
> --------------------------------------------------
>
>                 Key: HARMONY-2059
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2059
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Sergey Petrovsky
>         Attachments: jlm_drlvm_tm_support.patch, jlm_drlvm_tm_support.v2.patch
>
>
> Replaces ThreadMXBean stubs from HARMONY-1821 with real implementation

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