Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 38372 invoked from network); 12 Mar 2008 12:24:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2008 12:24:16 -0000 Received: (qmail 49111 invoked by uid 500); 12 Mar 2008 12:24:14 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 49013 invoked by uid 500); 12 Mar 2008 12:24:13 -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 49004 invoked by uid 99); 12 Mar 2008 12:24:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2008 05:24:13 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2008 12:23:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4DEBC234C09A for ; Wed, 12 Mar 2008 05:22:46 -0700 (PDT) Message-ID: <34959931.1205324566318.JavaMail.jira@brutus> Date: Wed, 12 Mar 2008 05:22:46 -0700 (PDT) From: "Mikhail Fursov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Assigned: (HARMONY-5584) [drlvm][jit][opt][performance] Inliner heuristics improvements: hotness and instance initializer bonuses In-Reply-To: <466781985.1204903786182.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-5584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mikhail Fursov reassigned HARMONY-5584: --------------------------------------- Assignee: Mikhail Fursov > [drlvm][jit][opt][performance] Inliner heuristics improvements: hotness and instance initializer bonuses > -------------------------------------------------------------------------------------------------------- > > Key: HARMONY-5584 > URL: https://issues.apache.org/jira/browse/HARMONY-5584 > Project: Harmony > Issue Type: Improvement > Environment: all > Reporter: Aleksey Shipilev > Assignee: Mikhail Fursov > Attachments: H5584-inliner-heuristics.patch > > > During the profiling of Scimark2 [1] it was found that inliner misses the inline opportunities for monte_carlo. > This is the code for hottest method: > public static final double integrate(int Num_samples) > { > Random R = new Random(SEED); > int under_curve = 0; > for (int count=0; count { > double x= R.nextDouble(); > double y= R.nextDouble(); > if ( x*x + y*y <= 1.0) > under_curve ++; > > } > return ((double) under_curve / Num_samples) * 4.0; > } > Problems are: > 1. nextDouble is not inlined > 2. nextDouble is internally synchronized > Attached patch solves these two problems: > 1. fixing hotness bonus calculation. This is the issue Random.nextDouble() hit on: this method called in hot cycle and missing inline opportunity due to glitch in scaling function, which should be more additive rather than multiplicative. > 2. introducing instance initializer bonus. This helps to inline constructor with all corresponding methods to help scalar replacement with scalarizing of R (and eliminating synchronization too). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.