From: Andi Kleen <andi@firstfloor.org>
To: "Martin Liška" <mliska@suse.cz>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [RFC] Add --show-total-period for perf annotate
Date: Fri, 22 May 2015 21:08:38 -0700 [thread overview]
Message-ID: <87mw0wc4vt.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <555F3F8A.6000204@suse.cz> ("Martin Liška"'s message of "Fri, 22 May 2015 16:39:06 +0200")
Martin Liška <mliska@suse.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@linux.intel.com -- Speaking for myself only
next prev parent reply other threads:[~2015-05-23 4:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 14:39 [RFC] Add --show-total-period for perf annotate Martin Liška
2015-05-23 4:08 ` Andi Kleen [this message]
2015-05-25 7:46 ` Martin Liška
2015-05-25 15:14 ` Andi Kleen
2015-05-26 12:34 ` Martin Liška
2015-05-26 17:03 ` Andi Kleen
2015-05-27 8:46 ` Martin Liška
2015-05-27 9:04 ` Martin Liška
2015-05-27 14:04 ` Andi Kleen
2015-05-29 12:58 ` Martin Liška
2015-05-29 12:58 ` Martin Liška
2015-05-29 15:55 ` Andi Kleen
2015-06-01 11:08 ` Martin Liška
2015-06-01 11:08 ` Martin Liška
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mw0wc4vt.fsf@tassilo.jf.intel.com \
--to=andi@firstfloor.org \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mliska@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.