Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 36393 invoked from network); 18 Jul 2008 10:01:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 10:01:32 -0000 Received: (qmail 66540 invoked by uid 500); 18 Jul 2008 10:01:30 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 66512 invoked by uid 500); 18 Jul 2008 10:01:30 -0000 Mailing-List: contact dev-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 dev@harmony.apache.org Received: (qmail 66501 invoked by uid 99); 18 Jul 2008 10:01:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 03:01:30 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xiaofeng.li@gmail.com designates 74.125.44.158 as permitted sender) Received: from [74.125.44.158] (HELO yx-out-1718.google.com) (74.125.44.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 10:00:37 +0000 Received: by yx-out-1718.google.com with SMTP id 36so91024yxh.0 for ; Fri, 18 Jul 2008 03:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=iyPfKYwZMdsuf/cTFI1xeCWQiLTKgQPpgmAENyn5XaM=; b=l/lQfzhHcM5Bie//Ks1nMsKutBemY35KAhXpOwaTM78dgCXiYf3Miynee8gp6980RO 2NrFTkGxVLXKlP+LzbjBOaBa2ayxGSaQmsZjkofb0j6icuFSJDK/AFTNX4ap3h2Wzwrr WtchnZQSUTOlmU8ek03PVirjaGOqt8+IggC+8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=dMHVzmHpD9omBnNuYgHyWFDEarUx/BcLXOY6XG63qcEzQYaBWZXOu1CcdXFYFHgIxR GuZb0SS1Kziz4lXS6VG4Z+APA2G2+hpW2tV56aoA1FU74mHB6EE5BeP4GmMloAjB/Ota 1jBLUStusQnIxTTLXdzSPrA3EB2uhlu9HM5WM= Received: by 10.151.12.4 with SMTP id p4mr51077ybi.76.1216375261980; Fri, 18 Jul 2008 03:01:01 -0700 (PDT) Received: by 10.151.13.18 with HTTP; Fri, 18 Jul 2008 03:01:01 -0700 (PDT) Message-ID: <9623c9a50807180301k30ca76cdodf2e79f5096277aa@mail.gmail.com> Date: Fri, 18 Jul 2008 18:01:01 +0800 From: "Xiao-Feng Li" To: dev@harmony.apache.org Subject: Re: clarification on Localizing GC In-Reply-To: <8812c4670807172150l10181ci186610bb51ff893c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8812c4670807171452ted7b05fn5c7de1d8ddd0e59@mail.gmail.com> <9623c9a50807171835m6c9cd9c2hdc81280c626b945d@mail.gmail.com> <8812c4670807172150l10181ci186610bb51ff893c@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Jul 18, 2008 at 12:50 PM, Senaka Fernando wrote: > Hi Xiao-Feng, > > On Fri, Jul 18, 2008 at 7:05 AM, Xiao-Feng Li wrote: > >> On Fri, Jul 18, 2008 at 5:52 AM, Senaka Fernando >> wrote: >> > Hi all, >> > >> > I have few questions regarding localizing the GC. >> > >> > 1. Isn't this buggy (working_vm/vm/gc_gen/src/common/large_pages.cpp:129) >> > >> > if (proc_huge_pages_total * proc_huge_page_size >= required_size) { >> > WARN(("GC large_page: Not enough free large pages, some of reserved >> > space is already busy.")); >> > } else { >> > WARN(("GC large_page: Not enough free large pages, some of reserved >> > space is already busy.")); >> > } >> > >> >> What's the bug you are mentioning? > > > In here, both inside the if and inside the else we have the same code. Why > do we need a if-else here? or is there some mistake made in the warning > message? Ah, yes, this is a bug due to casual copying. Should be fixed. >> >> >> > 2. What's WARN2, and DIE2? where are they defined? >> >> Please try to find their definitions yourself. > > > I couldn't find them defined in any header. And, they lie in code portions > that won't be compiled, or commented source. Maybe the latest code removed the definition. The original definition is like: #define DIE2(category, message) { \ const char* formatted = log_printf message; \ log4cxx_from_c(category, DIE, formatted, __FILE__, __LOG4CXX_FUNC__, __LINE__); \ STD_FREE((void*)formatted); \ shutdown_log_system(); \ abort(); \ } #define WARN2(category, message) { \ if (is_warn_enabled(category)) { \ const char* formatted = log_printf message; \ log4cxx_from_c(category, WARN, formatted, __FILE__, __LOG4CXX_FUNC__, __LINE__); \ STD_FREE((void*)formatted); \ } \ } >> >> >> Thanks, >> xiaofeng > > > Regards, > Senaka > -- http://xiao-feng.blogspot.com