linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Coresight ML <coresight@lists.linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Leo Yan <leo.yan@linaro.org>, Namhyung Kim <namhyung@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 0/8] perf cs-etm: Correct packets handling
Date: Wed, 12 Dec 2018 11:45:44 -0700	[thread overview]
Message-ID: <CANLsYkyFZqUYghGmSS-j50EaOvce57CP+Y737xRF3HjPrHDVqw@mail.gmail.com> (raw)
In-Reply-To: <1544513908-16805-1-git-send-email-leo.yan@linaro.org>

On Tue, 11 Dec 2018 at 00:40, Leo Yan <leo.yan@linaro.org> wrote:
>
> perf cs-etm module converts decoder elements to packets and then we have
> more context crossing packets to generate synthenize samples, finally
> perf tool can faciliate samples for statistics and report the results.
>
> This patch series is to address several issues found related with
> packets handling and samples generation when worked firstly on branch
> sample flags support for Arm CoreSight trace data, so this patch series
> is dependency for sample flags setting, will send another dedicated
> patch series for sample flags later.
>
> In this patch series, the first two patches are mainly to fix issues in
> cs_etm__flush(): patch 0001 corrects packets swapping in cs_etm__flush()
> and this can fix the wrong branch sample caused by the missed packets
> swapping; patch 0002 is to fix the wrong samples generation with stale
> packets at the end of trace block.
>
> Patch 0003 and 0004 are for minor fixing; patch 0003 removes unused field
> 'cs_etm_decoder::trace_on', this can simplize the switch-case code for all
> discontinuity packet generation by using one code block; patch 0004 is to
> refactor enumeration cs_etm_sample_type.
>
> Patch 0005 is to rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY, we use
> a more general packet type to present trace discontinuity, so it can be
> used by TRACE_ON event, and also can be used by NO_SYNC and EO_TRACE
> elements.
>
> Patch 0006 is used to support NO_SYNC packet, otherwise the trace
> decoding cannot reflect the tracing discontinuity caused by NO_SYNC
> packet.
>
> Patch 0007 is used to support EO_TRACE packet, which also introduces
> the tracing discontinuity at the end of trace and we should save last
> trace data for it.
>
> Patch 0008 is used to generate branch sample for exception packets.
>
> Credit to Mike Leach and Robert Walker who made me clear for underlying
> mechanism for NO_SYNC/EO_TRACE elements, Mike also shared the detailed
> explanation for why we can treat NO_SYNC and TRACE_ON elements as the
> same, so except following Mike & Rob suggestion for trace discontinuity
> consolidation, most commit log of patches 0006/0007 also come from
> Mike's explanation.
>
> This patch series is applied directly on the acme's perf/core branch [1]
> with latest commit aaab25f03e9e ("perf trace: Allow selecting use the
> use of the ordered_events code").
>
> With applying the dependency patch, this patch series has been tested
> for branch samples dumping with below command on Juno board:
>
>   # perf script -F,-time,+ip,+sym,+dso,+addr,+symoff -k vmlinux

Good day Arnaldo,

I have reviewed all the changes in this set - please consider adding
to your next branch.  Let me know if you want a pull request.

Regards,
Mathieu

>
> Changes from v2:
> * Addressed Mathieu's comments and suggestions for minor refactoring
>   for removing unused field 'cs_etm_decoder::trace_on' and added one
>   dedicated patch to refactor enumeration cs_etm_sample_type.
> * Added Mathieu's 'reviewed' tags;  Very appreciate Mathieu's many
>   suggestion for crossing several patch series.
>
> Changes from v1:
> * Synced the consistent code in patch 0001 for condition checking.
> * Introduced new function cs_etm__end_block() for flushing packet
>   at the end of trace block.
> * Added new patch 0003 to rename CS_ETM_TRACE_ON to
>   CS_ETM_DISCONTINUITY.
> * Used the same one packet type CS_ETM_DISCONTINUITY for all
>   trace discontinuity (include support TRACE_ON/EO_TRACE/NO_SYNC
>   packets).
> * Removed tracking exception number patch, which will be added in
>   sample flag patch series.
>
>
> Leo Yan (8):
>   perf cs-etm: Correct packets swapping in cs_etm__flush()
>   perf cs-etm: Avoid stale branch samples when flush packet
>   perf cs-etm: Remove unused 'trace_on' in cs_etm_decoder
>   perf cs-etm: Refactor enumeration cs_etm_sample_type
>   perf cs-etm: Rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY
>   perf cs-etm: Treat NO_SYNC element as trace discontinuity
>   perf cs-etm: Treat EO_TRACE element as trace discontinuity
>   perf cs-etm: Generate branch sample for exception packet
>
>  tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 42 +++++++++-----
>  tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 10 ++--
>  tools/perf/util/cs-etm.c                        | 77 ++++++++++++++++++++++---
>  3 files changed, 100 insertions(+), 29 deletions(-)
>
> --
> 2.7.4
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2018-12-12 18:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11  7:38 [PATCH v3 0/8] perf cs-etm: Correct packets handling Leo Yan
2018-12-11  7:38 ` [PATCH v3 1/8] perf cs-etm: Correct packets swapping in cs_etm__flush() Leo Yan
2018-12-11  7:38 ` [PATCH v3 2/8] perf cs-etm: Avoid stale branch samples when flush packet Leo Yan
2018-12-11  7:38 ` [PATCH v3 3/8] perf cs-etm: Remove unused 'trace_on' in cs_etm_decoder Leo Yan
2018-12-12 18:41   ` Mathieu Poirier
2018-12-11  7:38 ` [PATCH v3 4/8] perf cs-etm: Refactor enumeration cs_etm_sample_type Leo Yan
2018-12-12 18:41   ` Mathieu Poirier
2018-12-11  7:38 ` [PATCH v3 5/8] perf cs-etm: Rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY Leo Yan
2018-12-11  7:38 ` [PATCH v3 6/8] perf cs-etm: Treat NO_SYNC element as trace discontinuity Leo Yan
2018-12-13 12:38   ` Arnaldo Carvalho de Melo
2018-12-13 12:41     ` Arnaldo Carvalho de Melo
2018-12-13 13:09       ` leo.yan
2018-12-13 13:21         ` Arnaldo Carvalho de Melo
2018-12-13 13:23           ` leo.yan
2018-12-13 13:26           ` Arnaldo Carvalho de Melo
2018-12-13 13:31             ` leo.yan
2018-12-11  7:38 ` [PATCH v3 7/8] perf cs-etm: Treat EO_TRACE " Leo Yan
2018-12-11  7:38 ` [PATCH v3 8/8] perf cs-etm: Generate branch sample for exception packet Leo Yan
2018-12-12 18:45 ` Mathieu Poirier [this message]
2018-12-13 13:11   ` [PATCH v3 0/8] perf cs-etm: Correct packets handling Arnaldo Carvalho de Melo

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=CANLsYkyFZqUYghGmSS-j50EaOvce57CP+Y737xRF3HjPrHDVqw@mail.gmail.com \
    --to=mathieu.poirier@linaro.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=jolsa@redhat.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).