From owner-freebsd-current@FreeBSD.ORG Sat Apr 9 20:35:13 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27389106564A for ; Sat, 9 Apr 2011 20:35:13 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout019.mac.com (asmtpout019.mac.com [17.148.16.94]) by mx1.freebsd.org (Postfix) with ESMTP id 09F5F8FC08 for ; Sat, 9 Apr 2011 20:35:12 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [10.1.2.92] ([173.200.187.194]) by asmtp019.mac.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LJE005R1JU4HC70@asmtp019.mac.com>; Sat, 09 Apr 2011 13:34:53 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2011-04-09_07:2011-04-09, 2011-04-09, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=2 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1104090086 From: Chuck Swiger In-reply-to: Date: Sat, 09 Apr 2011 13:34:52 -0700 Message-id: References: To: Chris Richardson X-Mailer: Apple Mail (2.1084) Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: Kernel Tracking Question.. regarding kernel and boot files X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2011 20:35:13 -0000 Hi, Chris-- [ ...Reply-to: set to direct towards the most appropriate list... ] On Apr 9, 2011, at 8:31 AM, Chris Richardson wrote: > I am totally new to FreeBSD. I was involved within project which will > trace the kernel. I used ktrace but I could not get appropriate results > about the files being opened. I don't see any of the boot files boot0-1 or 2 > in the ktrace.out file. Where did they go? The bootstrap loader stages are what loads and runs the kernel. ktrace isn't available until afterwards, when the kernel is running. > Is ktrace the best "trace suite" for freebsd kernel? Kinda depends on what you are doing. Setting up good logging and making userland interfaces for getting to useful information (cf vmstat, ps, iostat, etc) is more likely to be useful over the longer run. > What about going through source code .. Is it better to > use Combination of Ecllipse/Qemu and FreeBSD Source tree? Eclipse is an editor. If you like it in particular, free free to use it, otherwise pick something else you'd prefer to use for C code. > Does this method will provide us with someway to see how booting process invokes > the kernel to memory ? Any help will be appreciated. You're asking about the process here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-blocks.html ...? Frankly, none of these are especially big, start by reviewing the source code for 'em. Regards, -- -Chuck