lkml.org 
[lkml]   [2015]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] tracing/mm: Don't trace mm_page_pcpu_drain on offline cpus

>> -DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain,
>> +TRACE_EVENT_CONDITION(mm_page_pcpu_drain,
>>
>> TP_PROTO(struct page *page, unsigned int order, int migratetype),
>>
>> TP_ARGS(page, order, migratetype),
>>
>> + TP_CONDITION(cpu_online(smp_processor_id())),
>> +
>> + TP_STRUCT__entry(
>> + __field( unsigned long, pfn )
>> + __field( unsigned int, order )
>> + __field( int, migratetype )
>> + ),
>> +
>> + TP_fast_assign(
>> + __entry->pfn = page ? page_to_pfn(page) : -1UL;
>> + __entry->order = order;
>> + __entry->migratetype = migratetype;
>> + ),
>> +
>
> What was the need to do the above changes besides adding TP_CONDITION ?
>

IIUC there is no existing macro which can both add a condition and
override printk format, hence the fall back to TRACE_EVENT_CONDITION.

Thanks,
Shreyas



\
 
 \ /
  Last update: 2015-04-29 17:21    [W:0.674 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site