lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190304144840.GJ30476@krava>
Date:   Mon, 4 Mar 2019 15:48:40 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     acme@...nel.org, jolsa@...nel.org,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ