Re: [PATCH 5/5] perf diff: Fix support for all --sort combinations

From: Arnaldo Carvalho de Melo
Date: Mon Dec 28 2009 - 19:55:15 EST


Em Mon, Dec 28, 2009 at 10:48:36PM -0200, Arnaldo Carvalho de Melo escreveu:
> From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>
> When we finish creating the hist_entries we _already_ have them sorted "by
> name", in fact by what is in --sort, that is exactly how we can find the pairs
> in perf_session__match_hists as 'comm', 'dso' & 'symbol' all are strings we
> need to find the matches in the baseline session.
>
> So only do the sort by hits followed by a resort by --sort if we need to find
> the position for shwowing the --displacement of hist entries.
>
> Now all these modes work correctly:
>
> Example is a simple 'perf record -f find / > /dev/null' ran twice then followed
> by the following commands:
>
> $ perf diff -f --sort comm
> # Baseline Delta Command
> # ........ .......... .......
> #
> 0.00% +100.00% find

Dammit, of course this one needs some more love... will work on it
tomorrow, the others, humm, _should_ be right.

Its late, I should be having some rest already, I guess, or whatever
:-)

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/