Profile mode maintenance patch

François Dumont frs.dumont@gmail.com
Mon Oct 6 20:29:00 GMT 2014


On 06/10/2014 11:28, Jonathan Wakely wrote:
> On 04/10/14 22:54 +0200, François Dumont wrote:
>> On 23/09/2014 13:27, Jonathan Wakely wrote:
>>>
>>> Yes, OK for trunk - thanks very much.
>>>
>> Hi
>>
>>    There was in fact one last test failing, ext/profile/mh.cc, a 
>> profile mode specific test. It must have been failing for quite a 
>> while since malloc hooks has been deprecated.
>
> I don't understand why that would make it fail, deprecated doesn't
> mean it doesn't work.
>
> However, the declaration of __malloc_initialize_hook has changed at
> some point between glibc 2.11 and 2.18, so the test doesn't compile
> for me on Fedora 20.
>
> Secondly, the test is useless if it isn't actually run, so the
> { dg-do compile } must be removed.
>
> Finally, the test returns 1, so even if it is executed it causes a
> FAIL.
>
> What a mess.
>
>> It is normally testing the profile mode protection against recursion 
>> if memory allocation functions are redefined. It was based on malloc 
>> but we use in fact new operator. So I rewrite the test using 
>> new/delete operators.
>
> OK.
>
>>    This new test version is attached, I removed those 2 lines at the 
>> beginning:
>>
>> // { dg-do compile { target *-*-linux* *-*-gnu* } }
>> // { dg-xfail-if "" { uclibc } { "*" } { "" } }
>>
>>    I think that this test can now be executed and see no reason why 
>> it should fail with uclibc. Do you confirm ?
>
> Yes, the test should be portable now, and should actually PASS.
Yes, it does.
>
> The name of the test doesn't make much sense now though, maybe rename
> it from mh.cc to replace_new.cc or something.
>
>>    I attached the full patch again. I also remove useless virtual 
>> destructor or methods, no need for polymorphism.
>
> OK.
>
> (I still think we should just remove the whole Profile Mode ...)
>
>
Ok, now that I maintain it I hope you that it will at least not bother 
you anymore. At least not after I have commit my modifications.

So last question, I don't know how to present the patch in the 
ChangeLog. Can I go with simply this:

2014-10-06  François Dumont  <fdumont@gcc.gnu.org>

     Major maintenance patch of the profile mode.
     * include/profile/impl/profiler.h
     * include/profile/impl/profiler_container_size.h
     * include/profile/impl/profiler_hash_func.h
     * include/profile/impl/profiler_hashtable_size.h
     * include/profile/impl/profiler_list_to_slist.h
     * include/profile/impl/profiler_list_to_vector.h
     * include/profile/impl/profiler_map_to_unordered_map.h
     * include/profile/impl/profiler_node.h
     * include/profile/impl/profiler_trace.h
     * include/profile/impl/profiler_vector_size.h
     * include/profile/impl/profiler_vector_to_list.h
     * include/profile/iterator_tracker.h
     * include/profile/list
     * include/profile/map.h
     * include/profile/multimap.h
     * include/profile/multiset.h
     * include/profile/ordered_base.h
     * include/profile/set.h
     * include/profile/unordered_base.h
     * include/profile/unordered_map
     * include/profile/unordered_set
     * include/profile/vector
     * testsuite/ext/profile/mh.cc: Rename into...
     * testsuite/ext/profile/replace_new.cc: ... this and fix test.

François



More information about the Libstdc++ mailing list