Skip to content

perf tools: Minor improvements in event synthesis

Namhyung Kim lkml 3 versions – Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesApplied
  2. v23 patches 8 repliesSuperseded
  3. v13 patches 3 repliesSuperseded

Changes in v3 from the cover letter

* remove unnecessary pid check
* update change log in patch #2

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3perf tools: Use /proc/<PID>/task/<TID>/status for synthesistools/perf/util/synthetic-events.c+14 -110 replies
2/3perf tools: Skip MMAP record synthesis for kernel threadstools/perf/util/synthetic-events.c+23 -90 replies
3/3perf tools: Use scandir() to iterate threadstools/perf/util/synthetic-events.c+17 -110 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJiri Olsa
SeriesA-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHSET v3 0/3] perf tools: Minor improvements in event synthesis

Hello,

This is to optimize the event synthesis during perf record.

Changes in v3:
* remove unnecessary pid check
* update change log in patch #2

The first patch is to reduce memory usage when many threads are used. The second is to avoid unncessary syscalls for kernel threads. And the last one is to reduce the number of threads to iterate when new threads are being created at the same time.

Unfortunately there's no dramatic improvement here but I can see ~5% gain in the 'perf bench internals synthesize' on a big machine. (The numbers are not stable though)

Before:

  # perf bench internals synthesize --mt -M1 -I 100
  # Running 'internals/synthesize' benchmark:
  Computing performance of multi threaded perf event synthesis by
  synthesizing events on CPU 0:
    Number of synthesis threads: 1
      Average synthesis took: 68831.480 usec (+- 101.450 usec)
      Average num. events: 9982.000 (+- 0.000)
      Average time per event 6.896 usec

After:

  # perf bench internals synthesize --mt -M1 -I 100
  # Running 'internals/synthesize' benchmark:
  Computing performance of multi threaded perf event synthesis by
  synthesizing events on CPU 0:
    Number of synthesis threads: 1
      Average synthesis took: 65036.370 usec (+- 158.121 usec)
      Average num. events: 9982.000 (+- 0.000)
      Average time per event 6.515 usec

Thanks,
Namhyung

Namhyung Kim (3):
perf tools: Use /proc/<PID>/task/<TID>/status for synthesis perf tools: Skip MMAP record synthesis for kernel threads perf tools: Use scandir() to iterate threads

 tools/perf/util/synthetic-events.c | 83 +++++++++++++++++++-----------
 1 file changed, 53 insertions(+), 30 deletions(-)
Signature · 1 line
2.30.0.365.g02bc693789-goog