On Tue, Nov 12, 2019 at 10:01 AM Martin Liška <mli...@suse.cz> wrote: > > On 11/12/19 9:39 AM, Richard Biener wrote: > > On Tue, Nov 12, 2019 at 8:50 AM Martin Liška <mli...@suse.cz> wrote: > >> > >> On 11/11/19 3:20 PM, Richard Biener wrote: > >>> On Mon, Nov 11, 2019 at 9:23 AM Martin Liška <mli...@suse.cz> wrote: > >>>> > >>>> Hi. > >>>> > >>>> The small patch is about sorting of debug counter > >>>> values. > >>>> > >>>> Ready to be installed? > >>> > >>> OK > >>> > >>>> Thanks, > >>>> Martin > >> > >> Hi. > >> > >> There's a small follow up where I enforce the sorting via a selftest. > > > > Well, it's either a bit over-engineering unless you also make use of this > > and > > optimize > > My motivation was to preserve sorted list in -dbg-cnt-list.
Ah, OK, that makes sense. OTOH the function printing could just sort it itself. > > > > int i; > > for (i = debug_counter_number_of_counters - 1; i >= 0; i--) > > if (strcmp (map[i].name, name) == 0) > > break; > > > > no? > > Heh, that can be rewritten to vec::bsearch, but would need to convert 'map' > to a 'vec' type. Or ideally to use a hash_map, but it will probably not pay > back. > > I don't insist on the patch :) Well, the above motivation is a good one so I guess ... OK. Richard. > Martin > > > > >> Ready for trunk? > >> Thanks, > >> Martin >