[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181206054738.GC4244@leoy-ThinkPad-X240s>
Date: Thu, 6 Dec 2018 13:47:38 +0800
From: leo.yan@...aro.org
To: Mathieu Poirier <mathieu.poirier@...aro.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mike Leach <mike.leach@...aro.org>,
Robert Walker <robert.walker@....com>,
Al Grant <Al.Grant@....com>,
Coresight ML <coresight@...ts.linaro.org>
Subject: Re: [PATCH v1 5/5] perf cs-etm: Track exception number
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
Powered by blists - more mailing lists