From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Jean Pihet <jean.pihet@linaro.org>
Subject: Re: [PATCH 1/3] perf tools: Cache register accesses for unwind processing
Date: Tue, 29 Apr 2014 09:36:19 +0900 [thread overview]
Message-ID: <87ha5dotto.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20140428132420.GD18628@krava.brq.redhat.com> (Jiri Olsa's message of "Mon, 28 Apr 2014 15:24:20 +0200")
On Mon, 28 Apr 2014 15:24:20 +0200, Jiri Olsa wrote:
> On Mon, Apr 28, 2014 at 10:02:55PM +0900, Namhyung Kim wrote:
>> Hi Jiri,
>>
>> 2014-04-28 (월), 11:48 +0200, Jiri Olsa:
>> > On Sun, Apr 27, 2014 at 11:29:21PM +0900, Namhyung Kim wrote:
>> > > Hi Jiri,
>> > >
>> > > 2014-04-17 (목), 19:39 +0200, Jiri Olsa:
>> > > > Caching registers value into an array. Got about 4% speed up
>> > > > of perf_reg_value function for report command processing
>> > > > dwarf unwind stacks.
>> > >
>> > > I'm not familiar with the code base, so probably silly questions: Where
>> > > does the speed up come from? IOW I don't know what's the difference
>> > > between the regs->regs and regs->cached_regs. And does the cached_regs
>> > > contain correct values of registers for each frame?
>> >
>> > the current way register's value is accessed is to get its
>> > index in the sample's regs array.. based on register's id
>> > and the registers mask
>> >
>> > so each time you want register value you traverse the registers
>> > mask and count reg's index for the sample regs array
>> >
>> > this patch does this only once for each register (at the time it's
>> > first accessed) and cache its value in the array (cache_regs). The
>> > cache_mask is used to identify which regs are already cached.
>>
>> That means it'll get the same value everytime it accesses a register in
>> frames in a sample?
>
> right..
Hmm.. I thought it'd be changed somehow as it unwinds frames.
Thanks,
Namhyung
next prev parent reply other threads:[~2014-04-29 0:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-17 17:39 [PATCH 0/3] perf tools: Speedup DWARF unwind Jiri Olsa
2014-04-17 17:39 ` [PATCH 1/3] perf tools: Cache register accesses for unwind processing Jiri Olsa
2014-04-27 14:29 ` Namhyung Kim
2014-04-28 9:48 ` Jiri Olsa
2014-04-28 13:02 ` Namhyung Kim
2014-04-28 13:24 ` Jiri Olsa
2014-04-29 0:36 ` Namhyung Kim [this message]
2014-04-30 12:12 ` Jiri Olsa
2014-04-28 10:39 ` Christian Borntraeger
2014-04-28 11:00 ` Jiri Olsa
2014-04-17 17:39 ` [PATCH 2/3] perf tools: Cache dso data file descriptor Jiri Olsa
2014-04-27 14:36 ` Namhyung Kim
2014-04-28 10:01 ` Jiri Olsa
2014-04-28 13:16 ` Namhyung Kim
2014-04-28 13:34 ` Jiri Olsa
2014-04-28 14:57 ` David Ahern
2014-04-29 0:41 ` Namhyung Kim
2014-05-07 19:01 ` Ingo Molnar
2014-04-17 17:39 ` [PATCH 3/3] perf tools: Replace dso data cache with mapped data Jiri Olsa
2014-04-18 7:51 ` [PATCH 0/3] perf tools: Speedup DWARF unwind Ingo Molnar
2014-04-18 7:55 ` Ingo Molnar
2014-04-18 9:35 ` Jiri Olsa
2014-04-23 20:16 ` Jiri Olsa
2014-04-25 13:08 ` Jiri Olsa
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=87ha5dotto.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jean.pihet@linaro.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulus@samba.org \
/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.