I'll follow that approach.
On Fri, Mar 10, 2023, at 12:02 PM, Steven Rostedt wrote:
On Fri, 10 Mar 2023 11:22:54 -0800Stefan Roesch <shr@xxxxxxxxxxxx> wrote:> >> + trace_ksm_remove_rmap_item(stable_node->kpfn, rmap_item, rmap_item->mm);> >> > Instead of dereferencing the stable_node here, where the work could> > possibly happen outside the trace event and in the hot path, could you pass> > in the stable_node instead, and then in the TP_fast_assign() do:> >> > __entry->pfn = stable_node->kpfn;> >> >>> To do this, the structure would need to be exposed. Currently the> structure is defined in ksm.c. This is an internal structure that we> most likely don't want to expose. We can get by not printing the pfn> and use the rmap_item to refer back to it, but exposing it directly> here is more convenient for debugging.>> Any thoughts?Sounds like the include/trace/events/ksm.h should be local too.See my reply about include/trace/events/thermal.hAnd their solution.I suggest you do the same.-- Steve