lkml.org 
[lkml]   [2015]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/7] perf hists browser: Split popup menu actions
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 *thread, struct symbol *sym)
> > +{
> > + if (thread) {
> > + if (asprintf(optstr, "Run scripts for samples of thread [%s]",
> > + thread__comm_str(thread)) < 0)
> > + return 0;
> > + } else if (sym) {
>
> there's also check for sym->namelen in the original code

Ah, right. I'll change it.

But I wonder there's a case 'sym && !sym->namelen' though..

Thanks,
Namhyung


>
> > + if (asprintf(optstr, "Run scripts for samples of symbol [%s]",
> > + sym->name) < 0)
> > + return 0;
> > + } else {
> > + if (asprintf(optstr, "Run scripts for all samples") < 0)
> > + return 0;
> > + }
> > +
> > + opt->thread = thread;
> > + opt->sym = sym;
> > + opt->fn = do_run_script;
> > +
> > + return 1;
> > +}
>
> SNIP


\
 
 \ /
  Last update: 2015-04-20 15:01    [W:0.088 / U:2.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site