Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 50298 invoked from network); 6 Mar 2009 13:14:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 13:14:20 -0000 Received: (qmail 37281 invoked by uid 500); 6 Mar 2009 13:14:18 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 37203 invoked by uid 500); 6 Mar 2009 13:14:18 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 37185 invoked by uid 99); 6 Mar 2009 13:14:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 05:14:17 -0800 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; Fri, 06 Mar 2009 13:14:17 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C4D35234C4AB for ; Fri, 6 Mar 2009 05:13:56 -0800 (PST) Message-ID: <631117647.1236345236805.JavaMail.jira@brutus> Date: Fri, 6 Mar 2009 05:13:56 -0800 (PST) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3731) Improve calculation of refSize in ClassSize.java In-Reply-To: <1481704965.1213911705179.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/DERBY-3731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679584#action_12679584 ] Kristian Waagan commented on DERBY-3731: ---------------------------------------- Thanks for looking at the patch, Kim. As far as I know, several JVMs use the "sun.arch.data.model", but I also think it is an undocumented feature of the Sun JVM. That's why it is optional, and Derby has other mechanisms to determine the "bitness". The nice thing about the property is that it gives a definite answer if it is present (although it can be "unknown" I think). The logic for "os.arch" depends on knowing the architecture, and if an entry for a specific architecture hasn't been added, we can't conclude on the bitness. In these cases, the original heuristic will be used, which isn't working in all cases (i.e. Derby may use the wrong bitness, which affects size calculations). I know at least some versions of the IBM JVM use "sun.arch.data.model". The IBM JVMs also have their own version of this property: com.ibm.vm.bitmode > Improve calculation of refSize in ClassSize.java > ------------------------------------------------- > > Key: DERBY-3731 > URL: https://issues.apache.org/jira/browse/DERBY-3731 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.5.0.0 > Reporter: Kathey Marsden > Assignee: Kristian Waagan > Priority: Minor > Fix For: 10.4.2.1, 10.5.0.0 > > Attachments: derby-3731-1a-refsize_from_properties.diff, derby-3731-1b-refsize_from_properties.diff, derby-3731-1b-refsize_from_properties.stat, derby-3731-1c-refsize_from_properties.diff, derby-3731-2a_update_of_policy_template.diff, derby-3731-3a-doc_changes.diff, DERBY-3731_diff.txt > > > java/engine/org/apache/derby/iapi/services/cache/ClassSize.java has a static code block which calculates the size of a reference for the architecture. This code could be improved by adding garbage collection before measuring memory, to give a consistent reading. Also there have been suggestions that we use os.arch or sun.arch.data.model to make the measurement more reliable, especially on 64bit machines. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.