Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760085AbZFQW0S (ORCPT ); Wed, 17 Jun 2009 18:26:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756097AbZFQW0I (ORCPT ); Wed, 17 Jun 2009 18:26:08 -0400 Received: from mx2.redhat.com ([66.187.237.31]:55403 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756054AbZFQW0G (ORCPT ); Wed, 17 Jun 2009 18:26:06 -0400 Message-ID: <4A396DD6.2050002@redhat.com> Date: Wed, 17 Jun 2009 18:27:34 -0400 From: Masami Hiramatsu User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Tim Abbott CC: Ingo Molnar , Ananth N Mavinakayanahalli , lkml , "H. Peter Anvin" , Frederic Weisbecker , Jim Keniston , Srikar Dronamraju , Christoph Hellwig , Steven Rostedt , Anders Kaseorg , systemtap , DLE Subject: Re: [RFC][ PATCH -tip 0/6] kprobes: Kprobes jump optimization support References: <20090612224925.17825.49637.stgit@localhost.localdomain> <4A381F8A.8020105@redhat.com> In-Reply-To: <4A381F8A.8020105@redhat.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1819 Lines: 51 Masami Hiramatsu wrote: >> (1) The compiler is allowed to do cross-function optimization within a >> compilation unit where code in one function jumps into the middle of >> another function. > > Hmm, right. This is a real problem. I think I have 2 options for this > issue. I counted the cross-function jumps on my kernel roughly, and > I found there were about 856 jumps jump into 158 functions (it might be > incorrect, I just used 'objdump -d', and it also disassembles data > section...) Hmm, almost all of these functions are jumped from .fixup section. Obviously, these should be mentioned. > - Making a blacklist of target functions or addresses which cross-function > jumps jump into. This will be done by disassembling kernel when starting up > kernel and loading modules.(or, at build-time) If we can make this blacklist, it will include above .fixup section. > > - Just disables cross-function optimization by adding --param > min-crossjump-insns=XXXX where XXXX is enough big number, when > CONFIG_OPTPROBES=y BTW, I've tried to compile with min-crossjump-insns=32768. It actually increased vmlinux size (about 1%), text data bss dec hex filename 5767574 2022487 1521264 9311325 8e145d vmlinux-crossjump 5809551 2022487 1521264 9353302 8eb856 vmlinux-noncrossjump However, with crossjumps opt, it seems not to add any jumps which jump into the middle of other functions... Thanks, -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America), Inc. Software Solutions Division e-mail: mhiramat@redhat.com -- 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/