From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jin Yao <yao.jin@linux.intel.com>
Cc: jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com,
alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org,
ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v3] perf annotate/report: Remove hist__account_cycles from callback
Date: Wed, 10 Apr 2019 10:00:10 -0300 [thread overview]
Message-ID: <20190410130010.GD13888@kernel.org> (raw)
In-Reply-To: <1552684577-29041-1-git-send-email-yao.jin@linux.intel.com>
Em Sat, Mar 16, 2019 at 05:16:17AM +0800, Jin Yao escreveu:
> The hist__account_cycles is executed when the hist_iter__branch_callback
> is called. But it looks it's not necessary. In hist__account_cycles, it
> already walks on all branch entries.
>
> This patch moves the hist__account_cycles out of callback, now the data
> processing is much faster than before.
>
> Previous code has an issue that the ch[offset].num++
> (in __symbol__account_cycles) is executed repeatedly since
> hist__account_cycles is called in each hist_iter__branch_callback,
> so the counting of ch[offset].num is not correct (too big).
> With this patch, the issue is fixed. And we don't need the code of
> "ch->reset >= ch->num / 2" to check if there are too many overlaps
> (in annotation__count_and_fill), otherwise some data would be
> hidden.
>
> Now, we can try, for example:
Tested with:
perf annotate --stdio
perf annotate --stdio2
perf annotate --tui
perf report --tui -> press annotation hotkey 'a'
Applied,
- Arnaldo
next prev parent reply other threads:[~2019-04-10 13:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 21:16 [PATCH v3] perf annotate/report: Remove hist__account_cycles from callback Jin Yao
2019-03-20 0:35 ` Jin, Yao
2019-03-20 1:47 ` Andi Kleen
2019-04-10 13:00 ` Arnaldo Carvalho de Melo [this message]
2019-05-18 8:46 ` [tip:perf/core] perf annotate: Remove hist__account_cycles() " tip-bot for Jin Yao
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=20190410130010.GD13888@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.intel.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