lkml.org 
[lkml]   [2019]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 07/11] perf tools report: Support running scripts for current time range
On Thu, Feb 28, 2019 at 10:35:46AM -0800, Andi Kleen wrote:

SNIP

> +add_script_opt(struct hist_browser *browser,
> + struct popup_action *act, char **optstr,
> + struct thread *thread, struct symbol *sym)
> +{
> + int n, j;
> + struct hist_entry *he;
> +
> + n = add_script_opt_2(browser, act, optstr, thread, sym, "");
> +
> + he = hist_browser__selected_entry(browser);
> + if (sort_order && strstr(sort_order, "time")) {
> + char tstr[128];
> +
> + optstr++;
> + act++;
> + j = sprintf(tstr, " in ");
> + j += timestamp__scnprintf_usec(he->time, tstr + j,
> + sizeof tstr - j);
> + j += sprintf(tstr + j, "-");
> + timestamp__scnprintf_usec(he->time + symbol_conf.time_quantum,
> + tstr + j,
> + sizeof tstr - j);

no need to put sizeof on extra line

jirka

\
 
 \ /
  Last update: 2019-03-04 15:48    [W:0.101 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site