Re: [PATCH] perf, riscv: Wire up perf trace support for RISC-V

Namhyung Kim
2024-10-31T06:39:13Z

Hello,

On Wed, Oct 30, 2024 at 08:31:35AM +0100, Alexandre Ghiti wrote:
> Hi Bjorn, Namhyung,
>
> On 30/10/2024 01:37, Namhyung Kim wrote:
> > Hello,
> >
> > On Thu, Oct 24, 2024 at 12:03:51PM -0700, Björn Töpel wrote:
> > > From: Björn Töpel <bjorn@rivosinc.com>
> > >
> > > RISC-V does not currently support perf trace, since the system call
> > > table is not generated.
> > >
> > > Perform the copy/paste exercise, wiring up RISC-V system call table
> > > generation.
> > Can anybody with RISC-V please test this?
>
>
> So before this patch, I get:
>
> Error::5File /sys/kernel/tracing//events/raw_syscalls/sys_(enter|exit) not
> found.
> Hint:    Perhaps this kernel misses some CONFIG_ setting to enable this
> feature?.
>
> After applying this patch, I get a proper trace:
> ....
>
>      7.435 ( 0.332 ms): ls/1307 openat(dfd: CWD, filename: 0xb36ef668,
> flags: RDONLY|CLOEXEC)         = 3
>      8.023 ( 0.454 ms): ls/1307 mmap(len: 23171, prot: READ, flags: PRIVATE,
> fd: 3)                   = 0x7fffb36cd000
>      8.558 ( 0.065 ms): ls/1307 close(fd:
> 3)                                                          = 0
>      8.850 ( 0.294 ms): ls/1307 openat(dfd: CWD, filename: 0xb36f9f80,
> flags: RDONLY|CLOEXEC)         = 3
>      9.223 ( 0.152 ms): ls/1307 read(fd: 3, buf: 0x7fffe27b3c20, count: 832)
>
> ...
>
> So you can add:
>
> Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Thanks for your test!
Namhyung