Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-26 Thread Feng Tang
Hi Namhyung, On Thu, Sep 27, 2012 at 01:02:05PM +0900, Namhyung Kim wrote: > Hi Feng, > > On Wed, 26 Sep 2012 15:57:07 +0800, Feng Tang wrote: > > On Tue, Sep 25, 2012 at 08:17:03AM -0300, Arnaldo Carvalho de Melo wrote: > >> Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu: > >> >

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-26 Thread Namhyung Kim
Hi Feng, On Wed, 26 Sep 2012 15:57:07 +0800, Feng Tang wrote: > On Tue, Sep 25, 2012 at 08:17:03AM -0300, Arnaldo Carvalho de Melo wrote: >> Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu: >> > On Tue, 25 Sep 2012 11:11:21 +0900 >> > Namhyung Kim wrote: >> > > Ditto. Plus it might

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-26 Thread Feng Tang
On Tue, Sep 25, 2012 at 08:17:03AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu: > > On Tue, 25 Sep 2012 11:11:21 +0900 > > Namhyung Kim wrote: > > > Ditto. Plus it might leak previous input_name. > > > > Nice catch, will check the return

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-26 Thread Feng Tang
On Tue, Sep 25, 2012 at 08:17:03AM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu: On Tue, 25 Sep 2012 11:11:21 +0900 Namhyung Kim namhy...@kernel.org wrote: Ditto. Plus it might leak previous input_name. Nice catch, will check the

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-26 Thread Namhyung Kim
Hi Feng, On Wed, 26 Sep 2012 15:57:07 +0800, Feng Tang wrote: On Tue, Sep 25, 2012 at 08:17:03AM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu: On Tue, 25 Sep 2012 11:11:21 +0900 Namhyung Kim namhy...@kernel.org wrote: Ditto. Plus it

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-26 Thread Feng Tang
Hi Namhyung, On Thu, Sep 27, 2012 at 01:02:05PM +0900, Namhyung Kim wrote: Hi Feng, On Wed, 26 Sep 2012 15:57:07 +0800, Feng Tang wrote: On Tue, Sep 25, 2012 at 08:17:03AM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu: On Tue, 25

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-25 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu: > On Tue, 25 Sep 2012 11:11:21 +0900 > Namhyung Kim wrote: > > Ditto. Plus it might leak previous input_name. > > Nice catch, will check the return value of "strdup". > > For input_name mem leak, in some cases the input_name can't

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-25 Thread Feng Tang
On Tue, 25 Sep 2012 11:11:21 +0900 Namhyung Kim wrote: > On Mon, 24 Sep 2012 23:24:10 +0800, Feng Tang wrote: > [snip] > > + if (!check_perf_magic(magic)) { > > + options[nr_options] = strdup(name); > > + abs_path[nr_options++] = strdup(path); > >

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-25 Thread Feng Tang
On Tue, 25 Sep 2012 11:11:21 +0900 Namhyung Kim namhy...@kernel.org wrote: On Mon, 24 Sep 2012 23:24:10 +0800, Feng Tang wrote: [snip] + if (!check_perf_magic(magic)) { + options[nr_options] = strdup(name); + abs_path[nr_options++] =

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-25 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu: On Tue, 25 Sep 2012 11:11:21 +0900 Namhyung Kim namhy...@kernel.org wrote: Ditto. Plus it might leak previous input_name. Nice catch, will check the return value of strdup. For input_name mem leak, in some cases the

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-24 Thread Namhyung Kim
On Mon, 24 Sep 2012 23:24:10 +0800, Feng Tang wrote: [snip] > + if (!check_perf_magic(magic)) { > + options[nr_options] = strdup(name); > + abs_path[nr_options++] = strdup(path); Need to check return values. > + } > +

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-24 Thread Namhyung Kim
On Mon, 24 Sep 2012 23:24:10 +0800, Feng Tang wrote: [snip] + if (!check_perf_magic(magic)) { + options[nr_options] = strdup(name); + abs_path[nr_options++] = strdup(path); Need to check return values. + } +