From: Waiman Long <waiman.long@hp.com>
To: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Stephane Eranian <eranian@google.com>,
linux-kernel@vger.kernel.org,
Aswin Chandramouleeswaran <aswin@hp.com>,
Scott J Norton <scott.norton@hp.com>
Subject: Re: [PATCH 2/2] perf-report: add --max-stack option to limit callchain stack scan
Date: Thu, 17 Oct 2013 12:28:43 -0400 [thread overview]
Message-ID: <5260103B.9070106@hp.com> (raw)
In-Reply-To: <525F52F0.2030006@gmail.com>
On 10/16/2013 11:01 PM, David Ahern wrote:
> On 10/16/13 1:59 PM, Waiman Long wrote:
>> This patch adds a new --max-stack option to perf-report to limit the
>> depth of callchain stack data to look at to reduce the time it takes
>> for perf-report to finish its processing. It trades the presence of
>> trailing stack information with faster speed.
>
> I like the patch. I have a similar option in my perf-sched-timehist
> command, and I have a patch somewhere for perf-script.
>
> It would be even better to pass this arg kernel side and limit the
> stack depth at data collection time.
>
That will require option a similar option on the record side. However,
the overhead of collecting more stack ip address isn't as high as that
in the report side.
> ---8<---
>
>> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
>> index 72eae74..d90d04a 100644
>> --- a/tools/perf/builtin-report.c
>> +++ b/tools/perf/builtin-report.c
>> @@ -37,6 +37,12 @@
>>
>> #include <linux/bitmap.h>
>>
>> +/*
>> + * 2-level stringification macro to enable stringification of macro
>> value
>> + * */
>> +#define __to_string(x) #x
>> +#define STRINGIFY(x) __to_string(x)
>
> These 2 lines should be somewhere else -- like util/util.h
I will move that to a common header file.
>
> ---8<---
>
>> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
>> index 2122141..2725aca 100644
>> --- a/tools/perf/builtin-top.c
>> +++ b/tools/perf/builtin-top.c
>> @@ -771,7 +771,8 @@ static void perf_event__process_sample(struct
>> perf_tool *tool,
>> sample->callchain) {
>> err = machine__resolve_callchain(machine, evsel,
>> al.thread, sample,
>> - &parent, &al);
>> + &parent, &al,
>> + PERF_MAX_STACK_DEPTH);
>> if (err)
>> return;
>> }
>
> Why not add the option to perf-top as well? copy-paste.
I had thought about it, but I decided to wait for feedback before doing
it. I will make that change in the next version.
-Longman
prev parent reply other threads:[~2013-10-17 16:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 19:59 [PATCH 2/2] perf-report: add --max-stack option to limit callchain stack scan Waiman Long
2013-10-17 3:01 ` David Ahern
2013-10-17 16:28 ` Waiman Long [this message]
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=5260103B.9070106@hp.com \
--to=waiman.long@hp.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=adrian.hunter@intel.com \
--cc=aswin@hp.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=scott.norton@hp.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox