Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-21 Thread Namhyung Kim
Hi Arnaldo, On Mon, Apr 20, 2015 at 06:28:45PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Apr 21, 2015 at 12:22:06AM +0900, Namhyung Kim escreveu: > > Hi Arnaldo, > > > > On Mon, Apr 20, 2015 at 11:00:20AM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Sun, Apr 19, 2015 at 01:04:14PM

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-21 Thread Namhyung Kim
Hi Arnaldo, On Mon, Apr 20, 2015 at 06:28:45PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Apr 21, 2015 at 12:22:06AM +0900, Namhyung Kim escreveu: Hi Arnaldo, On Mon, Apr 20, 2015 at 11:00:20AM -0300, Arnaldo Carvalho de Melo wrote: Em Sun, Apr 19, 2015 at 01:04:14PM +0900,

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Arnaldo Carvalho de Melo
Em Tue, Apr 21, 2015 at 12:22:06AM +0900, Namhyung Kim escreveu: > Hi Arnaldo, > > On Mon, Apr 20, 2015 at 11:00:20AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim escreveu: > > > Currently perf_evsel__hists_browse() function spins on a huge

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Namhyung Kim
Hi Arnaldo, On Mon, Apr 20, 2015 at 11:00:20AM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim escreveu: > > Currently perf_evsel__hists_browse() function spins on a huge loop and > > handles many key actions. Since it's hard to read and modify,

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Arnaldo Carvalho de Melo
Em Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim escreveu: > Currently perf_evsel__hists_browse() function spins on a huge loop and > handles many key actions. Since it's hard to read and modify, let's > split it out into small helper functions. > > The add_XXX_opt() functions are to

[PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Namhyung Kim
Currently perf_evsel__hists_browse() function spins on a huge loop and handles many key actions. Since it's hard to read and modify, let's split it out into small helper functions. The add_XXX_opt() functions are to register popup menu item on the selected entry. When it adds an item, it also

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Namhyung Kim
On Mon, Apr 20, 2015 at 11:46:07AM +0200, Jiri Olsa wrote: > On Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim wrote: > > SNIP > > > continue; > > case 's': > > - if (is_report_browser(hbt)) > > - goto

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Namhyung Kim
On Mon, Apr 20, 2015 at 11:21:59AM +0200, Jiri Olsa wrote: > On Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim wrote: > > SNIP > > > + > > +static int > > +add_script_opt(struct popup_option *opt, char **optstr, > > + struct hist_browser *browser __maybe_unused, > > +

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Jiri Olsa
On Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim wrote: SNIP > continue; > case 's': > - if (is_report_browser(hbt)) > - goto do_data_switch; > + if (is_report_browser(hbt)) { > +

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Jiri Olsa
On Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim wrote: SNIP > + > +static int > +add_script_opt(struct popup_option *opt, char **optstr, > +struct hist_browser *browser __maybe_unused, > +struct thread *thread, struct symbol *sym) > +{ > + if (thread) { > +

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Arnaldo Carvalho de Melo
Em Tue, Apr 21, 2015 at 12:22:06AM +0900, Namhyung Kim escreveu: Hi Arnaldo, On Mon, Apr 20, 2015 at 11:00:20AM -0300, Arnaldo Carvalho de Melo wrote: Em Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim escreveu: Currently perf_evsel__hists_browse() function spins on a huge loop and

[PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Namhyung Kim
Currently perf_evsel__hists_browse() function spins on a huge loop and handles many key actions. Since it's hard to read and modify, let's split it out into small helper functions. The add_XXX_opt() functions are to register popup menu item on the selected entry. When it adds an item, it also

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Namhyung Kim
On Mon, Apr 20, 2015 at 11:46:07AM +0200, Jiri Olsa wrote: On Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim wrote: SNIP continue; case 's': - if (is_report_browser(hbt)) - goto do_data_switch; +

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Namhyung Kim
On Mon, Apr 20, 2015 at 11:21:59AM +0200, Jiri Olsa wrote: On Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim wrote: SNIP + +static int +add_script_opt(struct popup_option *opt, char **optstr, + struct hist_browser *browser __maybe_unused, + struct thread

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Jiri Olsa
On Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim wrote: SNIP continue; case 's': - if (is_report_browser(hbt)) - goto do_data_switch; + if (is_report_browser(hbt)) { +

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Jiri Olsa
On Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim wrote: SNIP + +static int +add_script_opt(struct popup_option *opt, char **optstr, +struct hist_browser *browser __maybe_unused, +struct thread *thread, struct symbol *sym) +{ + if (thread) { +

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Arnaldo Carvalho de Melo
Em Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim escreveu: Currently perf_evsel__hists_browse() function spins on a huge loop and handles many key actions. Since it's hard to read and modify, let's split it out into small helper functions. The add_XXX_opt() functions are to register

Re: [PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-20 Thread Namhyung Kim
Hi Arnaldo, On Mon, Apr 20, 2015 at 11:00:20AM -0300, Arnaldo Carvalho de Melo wrote: Em Sun, Apr 19, 2015 at 01:04:14PM +0900, Namhyung Kim escreveu: Currently perf_evsel__hists_browse() function spins on a huge loop and handles many key actions. Since it's hard to read and modify, let's

[PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-18 Thread Namhyung Kim
Currently perf_evsel__hists_browse() function spins on a huge loop and handles many key actions. Since it's hard to read and modify, let's split it out into small helper functions. The add_XXX_opt() functions are to register popup menu item on the selected entry. When it adds an item, it also

[PATCH 6/7] perf hists browser: Split popup menu actions

2015-04-18 Thread Namhyung Kim
Currently perf_evsel__hists_browse() function spins on a huge loop and handles many key actions. Since it's hard to read and modify, let's split it out into small helper functions. The add_XXX_opt() functions are to register popup menu item on the selected entry. When it adds an item, it also