This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: little confuse about kernel trace point
On 03/26/2012 11:06 PM, ch huang wrote:
> i see the following code in example script
>
>
> probe kernel.trace("mm_pdflush_kupdate") {
> if (!log_event()) next
> kupdate[pid()] <<< $count
> command[pid()] = execname()
> }
>
> so when i search "mm_pdflush_kupdate" i find something about trace
> point define named mm_pdflush_kupdate
>
> in file include/trace/mm.h
>
> 62 DEFINE_TRACE(mm_pdflush_kupdate,
> 63 TPPROTO(unsigned long count),
> 64 TPARGS(count));
>
> it seems mm_pdflush_kupdate trace a variable in kernel code,but how
> can i find exactly name ? and in which function?
To see how any tracepoint is used, look in the kernel source for a
trace_NAME() call -- in this case you'll find in mm/page-writeback.c:
422 static void wb_kupdate(unsigned long arg)
423 {
...
445 nr_to_write = global_page_state(NR_FILE_DIRTY) +
446 global_page_state(NR_UNSTABLE_NFS) +
447 (inodes_stat.nr_inodes - inodes_stat.nr_unused);
448 trace_mm_pdflush_kupdate(nr_to_write);