[PATCH 0/4] perf tools: Support reading PERF_FORMAT_LOST

Namhyung Kim posted 4 patches 3 years, 7 months ago
There is a newer version of this series
tools/include/uapi/linux/perf_event.h         |   5 +-
tools/lib/perf/evsel.c                        |  72 ++++++++
tools/lib/perf/include/perf/event.h           |   3 +-
tools/lib/perf/include/perf/evsel.h           |   4 +-
tools/lib/perf/tests/test-evsel.c             | 161 ++++++++++++++++++
tools/perf/tests/sample-parsing.c             |  14 +-
tools/perf/util/event.h                       |  18 +-
tools/perf/util/evsel.c                       |  33 +++-
.../scripting-engines/trace-event-python.c    |  16 +-
tools/perf/util/session.c                     |  32 ++--
tools/perf/util/synthetic-events.c            |  34 +++-
11 files changed, 354 insertions(+), 38 deletions(-)
[PATCH 0/4] perf tools: Support reading PERF_FORMAT_LOST
Posted by Namhyung Kim 3 years, 7 months ago
Hello,

The kernel v6.0 added PERF_FORMAT_LOST which can read a number of lost
samples for the given event.  As it can change the output format of
read(2) and perf sample data, it needs to access them carefully.

You can get the code from 'perf/read-lost-v1' brach on

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung


Namhyung Kim (4):
  tools headers UAPI: Sync linux/perf_event.h with the kernel sources
  tools lib perf: Handle read format in perf_evsel__read()
  tools lib perf: Add a test case for read formats
  perf tools: Support reading PERF_FORMAT_LOST

 tools/include/uapi/linux/perf_event.h         |   5 +-
 tools/lib/perf/evsel.c                        |  72 ++++++++
 tools/lib/perf/include/perf/event.h           |   3 +-
 tools/lib/perf/include/perf/evsel.h           |   4 +-
 tools/lib/perf/tests/test-evsel.c             | 161 ++++++++++++++++++
 tools/perf/tests/sample-parsing.c             |  14 +-
 tools/perf/util/event.h                       |  18 +-
 tools/perf/util/evsel.c                       |  33 +++-
 .../scripting-engines/trace-event-python.c    |  16 +-
 tools/perf/util/session.c                     |  32 ++--
 tools/perf/util/synthetic-events.c            |  34 +++-
 11 files changed, 354 insertions(+), 38 deletions(-)


base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
-- 
2.37.1.595.g718a3a8f04-goog
Re: [PATCH 0/4] perf tools: Support reading PERF_FORMAT_LOST
Posted by Arnaldo Carvalho de Melo 3 years, 7 months ago
Em Mon, Aug 15, 2022 at 12:01:02PM -0700, Namhyung Kim escreveu:
> Hello,
> 
> The kernel v6.0 added PERF_FORMAT_LOST which can read a number of lost

I've tentantively added this to perf/urgent, as this matches a feature
introduced in this merge window, we'll see how it goes, hopefully Linus
accepts this at this point.

- Arnaldo

> samples for the given event.  As it can change the output format of
> read(2) and perf sample data, it needs to access them carefully.
> 
> You can get the code from 'perf/read-lost-v1' brach on
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
> 
> Thanks,
> Namhyung
> 
> 
> Namhyung Kim (4):
>   tools headers UAPI: Sync linux/perf_event.h with the kernel sources
>   tools lib perf: Handle read format in perf_evsel__read()
>   tools lib perf: Add a test case for read formats
>   perf tools: Support reading PERF_FORMAT_LOST
> 
>  tools/include/uapi/linux/perf_event.h         |   5 +-
>  tools/lib/perf/evsel.c                        |  72 ++++++++
>  tools/lib/perf/include/perf/event.h           |   3 +-
>  tools/lib/perf/include/perf/evsel.h           |   4 +-
>  tools/lib/perf/tests/test-evsel.c             | 161 ++++++++++++++++++
>  tools/perf/tests/sample-parsing.c             |  14 +-
>  tools/perf/util/event.h                       |  18 +-
>  tools/perf/util/evsel.c                       |  33 +++-
>  .../scripting-engines/trace-event-python.c    |  16 +-
>  tools/perf/util/session.c                     |  32 ++--
>  tools/perf/util/synthetic-events.c            |  34 +++-
>  11 files changed, 354 insertions(+), 38 deletions(-)
> 
> 
> base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
> -- 
> 2.37.1.595.g718a3a8f04-goog

-- 

- Arnaldo