Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755677AbYHNXln (ORCPT ); Thu, 14 Aug 2008 19:41:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752119AbYHNXld (ORCPT ); Thu, 14 Aug 2008 19:41:33 -0400 Received: from mx1.redhat.com ([66.187.233.31]:48455 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbYHNXlc (ORCPT ); Thu, 14 Aug 2008 19:41:32 -0400 Message-ID: <48A4C25E.2060405@redhat.com> Date: Thu, 14 Aug 2008 19:40:14 -0400 From: Steven Rostedt User-Agent: Thunderbird 1.5.0.12 (X11/20071019) MIME-Version: 1.0 To: Rusty Russell CC: Steven Rostedt , linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Andrew Morton , Linus Torvalds , David Miller , Mathieu Desnoyers , Roland McGrath , Ulrich Drepper , Jeremy Fitzhardinge , Gregory Haskins , Arnaldo Carvalho de Melo , "Luis Claudio R. Goncalves" , Clark Williams , Bruce Duncan , Marcin Slusarz Subject: Re: [PATCH v2 3/6] ftrace: enable mcount recording for modules References: <20080814194506.233473381@goodmis.org> <20080814194859.811269740@goodmis.org> <200808150926.08200.rusty@rustcorp.com.au> In-Reply-To: <200808150926.08200.rusty@rustcorp.com.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 873 Lines: 30 Rusty Russell wrote: > On Friday 15 August 2008 05:45:09 Steven Rostedt wrote: > >> This patch enables the loading of the __mcount_section of modules and >> changing all the callers of mcount into nops. >> > ... > >> + if (mcountindex) { >> + void *mseg = (void *)sechdrs[mcountindex].sh_addr; >> + ftrace_init_module(mseg, mseg + sechdrs[mcountindex].sh_size); >> > > You don't actually need the if. The size of section 0 is 0. > Thanks, But I find the if is a bit more clear. It may confuse code reviewers if we expect them to know that sechdrs[0].sh_size is zero. This isn't a hot path. -- Steve -- 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/