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 09:53:17AM +0200, Ingo Molnar wrote:
>
> * Mel Gorman <mel@csn.ul.ie> wrote:
>
> > +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(),
> > + __entry->migratetype)
>
> > + trace_mm_page_alloc_zone_locked(page, order, migratetype, order == 0);
>
> This can be optimized further by omitting the migratetype field and
> adding something like this:
>
> TP_printk("page=%p pfn=%lu order=%d cpu=%d migratetype=%d",
> __entry->page,
> page_to_pfn(__entry->page),
> __entry->order,
> smp_processor_id(),
> __entry->order == 0);
>
> The advantage is 4 bytes less in the record and a shorter tracepoint
> fast-path - while still having the same output.
>

Knowing you meant percpu_refill, it's now been figured out in TP_printk
instead of in the code.

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


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