lkml.org 
[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2018-12-06 06:48    [W:0.043 / U:4.968 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site