Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 27078 invoked from network); 31 Aug 2007 10:52:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Aug 2007 10:52:55 -0000 Received: (qmail 12374 invoked by uid 500); 31 Aug 2007 10:52:50 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 12286 invoked by uid 500); 31 Aug 2007 10:52:50 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 12277 invoked by uid 99); 31 Aug 2007 10:52:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2007 03:52:50 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2007 10:53:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EBC40714213 for ; Fri, 31 Aug 2007 03:52:31 -0700 (PDT) Message-ID: <32287339.1188557551963.JavaMail.jira@brutus> Date: Fri, 31 Aug 2007 03:52:31 -0700 (PDT) From: "Aleksey Shipilev (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4705) [drlvm][jni] JNI transition uses ineffective TLS get In-Reply-To: <7923674.1188557310532.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Shipilev updated HARMONY-4705: -------------------------------------- Description: For now, JNI transition uses ineffective scheme of TLS getting - it is done via several recursive calls, finally reaching hythread_self(). The idea is to inline helper for TLS get instead of calling get_thread_ptr_stub(). Disassembly shows that 10 push/pops and 3 calls are completely eliminated there, keeping in mind that TLS get occurs at least 3 times on each JNI transition this give us a huge boost, eliminating up to 30 push/pops and 9 calls. JNI microtest (calling several millions of empty JNI methods) testifies this: $ ../../Builds/Harmony-clean/bin/java -cp . -Xmx128m -Xms128m nalog.nalog iteration: 0 millis:8763 iteration: 1 millis:8722 iteration: 2 millis:8833 $ ../../Builds/Harmony-fastTLS-1/bin/java -cp . -Xmx128m -Xms128m nalog.nalog iteration: 0 millis:6780 iteration: 1 millis:6689 iteration: 2 millis:6870 was: For now, JNI transition uses ineffective scheme of TLS getting - it is done via several recursive calls, finally reaching hythread_self(). The idea is to inline helper for TLS get instead of calling get_thread_ptr_stub(). Disassembly shows that 10 push/pops and 3 calls are completely eliminated there, keeping in mind that TLS get occurs at least 3 times on each JNI transition this give us a huge boost there, eliminating up to 30 push/pops and 9 calls. > [drlvm][jni] JNI transition uses ineffective TLS get > ---------------------------------------------------- > > Key: HARMONY-4705 > URL: https://issues.apache.org/jira/browse/HARMONY-4705 > Project: Harmony > Issue Type: Improvement > Components: DRLVM > Reporter: Aleksey Shipilev > > For now, JNI transition uses ineffective scheme of TLS getting - it is done via several recursive calls, finally reaching hythread_self(). > The idea is to inline helper for TLS get instead of calling get_thread_ptr_stub(). Disassembly shows that 10 push/pops and 3 calls are completely eliminated there, keeping in mind that TLS get occurs at least 3 times on each JNI transition this give us a huge boost, eliminating up to 30 push/pops and 9 calls. > JNI microtest (calling several millions of empty JNI methods) testifies this: > $ ../../Builds/Harmony-clean/bin/java -cp . -Xmx128m -Xms128m nalog.nalog > iteration: 0 millis:8763 > iteration: 1 millis:8722 > iteration: 2 millis:8833 > $ ../../Builds/Harmony-fastTLS-1/bin/java -cp . -Xmx128m -Xms128m nalog.nalog > iteration: 0 millis:6780 > iteration: 1 millis:6689 > iteration: 2 millis:6870 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.