From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Suzuki K Poulouse <suzuki.poulose@arm.com>,
Clark Williams <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>, Leo Yan <leo.yan@linaro.org>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 31/43] perf cs-etm: Rethink kernel address initialisation
Date: Thu, 14 Feb 2019 21:45:27 -0300 [thread overview]
Message-ID: <20190215004539.23571-32-acme@kernel.org> (raw)
In-Reply-To: <20190215004539.23571-1-acme@kernel.org>
From: Mathieu Poirier <mathieu.poirier@linaro.org>
Moving initialisation of the kernel start address to function
cs_etm__setup_queues(), considered to be the common denominator for
queue initialisation. That way we don't have to repeat the same code
at different places.
No change of functionatlity is introduced by this patch.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20190212171618.25355-10-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/cs-etm.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index c9a5b4935209..2d2de898ea68 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -523,6 +523,9 @@ static int cs_etm__setup_queues(struct cs_etm_auxtrace *etm)
unsigned int i;
int ret;
+ if (!etm->kernel_start)
+ etm->kernel_start = machine__kernel_start(etm->machine);
+
for (i = 0; i < etm->queues.nr_queues; i++) {
ret = cs_etm__setup_queue(etm, &etm->queues.queue_array[i], i);
if (ret)
@@ -1490,14 +1493,10 @@ static int cs_etm__set_sample_flags(struct cs_etm_queue *etmq)
static int cs_etm__run_decoder(struct cs_etm_queue *etmq)
{
- struct cs_etm_auxtrace *etm = etmq->etm;
struct cs_etm_buffer buffer;
size_t buffer_used, processed;
int err = 0;
- if (!etm->kernel_start)
- etm->kernel_start = machine__kernel_start(etm->machine);
-
/* Go through each buffer in the queue and decode them one by one */
while (1) {
buffer_used = 0;
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-15 0:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190215004539.23571-1-acme@kernel.org>
2019-02-15 0:44 ` [PATCH 02/43] perf cs-etm: Add proper header file for symbols Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 19/43] perf coresight: Do not test for libopencsd by default Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 23/43] perf cs-etm: Remove unused structure field "state" Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 24/43] perf cs-etm: Remove unused structure field "time" and "timestamp" Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 25/43] perf cs-etm: Fix wrong return values in error path Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 26/43] perf cs-etm: Introducing function cs_etm_decoder__init_dparams() Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 27/43] perf cs-etm: Fix memory leak in error path Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 28/43] perf cs-etm: Introducing function cs_etm__init_trace_params() Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 29/43] perf cs-etm: Fix erroneous comment Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 30/43] perf cs-etm: Cleaning up function cs_etm__alloc_queue() Arnaldo Carvalho de Melo
2019-02-15 0:45 ` Arnaldo Carvalho de Melo [this message]
2019-02-15 0:45 ` [PATCH 32/43] perf cs-etm: Make cs_etm__run_decoder() queue independent Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 33/43] perf cs-etm: Modularize main decoder function Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 34/43] perf cs-etm: Modularize main packet processing loop Arnaldo Carvalho de Melo
2019-02-15 0:45 ` [PATCH 35/43] perf cs-etm: Modularize auxtrace_buffer fetch function 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=20190215004539.23571-32-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=suzuki.poulose@arm.com \
--cc=williams@redhat.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;
as well as URLs for NNTP newsgroup(s).