From: leo.yan@linaro.org
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Al Grant <Al.Grant@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Coresight ML <coresight@lists.linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Robert Walker <robert.walker@arm.com>,
Jiri Olsa <jolsa@redhat.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Mike Leach <mike.leach@linaro.org>
Subject: Re: [PATCH v1 5/5] perf cs-etm: Track exception number
Date: Thu, 6 Dec 2018 13:47:38 +0800 [thread overview]
Message-ID: <20181206054738.GC4244@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <CANLsYkxY1K-TmJKQb3F=T7MGND5pzOZ5ZrK=UZuVihoOAq5p=w@mail.gmail.com>
On Wed, Dec 05, 2018 at 11:03:29AM -0700, Mathieu Poirier wrote:
[...]
> > > > static ocsd_datapath_resp_t
> > > > cs_etm_decoder__buffer_exception(struct cs_etm_decoder *decoder,
> > > > + const ocsd_generic_trace_elem *elem,
> > > > const uint8_t trace_chan_id)
> > > > {
> > > > - return cs_etm_decoder__buffer_packet(decoder, trace_chan_id,
> > > > - CS_ETM_EXCEPTION);
> > > > + int ret;
> > > > + struct cs_etm_packet *packet;
> > > > +
> > > > + ret = cs_etm_decoder__buffer_packet(decoder, trace_chan_id,
> > > > + CS_ETM_EXCEPTION);
> > > > + if (ret != OCSD_RESP_CONT && ret != OCSD_RESP_WAIT)
> > > > + return ret;
> > > > +
> > > > + packet = &decoder->packet_buffer[decoder->tail];
> > > > +
> > > > + /*
> > > > + * Exception number is recorded per CPU and later can be used
> > > > + * for exception return instruction analysis.
> > > > + */
> > > > + decoder->exc_num[packet->cpu] = elem->exception_number;
> > >
> > > Am I missing something or the information about the exception number that is
> > > recorded here isn't used anywhere?
> >
> > The exception number will be used to set branch flag patch [1].
>
> Right, I realised that when I started reviewing that set. The rule of
> thumb here is to introduce code in the same patchset it is used so
> that we avoid adding needless code to the kernel.
Will move this patch into sample flag series.
Thanks,
Leo Yan
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2018-12-06 5:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-11 4:59 [PATCH v1 0/5] perf cs-etm: Correct packets handling Leo Yan
2018-11-11 4:59 ` [PATCH v1 1/5] perf cs-etm: Correct packets swapping in cs_etm__flush() Leo Yan
2018-11-16 22:58 ` Mathieu Poirier
2018-11-11 4:59 ` [PATCH v1 2/5] perf cs-etm: Avoid stale branch samples when flush packet Leo Yan
2018-11-16 23:05 ` Mathieu Poirier
2018-11-18 6:38 ` leo.yan at linaro.org
2018-12-05 2:58 ` leo.yan
2018-11-11 4:59 ` [PATCH v1 3/5] perf cs-etm: Support for NO_SYNC packet Leo Yan
2018-11-19 18:27 ` Mathieu Poirier
2018-12-05 3:31 ` leo.yan
2018-12-05 17:48 ` Mathieu Poirier
2018-12-06 5:45 ` leo.yan
2018-11-11 4:59 ` [PATCH v1 4/5] perf cs-etm: Generate branch sample for exception packet Leo Yan
2018-11-11 4:59 ` [PATCH v1 5/5] perf cs-etm: Track exception number Leo Yan
2018-11-19 20:47 ` Mathieu Poirier
2018-12-05 3:49 ` leo.yan
2018-12-05 18:03 ` Mathieu Poirier
2018-12-06 5:47 ` leo.yan [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=20181206054738.GC4244@leoy-ThinkPad-X240s \
--to=leo.yan@linaro.org \
--cc=Al.Grant@arm.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=jolsa@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=namhyung@kernel.org \
--cc=robert.walker@arm.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