Re: [PATCH] riscv: add tracepoints for page fault

From: Matthew Wilcox
Date: Mon Jul 15 2024 - 09:36:31 EST


On Mon, Jul 15, 2024 at 10:13:55AM +0000, Zhu Hengbo wrote:
> Introduce page_fault_user and page_fault_kernel for riscv page fault.
> Help to get more detail information when page fault happen.

Why be different from x86?

TP_printk("address=%ps ip=%ps error_code=0x%lx",
(void *)__entry->address, (void *)__entry->ip,
__entry->error_code) );

adding the instruction pointer (ip) seems like it would be useful.

> + TP_printk("user page fault, address=%ps cause=0x%lx",
> + (void *)__entry->address, __entry->cause)