Re: [PATCH] perf tools: Properly set the value of 'old' and 'head' in snapshot mode

From: Leo Yan
Date: Sun Jun 09 2019 - 02:58:05 EST


Hi Arnaldo,

On Fri, Jun 07, 2019 at 03:23:25PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Jun 07, 2019 at 02:44:25PM +0800, Leo Yan escreveu:
> > On Thu, Jun 06, 2019 at 05:10:56PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Wed, Jun 05, 2019 at 10:16:33AM -0600, Mathieu Poirier escreveu:
> > > > This patch adds the necessay intelligence to properly compute the value
> > > > of 'old' and 'head' when operating in snapshot mode. That way we can get
> > > > the latest information in the AUX buffer and be compatible with the
> > > > generic AUX ring buffer mechanic.
> > >
> > > Leo, have you had the chance to test/review this one? Suzuki?
> >
> > Sure. I applied this patch on the perf/core branch (with latest
> > commit 3e4fbf36c1e3 'perf augmented_raw_syscalls: Move reading
> > filename to the loop') and passed testing with below steps:
> >
> > # perf record -e cs_etm/@tmc_etr0/ -S -m,64 --per-thread ./sort &
> > [1] 19097
> > Bubble sorting array of 30000 elements
> >
> > # kill -USR2 19097
> > # kill -USR2 19097
> > # kill -USR2 19097
> > [ perf record: Woken up 4 times to write data ]
> > [ perf record: Captured and wrote 0.753 MB perf.data ]
> >
> > FWIW:
> >
> > Tested-by: Leo Yan <leo.yan@xxxxxxxxxx>
>
> Thanks a lot, I've added your "Tester notes:" and also your Tested-by:.
>
> As I don't have hardware (yet) to test these patches, tests by people
> who can test on real hardware is always super appreciated.

You are very welcome and it's my pleasure :)

> Any suggestions for a SBC that I could buy to be able to do so?

Below are several Arm development boards for referrence:

- DB410c [1]: This board is the first choice for myself, since this
board provides Debian (and Fedora :) support and it supports the
mainline kernel pretty well; the CoreSight also is well supported.

This board is about 80 USD so the cost is not expensive; on the
other hand, please note one cons is the SDRAM is only 1GB, this will
be impossible if you build some big projects (e.g. LLVM/Clang and
BCC); but it's sufficient for perf related development and
verification.

- There have other several boards are in my mind:

Raspberry Pi3 [2] and Hikey960 [3].

Raspberry Pi3 misses some features in the mainline kernel [4] and it
has not enabled CoreSight hardware tracing feature; Hikey960 also
have some patches are out of the mainline kenrel.

Except you have special requirement (e.g. you want to use the board to
build LLVM/Clang/BCC with big DDR size, etc), these two boards can be
secondary choices.

Please feel free let me know if you have questions for boards.

Thanks,
Leo Yan

[1] https://www.96boards.org/product/dragonboard410c/
[2] https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/
[3] https://www.96boards.org/product/hikey960/
[4] https://www.raspberrypi.org/forums/viewtopic.php?t=236568