Re: [PATCH v5] perf test: Introduce script for data symbol testing

From: Ravi Bangoria
Date: Thu Oct 06 2022 - 07:34:30 EST

On 06-Oct-22 3:40 PM, Leo Yan wrote:
> This commit introduces a shell script for data symbol testing.
> The testing is designed a data structure with 64-byte alignment, it has
> two fields "data1" and "data2", and other fields are reserved.
> Using "perf mem" command, we can record and report memory samples for a
> self-contained workload with 1 second duration. If have no any memory
> sample for the data structure "buf1", it reports failure; and by
> checking the offset in structure "buf1", if any memory accessing is not
> for "data1" and "data2" fields, it means wrong data symbol parsing and
> returns failure.
> Signed-off-by: Leo Yan <leo.yan@xxxxxxxxxx>
> ---
> Changes from v4:
> - Remove the redundant argument "--" before CPU list (Namhyung).
> This patch is dependent on the fixing:

Thanks Leo.
Test passes on my AMD machine (with AMD perf mem/c2c patches applied):

$ sudo ./perf test -v 103
103: Test data symbol :
--- start ---
test child forked, pid 18048
Compiling test program...
Recording workload...
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 1.569 MB /tmp/ (3064 samples) ]
Cleaning up files...
test child finished with 0
---- end ----
Test data symbol: Ok