[PATCH V2 0/6] perf intel-pt: Support itrace option flag d+e to log on error

Adrian Hunter posted 6 patches 3 years, 7 months ago
tools/perf/Documentation/itrace.txt             |   1 +
tools/perf/Documentation/perf-config.txt        |   7 ++
tools/perf/Documentation/perf-intel-pt.txt      |  13 ++-
tools/perf/util/auxtrace.c                      |  13 +++
tools/perf/util/auxtrace.h                      |   3 +
tools/perf/util/config.c                        |  31 +++++++
tools/perf/util/config.h                        |   1 +
tools/perf/util/intel-pt-decoder/intel-pt-log.c | 117 +++++++++++++++++++++++-
tools/perf/util/intel-pt-decoder/intel-pt-log.h |   3 +-
tools/perf/util/intel-pt.c                      |  23 ++++-
10 files changed, 206 insertions(+), 6 deletions(-)
[PATCH V2 0/6] perf intel-pt: Support itrace option flag d+e to log on error
Posted by Adrian Hunter 3 years, 7 months ago
Hi

Here are a few patches to add the ability to output the decoding debug log
only when there are decoding errors.

This is motivated by the fact that a full log can be very large, so just
getting interesting bits is useful for analyzing errors.

If necessary, the size of output on error is configurable via perf config,
and perf_config_scan() was added in the 1st patch to make that simpler.

The 2nd patch adds the new option flag to auxtrace.

There are a couple of very minor and essentially unrelated changes in
patches 3 and 4.

The main Intel PT change is in patch 5 and there is a small example in the
commit message.


Changes in V2:

      perf intel-pt: Support itrace option flag d+e to log on error
	Ensure log_buf is defined before use

      perf intel-pt: Remove first line of log dumped on error
	Remove first line only if the buffer has wrapped


Adrian Hunter (6):
      perf tools: Add perf_config_scan()
      perf auxtrace: Add itrace option flag d+e to log on error
      perf intel-pt: Improve man page layout slightly
      perf intel-pt: Improve object code read error message
      perf intel-pt: Support itrace option flag d+e to log on error
      perf intel-pt: Remove first line of log dumped on error

 tools/perf/Documentation/itrace.txt             |   1 +
 tools/perf/Documentation/perf-config.txt        |   7 ++
 tools/perf/Documentation/perf-intel-pt.txt      |  13 ++-
 tools/perf/util/auxtrace.c                      |  13 +++
 tools/perf/util/auxtrace.h                      |   3 +
 tools/perf/util/config.c                        |  31 +++++++
 tools/perf/util/config.h                        |   1 +
 tools/perf/util/intel-pt-decoder/intel-pt-log.c | 117 +++++++++++++++++++++++-
 tools/perf/util/intel-pt-decoder/intel-pt-log.h |   3 +-
 tools/perf/util/intel-pt.c                      |  23 ++++-
 10 files changed, 206 insertions(+), 6 deletions(-)


Regards
Adrian
Re: [PATCH V2 0/6] perf intel-pt: Support itrace option flag d+e to log on error
Posted by Arnaldo Carvalho de Melo 3 years, 7 months ago
Em Mon, Sep 05, 2022 at 10:34:18AM +0300, Adrian Hunter escreveu:
> Hi
> 
> Here are a few patches to add the ability to output the decoding debug log
> only when there are decoding errors.
> 
> This is motivated by the fact that a full log can be very large, so just
> getting interesting bits is useful for analyzing errors.
> 
> If necessary, the size of output on error is configurable via perf config,
> and perf_config_scan() was added in the 1st patch to make that simpler.
> 
> The 2nd patch adds the new option flag to auxtrace.
> 
> There are a couple of very minor and essentially unrelated changes in
> patches 3 and 4.
> 
> The main Intel PT change is in patch 5 and there is a small example in the
> commit message.
> 
> 
> Changes in V2:
> 
>       perf intel-pt: Support itrace option flag d+e to log on error
> 	Ensure log_buf is defined before use
> 
>       perf intel-pt: Remove first line of log dumped on error
> 	Remove first line only if the buffer has wrapped

Applied locally, Namhyung: I think your review comment was addressed,
right? If so can I add your Reviewed-by to all the patches in this
series?

- Arnaldo
 
> 
> Adrian Hunter (6):
>       perf tools: Add perf_config_scan()
>       perf auxtrace: Add itrace option flag d+e to log on error
>       perf intel-pt: Improve man page layout slightly
>       perf intel-pt: Improve object code read error message
>       perf intel-pt: Support itrace option flag d+e to log on error
>       perf intel-pt: Remove first line of log dumped on error
> 
>  tools/perf/Documentation/itrace.txt             |   1 +
>  tools/perf/Documentation/perf-config.txt        |   7 ++
>  tools/perf/Documentation/perf-intel-pt.txt      |  13 ++-
>  tools/perf/util/auxtrace.c                      |  13 +++
>  tools/perf/util/auxtrace.h                      |   3 +
>  tools/perf/util/config.c                        |  31 +++++++
>  tools/perf/util/config.h                        |   1 +
>  tools/perf/util/intel-pt-decoder/intel-pt-log.c | 117 +++++++++++++++++++++++-
>  tools/perf/util/intel-pt-decoder/intel-pt-log.h |   3 +-
>  tools/perf/util/intel-pt.c                      |  23 ++++-
>  10 files changed, 206 insertions(+), 6 deletions(-)
> 
> 
> Regards
> Adrian

-- 

- Arnaldo
Re: [PATCH V2 0/6] perf intel-pt: Support itrace option flag d+e to log on error
Posted by Namhyung Kim 3 years, 7 months ago
HI Arnaldo,

On Tue, Sep 6, 2022 at 6:05 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> Em Mon, Sep 05, 2022 at 10:34:18AM +0300, Adrian Hunter escreveu:
> > Hi
> >
> > Here are a few patches to add the ability to output the decoding debug log
> > only when there are decoding errors.
> >
> > This is motivated by the fact that a full log can be very large, so just
> > getting interesting bits is useful for analyzing errors.
> >
> > If necessary, the size of output on error is configurable via perf config,
> > and perf_config_scan() was added in the 1st patch to make that simpler.
> >
> > The 2nd patch adds the new option flag to auxtrace.
> >
> > There are a couple of very minor and essentially unrelated changes in
> > patches 3 and 4.
> >
> > The main Intel PT change is in patch 5 and there is a small example in the
> > commit message.
> >
> >
> > Changes in V2:
> >
> >       perf intel-pt: Support itrace option flag d+e to log on error
> >       Ensure log_buf is defined before use
> >
> >       perf intel-pt: Remove first line of log dumped on error
> >       Remove first line only if the buffer has wrapped
>
> Applied locally, Namhyung: I think your review comment was addressed,
> right? If so can I add your Reviewed-by to all the patches in this
> series?

Sure,

Reviewed-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

>
> - Arnaldo
>
> >
> > Adrian Hunter (6):
> >       perf tools: Add perf_config_scan()
> >       perf auxtrace: Add itrace option flag d+e to log on error
> >       perf intel-pt: Improve man page layout slightly
> >       perf intel-pt: Improve object code read error message
> >       perf intel-pt: Support itrace option flag d+e to log on error
> >       perf intel-pt: Remove first line of log dumped on error
> >
> >  tools/perf/Documentation/itrace.txt             |   1 +
> >  tools/perf/Documentation/perf-config.txt        |   7 ++
> >  tools/perf/Documentation/perf-intel-pt.txt      |  13 ++-
> >  tools/perf/util/auxtrace.c                      |  13 +++
> >  tools/perf/util/auxtrace.h                      |   3 +
> >  tools/perf/util/config.c                        |  31 +++++++
> >  tools/perf/util/config.h                        |   1 +
> >  tools/perf/util/intel-pt-decoder/intel-pt-log.c | 117 +++++++++++++++++++++++-
> >  tools/perf/util/intel-pt-decoder/intel-pt-log.h |   3 +-
> >  tools/perf/util/intel-pt.c                      |  23 ++++-
> >  10 files changed, 206 insertions(+), 6 deletions(-)
> >
> >
> > Regards
> > Adrian
>
> --
>
> - Arnaldo
Re: [PATCH V2 0/6] perf intel-pt: Support itrace option flag d+e to log on error
Posted by Arnaldo Carvalho de Melo 3 years, 7 months ago
Em Tue, Sep 06, 2022 at 10:24:03AM -0700, Namhyung Kim escreveu:
> HI Arnaldo,
> 
> On Tue, Sep 6, 2022 at 6:05 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> >
> > Em Mon, Sep 05, 2022 at 10:34:18AM +0300, Adrian Hunter escreveu:
> > > Hi
> > >
> > > Here are a few patches to add the ability to output the decoding debug log
> > > only when there are decoding errors.
> > >
> > > This is motivated by the fact that a full log can be very large, so just
> > > getting interesting bits is useful for analyzing errors.
> > >
> > > If necessary, the size of output on error is configurable via perf config,
> > > and perf_config_scan() was added in the 1st patch to make that simpler.
> > >
> > > The 2nd patch adds the new option flag to auxtrace.
> > >
> > > There are a couple of very minor and essentially unrelated changes in
> > > patches 3 and 4.
> > >
> > > The main Intel PT change is in patch 5 and there is a small example in the
> > > commit message.
> > >
> > >
> > > Changes in V2:
> > >
> > >       perf intel-pt: Support itrace option flag d+e to log on error
> > >       Ensure log_buf is defined before use
> > >
> > >       perf intel-pt: Remove first line of log dumped on error
> > >       Remove first line only if the buffer has wrapped
> >
> > Applied locally, Namhyung: I think your review comment was addressed,
> > right? If so can I add your Reviewed-by to all the patches in this
> > series?
> 
> Sure,
> 
> Reviewed-by: Namhyung Kim <namhyung@kernel.org>

Thanks, added.

- Arnaldo