[m-rev.] for review: add ll_debug GC grade

Ian MacLarty maclarty at csse.unimelb.edu.au
Wed Dec 7 20:20:15 AEDT 2011


On Wed, Dec 7, 2011 at 12:39 PM, Julien Fischer
<juliensf at csse.unimelb.edu.au> wrote:
>
> On Wed, 7 Dec 2011, Ian MacLarty wrote:
>
>> On Wed, Dec 7, 2011 at 11:04 AM, Julien Fischer
>> <juliensf at csse.unimelb.edu.au> wrote:
>>>
>>>
>>> On Wed, 7 Dec 2011, Peter Ross wrote:
>>>
>>>> On 6 December 2011 20:29, Ian MacLarty <maclarty at csse.unimelb.edu.au>
>>>> wrote:
>>>>>
>>>>>
>>>>> For review by Julien.
>>>>>
>>>>> Branches: main, 11.07
>>>>>
>>>>> Add a new GC grade for the .ll_debug Mercury grade.
>>>>>
>>>>> Previously the .ll_debug grade used the usual "gc" GC grade.  This was
>>>>> a
>>>>> problem, because it meant that installing a .ll_debug grade would
>>>>> overwrite the
>>>>> libgc library with the unoptimised .ll_debug version, resulting in a
>>>>> severe
>>>>> performance loss for applications even if they weren't built in the
>>>>> .ll_debug
>>>>> grade.
>>>>>
>>>>> compiler/compile_target_code.m:
>>>>>    Link against the ll_debug GC library if low-level debugging
>>>>>    is enabled.
>>>>>
>>>>> scripts/ml.in:
>>>>>    Use the new ll_debug GC grade for the .ll_debug Mercury
>>>>>    grades.
>>>>>
>>>> Maybe the ll_debug grade should imply the gcd grade?  Rather than
>>>> installing a new version of the gc library.
>>>
>>>
>>>
>>> I disagree.  I use the ll_debug grade quite a bit for debugging programs
>>> written in the hlc grade that make heavy use of the C foreign code.
>>> I have nver required the gcd grades for this; outside of debugging
>>> interactions between the collector and the rest of the system I think
>>> they are of too limited use.
>>
>>
>> But would it hurt to use the .gcd version of boehm in ll_debug grades?
>> In ll_debug grades C optimizations are already turned off, so what
>> difference will also disabling NO_DEBUGGING in boehm make?
>
>
> I'm not sure what the additional effects of adding disabling NO_DEBUGGING
> are.  I know that doing so will enable code within the collector that is
> intended for debugging the collector.
>
>
>> It just seems a bit confusing to have two debug versions of the GC
>> library.
>
>
> Who will it confuse?  The circumstances in which the gcd version is
> actually needed (or even installed) are very rare.
>
>
>> What about the following solution:
>> - Make the .gcd Mercury grade component also imply -g -O0 when building
>> boehm.
>> - Make the .ll_debug Mercury grade component turn off -DNO_DEBUGGING in
>> boehm.
>> (So boehm is built the same way if we're using either .ll_debug or
>> .gcd mercury grade components).
>> - Make the .ll_debug Mercury grade component imply the gc_debug GC
>> grade component (i.e. make it use the .gcd version of boehm).
>
>
> I think it is a solution to a problem that doesn't exist in the first
> place.  Just add the ll_debug component for the .ll_debug grades and be
> done with it.
>

Done (with extra cases in ml.in).  Could you apply it to 11.07?

Ian.

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list