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]
Date:	Fri, 22 May 2015 21:08:38 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	Martin Liška <mliska@...e.cz>
Cc:	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: Re: [RFC] Add --show-total-period for perf annotate

Martin Liška <mliska@...e.cz> writes:

> I've been working on a new feature for perf annotate, which should be able to annotate
> instructions with total spent time (compared to percentage usage).
>
> Let's consider following use-case. You want to compare two different compilers
> on the same code base and let's assume 90% of wall-time is spent in a single function.
> Moreover, let's say that these compilers produce assembly of a totally different size.
>
> In such case, it's very useful to get an approximation of spent time on a bunch of instructions,
> which can be compared among other compilers. Otherwise, one has to somehow sum percentages and compare
> it to size of a function.

perf diff does not handle this? Especially with the differential
profiling options it should.

>> @@ -623,6 +624,8 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
>  	if (!target__none(&opts->target) && !opts->initial_delay)
>  		perf_evlist__enable(rec->evlist);
>  
> +	t0 = rdclock();
> +
>  	/*
>  	 * Let the child rip
>  	 */
> @@ -692,6 +695,9 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
>  		goto out_child;
>  	}
>  
> +	t1 = rdclock();
> +	walltime_nsecs = t1 - t0;

The walltime can be later computed by the difference of the first and
the last time stamp after sorting the events. So you don't need the new header.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ