lkml.org 
[lkml]   [2009]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6] tracing, page-allocator: Add trace event for page traffic related to the buddy lists
On Fri, Aug 07, 2009 at 04:04:37PM +0800, Li Zefan wrote:
> > +TRACE_EVENT(mm_page_alloc_zone_locked,
> > +
> > + TP_PROTO(struct page *page, unsigned int order,
> > + int migratetype, int percpu_refill),
> > +
> > + TP_ARGS(page, order, migratetype, percpu_refill),
> > +
> > + TP_STRUCT__entry(
> > + __field( struct page *, page )
> > + __field( unsigned int, order )
> > + __field( int, migratetype )
> > + __field( int, percpu_refill )
> > + ),
> > +
> > + TP_fast_assign(
> > + __entry->page = page;
> > + __entry->order = order;
> > + __entry->migratetype = migratetype;
> > + __entry->percpu_refill = percpu_refill;
> > + ),
> > +
> > + TP_printk("page=%p pfn=%lu order=%u migratetype=%d cpu=%d percpu_refill=%d",
> > + __entry->page,
> > + page_to_pfn(__entry->page),
> > + __entry->order,
> > + __entry->migratetype,
> > + smp_processor_id(),
>
> This is the cpu when printk() is called, but not the cpu when
> this event happens.
>
> And this information has already been stored, and is printed
> if context-info option is set, which is set by default.
>

/me slaps self

I even know the CPU column was there in the trace output. What was I
thinking :/

Thanks

> > + __entry->percpu_refill)
> > +);
> > +
> > +TRACE_EVENT(mm_page_pcpu_drain,
> > +
> > + TP_PROTO(struct page *page, int order, int migratetype),
> > +
> > + TP_ARGS(page, order, migratetype),
> > +
> > + TP_STRUCT__entry(
> > + __field( struct page *, page )
> > + __field( int, order )
> > + __field( int, migratetype )
> > + ),
> > +
> > + TP_fast_assign(
> > + __entry->page = page;
> > + __entry->order = order;
> > + __entry->migratetype = migratetype;
> > + ),
> > +
> > + TP_printk("page=%p pfn=%lu order=%d cpu=%d migratetype=%d",
> > + __entry->page,
> > + page_to_pfn(__entry->page),
> > + __entry->order,
> > + smp_processor_id(),
>
> ditto
>
> > + __entry->migratetype)
> > +);
> > +
>

--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab


\
 
 \ /
  Last update: 2009-08-07 13:03    [W:0.050 / U:2.180 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site