Return-path: Received: from tyo201.gate.nec.co.jp ([202.32.8.193]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QrfML-0007oy-St for kexec@lists.infradead.org; Fri, 12 Aug 2011 00:12:23 +0000 Date: Fri, 12 Aug 2011 08:51:36 +0900 From: "Ken'ichi Ohmichi" Subject: Re: [PATCH v2 5/8] makedumpfile: Read and process filter commands from config file. Message-Id: <20110812085136.cff32f84.oomichi@mxs.nes.nec.co.jp> In-Reply-To: <20110811115124.GA2817@in.ibm.com> References: <20110517200407.12740.95780.stgit@mars.in.ibm.com> <20110811110716.7aec3c9e.oomichi@mxs.nes.nec.co.jp> <20110811141751.7927b2bb.oomichi@mxs.nes.nec.co.jp> <20110811172900.ad5c50b6.oomichi@mxs.nes.nec.co.jp> <20110811115124.GA2817@in.ibm.com> Mime-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: kexec-bounces@lists.infradead.org Errors-To: kexec-bounces+dwmw2=twosheds.infradead.org@lists.infradead.org To: mahesh@linux.vnet.ibm.com Cc: V Srivatsa , Ananth N Mavinakayanahalli , kexec@lists.infradead.org, Dave Anderson , Prerna Saxena , Reinhard Hi Mahesh, On Thu, 11 Aug 2011 17:21:24 +0530 Mahesh J Salgaonkar wrote: > > > > > > > > BTW makedumpfile.c has become a large file which is bigger than 10KLine, > > > > and I will separate it to some files for the maintenance. > > > > > > To shrink makedumpfile.c file, I made a prototype patch. > > > (commit 40f5724152047a12e4ac9db51d9f9e00e7a79ebe of filter-out-devel branch) > > > And I'd like to see your opinion. > > > > > > You added sym_in_module() call into get_symbol_addr() to look for module > > > symbol. And I will move the call to resolve_config_entry() because I guess > > > sym_in_module() is used only for resolve_config_entry(): > > > > > > @@ -8448,13 +7326,21 @@ resolve_config_entry(struct config_entry *ce, unsigned long long base_addr, > > > char *base_struct_name) > > > { > > > char buf[BUFSIZE + 1]; > > > + unsigned long long symbol; > > > > > > if (ce->flag & SYMBOL_ENTRY) { > > > /* find the symbol info */ > > > if (!ce->name) > > > return FALSE; > > > > > > - ce->sym_addr = get_symbol_addr(ce->name); > > > + /* > > > + * If we are looking for module symbol then traverse through > > > + * mod_st.modules for symbol lookup > > > + */ > > > + if (sym_in_module(ce->name, &symbol)) > > > + ce->sym_addr = symbol; > > > + else > > > + ce->sym_addr = get_symbol_addr(ce->name); > > > if (!ce->sym_addr) { > > > ERRMSG("Config error at %d: Can't find symbol '%s'.\n", > > > ce->line, ce->name); > > > --- > > > > Sorry, the above mail is not clear. > > My question is, > > Do you think this change is right ? > > My intention was to hide it under get_symbol_addr(). But yes, since it's > only used by resolve_config_entry() we can safely move it there. Thank you for checkint it. makedumpfile.c file has been shrunk from 10KLines to 9KLines, and I will make the file small more. Thanks Ken'ichi Ohmichi _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec