harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li" <xiaofeng...@gmail.com>
Subject Re: clarification on Localizing GC
Date Fri, 18 Jul 2008 10:01:01 GMT
On Fri, Jul 18, 2008 at 12:50 PM, Senaka Fernando <senakafdo@gmail.com> wrote:
> Hi Xiao-Feng,
>
> On Fri, Jul 18, 2008 at 7:05 AM, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:
>
>> On Fri, Jul 18, 2008 at 5:52 AM, Senaka Fernando <senakafdo@gmail.com>
>> 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

Mime
View raw message