Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423251AbbD2Oth (ORCPT ); Wed, 29 Apr 2015 10:49:37 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:41704 "EHLO e28smtp08.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031690AbbD2Ote (ORCPT ); Wed, 29 Apr 2015 10:49:34 -0400 Message-ID: <5540EF78.8000409@linux.vnet.ibm.com> Date: Wed, 29 Apr 2015 20:19:28 +0530 From: Shreyas B Prabhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Preeti Murthy , rostedt@goodmis.org CC: Paul McKenney , LKML , Ingo Molnar , aneesh.kumar@linux.vnet.ibm.com, Preeti U Murthy Subject: Re: [PATCH 3/3] tracing/mm: Don't trace mm_page_pcpu_drain on offline cpus References: <1430236283-29360-1-git-send-email-shreyas@linux.vnet.ibm.com> <1430236283-29360-3-git-send-email-shreyas@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042914-0029-0000-0000-0000059A1FFA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 37 >> -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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/