On Sun, Feb 24, 2019 at 07:37:18AM -0800, Andi Kleen wrote:

SNIP

> +                     endtime += 1*1000000;
> +             }
> +             timestamp__scnprintf_usec(starttime, start, sizeof start);
> +             timestamp__scnprintf_usec(endtime, end, sizeof end);
> +             n += snprintf(script_opt + n, len - n, " --time %s,%s", start, 
> end);
> +     }
> +
>       script_browse(script_opt);
> +     free(script_opt);
>       return 0;
>  }
>  
>  static int
> -add_script_opt(struct hist_browser *browser __maybe_unused,
> +add_script_opt_2(struct hist_browser *browser __maybe_unused,
>              struct popup_action *act, char **optstr,
> -            struct thread *thread, struct symbol *sym)
> +            struct thread *thread, struct symbol *sym,
> +            const char *tstr)
>  {
> +
>       if (thread) {
> -             if (asprintf(optstr, "Run scripts for samples of thread [%s]",
> -                          thread__comm_str(thread)) < 0)
> +             if (asprintf(optstr, "Run scripts for samples of thread [%s]%s",
> +                          thread__comm_str(thread), tstr) < 0)
>                       return 0;
>       } else if (sym) {
> -             if (asprintf(optstr, "Run scripts for samples of symbol [%s]",
> -                          sym->name) < 0)
> +             if (asprintf(optstr, "Run scripts for samples of symbol [%s]%s",
> +                          sym->name, tstr) < 0)
>                       return 0;
>       } else {
> -             if (asprintf(optstr, "Run scripts for all samples") < 0)
> +             if (asprintf(optstr, "Run scripts for all samples%s", tstr) < 0)
>                       return 0;

can't see the time ranges in the menu.. what's the path
to get them listed?

thanks,
jirka

Reply via email to