* little confuse about kernel trace point
@ 2012-03-27 3:06 ch huang
2012-03-27 4:13 ` Josh Stone
0 siblings, 1 reply; 2+ messages in thread
From: ch huang @ 2012-03-27 3:06 UTC (permalink / raw)
To: systemtap
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: little confuse about kernel trace point
2012-03-27 3:06 little confuse about kernel trace point ch huang
@ 2012-03-27 4:13 ` Josh Stone
0 siblings, 0 replies; 2+ messages in thread
From: Josh Stone @ 2012-03-27 4:13 UTC (permalink / raw)
To: ch huang; +Cc: systemtap
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-27 4:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 3:06 little confuse about kernel trace point ch huang
2012-03-27 4:13 ` Josh Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).