Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932149AbWANPj4 (ORCPT ); Sat, 14 Jan 2006 10:39:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932161AbWANPj4 (ORCPT ); Sat, 14 Jan 2006 10:39:56 -0500 Received: from 219-75-232-131.eonet.ne.jp ([219.75.232.131]:59917 "HELO viper2.netfort.gr.jp") by vger.kernel.org with SMTP id S932149AbWANPjz (ORCPT ); Sat, 14 Jan 2006 10:39:55 -0500 Date: Sun, 15 Jan 2006 00:39:55 +0900 Message-ID: <87oe2e7r90.dancerj%dancer@netfort.gr.jp> From: Junichi Uekawa To: debian-devel@lists.debian.org, oprofile-list@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Subject: A standard location to find 'vmlinux' to use for oprofile In-Reply-To: <87d5ja3y23.fsf@glaurung.internal.golden-gryphon.com> References: <87d5lbstf9.fsf@glaurung.internal.golden-gryphon.com> <87lkzygf4t.dancerj%dancer@netfort.gr.jp> <87d5ja3y23.fsf@glaurung.internal.golden-gryphon.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/21.4 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2064 Lines: 50 Hi, Cc'ing oprofile-list to see if anyone is interested in this topic. > > I've been pondering on using kernel-package to generate debug > > 'vmlinux' images which are used in tools like kernel crash dump > > analysis tools and oprofile[1]. > > > Currently I'm running 'make vmlinux' after generating a package, but > > it would be convenient if 'vmlinux' is included somewhere like > > /usr/lib/debug/lib/modules/`uname -r`/vmlinux (which seems to be the > > case with RedHat[2]). > > Support for this is already there -- if the config var > install_vmlinux is set, and your architectures make snippet defines > where to find the vmlinux, and where to install it, you are done. > > So, just provide data about kelfimagesrc and kelfimagedest for > files in /usr/share/kernel-package/rulesets/arches/, and then anyone > can set install_vmlinux to get the end result. The remaining problem is that we don't really have a standard location for 'vmlinux'. For most cases, you can find the required file in /lib/modules/$(uname -r)/build/vmlinux but that's only available when you've built the kernel on that machine and have the build tree lying around. This is what oprofile currently does: oprofile-0.9.1/gui/oprof_start_config.cpp: /* Guess path to vmlinux based on kernel currently running. */ oprofile-0.9.1/gui/oprof_start_config.cpp: string const vmlinux_path("/lib/modules/" + version oprofile-0.9.1/gui/oprof_start_config.cpp: + "/build/vmlinux"); oprofile-0.9.1/gui/oprof_start_config.cpp: kernel_filename = vmlinux_path; It would be nice if it's possible to obtain the location information somewhere, in a distribution-agnostic manner. regards, junichi -- dancer@{debian.org,netfort.gr.jp} Debian Project - 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/