Re: [PATCH 08/13] perf gtk/browser: Add support for event group view

From: Arnaldo Carvalho de Melo
Date: Wed Jan 16 2013 - 13:28:54 EST


Em Wed, Jan 16, 2013 at 07:25:02PM +0900, Namhyung Kim escreveu:
> Adding current header name to event name will fix the problem but it
> probably occupies too much screen width especially for long named
> tracepoint or PMU-specific events like
> "compaction:mm_compaction_isolate_migratepages".
>
> Overhead/branches Overhead/branch-misses sys/branches sys/branch-misses usr/branches usr/branch-misses Command Shared Object Symbol
> ................. ...................... ............ ................. ............ ................. ....... ............. .......
> 98.32% 31.16% 0.00% 0.00% 98.32% 31.16% a.out a.out [.] foo
>
>
> If you have a better idea or other way to place the cursor without
> printing bogus 0.00% on GTK, please let me know.

Compacting it using an extra line:

Overhead............... sys.................... usr....................
branches branch-misses branches branch-misses branches branch-misses Command Shared Object Symbol
........ ............. ........ ............. ........ ............. ....... ............. .......
98.32% 31.16% 0.00% 0.00% 98.32% 31.16% a.out a.out [.] foo

It could even use some reference:

Overhead..................... sys......... usr...........
branches(1) branch-misses(2) (1) (2) (1) (2) Command Shared Object Symbol
........... ................ ..... ..... ...... ...... ....... ............. .......
98.32% 31.16% 0.00% 0.00% 98.32% 31.16% a.out a.out [.] foo

The (1) could be done with a superscript number or even just using a
different fore/background color, to use fewer columns.

One other way, that would scale for really long event names, would be to
have the event list in the first few lines and then:

Events:
1. branches
2. branch-misses

Overhead...... sys......... usr...........
(1) (2) (1) (2) (1) (2) Command Shared Object Symbol
...... ...... ..... ..... ...... ...... ....... ............. .......
98.32% 31.16% 0.00% 0.00% 98.32% 31.16% a.out a.out [.] foo

I think you could switch to/from each of these forms using a hotkey,
that would influence how the hist_entry__snprintf() routine would work,
either using perf_evsel__name() or evsel->idx :-)

This way if at some point the user wants to expand/compress the lines,
it will be possible to do so quickly, just pressing the hotkey.

- 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/