Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 17029 invoked from network); 9 Aug 2006 20:41:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Aug 2006 20:41:13 -0000 Received: (qmail 77852 invoked by uid 500); 9 Aug 2006 20:41:12 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 77816 invoked by uid 500); 9 Aug 2006 20:41:12 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 77803 invoked by uid 99); 9 Aug 2006 20:41:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Aug 2006 13:41:12 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Aug 2006 13:41:11 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 41EDC7141F2 for ; Wed, 9 Aug 2006 20:38:27 +0000 (GMT) Message-ID: <4188049.1155155907267.JavaMail.jira@brutus> Date: Wed, 9 Aug 2006 13:38:27 -0700 (PDT) From: "Andrey Chernyshev (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Created: (HARMONY-1125) [DRLVM] Thread Manager component contribution MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [DRLVM] Thread Manager component contribution --------------------------------------------- Key: HARMONY-1125 URL: http://issues.apache.org/jira/browse/HARMONY-1125 Project: Harmony Issue Type: Improvement Components: Contributions Reporter: Andrey Chernyshev This patch is an improvement for DRLVM which consolidates it's threading subsystem into a single component - Thread Manager. The attached bundle consists of two parts: 1) ThreadManager-09-08e.zip - Thread Manager code, tests and documentation (it has to be unzipped into drlvm/trunk directory) 2) DRLVM-update-for-new-ThreadManager-09-08e.diff - Patch that integrates Thread Manager into DRLVM. The primary purpose of this update is to make a step toward archiving a better modularity within the DRLVM, as well as do some enhancements over its threading subsystem. This is the result of refactoring of the threading-related code in the DRLVM into a separate library which is now implemented on top of the Apache Porting Layer. Here is the summary of enhancements that were made: - Threading becomes a modular component in JVM with a well-defined interface (one may try playing now with the different threading implementations without rewriting random pieces of the drlvm code); - Thread Manager is implemented on top of APR which may help to simplify it's porting to other platforms (the only platform dependent piece is JIT helpers) - Java monitors are reimplemented such that: - Performance is improved with help of the lock reservation algorithm (see http://portal.acm.org/citation.cfm?id=582433) - Recursion overflow condition is now handled correctly - Thread creation overhead is decreased; - Java threads now are always created at the single place; - Miscellaneous threading bugs went away, for example: hangs during thread stress tests, crashes on sleep(), incorrect reporting of JVMTI state and others. Note that the low-level (or "native") interface of the Thread Manager has been designed to be hythread-compatible with the intent of having classlib and DRLVM sharing the same threading library. It also adds a certain extensions to the original hythread which were required by drlvm (located in hythread_ext.h). However, these functions can still be easily renamed from hythread_* to something else if people believe this idea is wrong. Thread Manager comes with the extensive documentation which uncovers some of the details of the DRLVM's threading subsystem (you may find it at vm/thread/doc/ThreadManager.htm). There is also a set of unit tests for Thread Manager (located at vm/tests/unit) those framework can probably be used for the further unit tests development for other modules in DRLVM. The integration patch consists of the following pieces: build/make/* - changes necessary to include unit tests and accommodate new threading structure build/patches/*/APR - quick fixes to a few bugs in the APR: apr_thread_cond on Windows, apr_thread_yield on Linux. Note that the Thread Manager implementation requires a certain funct-ty which appeared to be beyond the APR, these additional functions were added for now at vm\port\include\apr_thread_ext.h: apr_thread_set_priority() apr_memory_rw_barrier() apr_thread_yield_other() apr_thread_times() apr_thread_cancel() If we find this code useful we may try proposing them back to the APR project. vm/vmcore/src/thread/* - These files contained old threading code which is now either completely removed or re-mapped into new Thread Manager. vm/vmcore/src/thread/hythr/ - it was "hythread" emulation library, now it is replaced with the more funcitonal "native" layer of the Thread Manager (which still implements the most of hythread_* API). vm/port/src/encoder/* - added support for ROR instruction to the encoder Other changes were done as required to replace the references to the old threading code with the calls/references to the new Thread Manager. Thank you, Andrey Chernyshev Intel Middleware Products Division -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira