Re: [PATCH] perf report: Add a simple GTK2-based 'perf report' browser

From: Pekka Enberg
Date: Fri Feb 24 2012 - 01:36:58 EST


On Fri, Feb 24, 2012 at 2:58 AM, Namhyung Kim <namhyung.kim@xxxxxxx> wrote:
>> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
>> index e011b50..371f114 100644
>> --- a/tools/perf/Makefile
>> +++ b/tools/perf/Makefile
>> @@ -485,6 +485,20 @@ else
>>        endif
>>  endif
>>
>> +ifdef NO_GTK2
>> +       BASIC_CFLAGS += -DNO_GTK2
>
>
> s/-DNO_GTK2/-DNO_GTK2_SUPPORT/ ?

Fixed.

>> +       if (strcmp(report.input_name, "-") != 0) {
>> +               if (report.use_gtk)
>> +                       perf_gtk_setup_browser(argc, argv, true);
>> +               else
>> +                       setup_browser(true);
>> +       } else
>
>
> Wouldn't it be better if setup_browser() handled this internally based on
> the value of use_browser?

Well yes, but that requires some more code shuffling so I'd like to
leave it like that for now.

>> diff --git a/tools/perf/util/gtk/browser.c b/tools/perf/util/gtk/browser.c
>> new file mode 100644
>> index 0000000..4878279
>> --- /dev/null
>> +++ b/tools/perf/util/gtk/browser.c
>
>
> I think it needs to be moved under util/ui. There will be some share point
> between tui and gui IMHO. Otherwise, if it is too much depends on TUI, how
> about rename util/ui to util/tui?

What's with you perf guys and deeply nested directory hierarchies? :-)

I think we should keep tools/ui but move the TUI specific bits out of
there. But as I said earlier, the code needs some work to support GTK
and TUI cleanly.

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