From owner-freebsd-hackers@FreeBSD.ORG Mon May 31 16:44:17 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E4151065675 for ; Mon, 31 May 2010 16:44:17 +0000 (UTC) (envelope-from shrikanth07@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id AE5608FC26 for ; Mon, 31 May 2010 16:44:16 +0000 (UTC) Received: by gyh20 with SMTP id 20so3686683gyh.13 for ; Mon, 31 May 2010 09:44:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=JgWi0APcs6OzOX/TeXvKnSzbpdlqEt7h3MfZJuYImnk=; b=da6EL/x/YQKJpoIz5wBfcorU7i7XYKKoBUxkVe12wgrTlslUwrmdMOkDUB/fzXy8MM 3Ac4zUftSVAsUg37AeG5hXVPmJNHMd8L6FwhLNUlqQpKRbuLbF8jwf00WlMp9aub7FEY FF9UcqzWN6k29EmcKUsg2HXccyjKdsI6hRoEw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=hXAqdltH3hlEEp96ZV+7RoQVpNdwL3L/LYKpqEvJdlxyr1yOIiu9IBUSR10lIr1vGw /xh78wbPRASfTQag6P00cisBF1ll4Od+4WOy7nXj+SQHwM0Ulwzcp9O8SdSD54dk/gOt rnH64L+W8zwvSTZckcWIr/W/rmUyYSoThcdZA= MIME-Version: 1.0 Received: by 10.224.59.12 with SMTP id j12mr1818876qah.94.1275324255430; Mon, 31 May 2010 09:44:15 -0700 (PDT) Received: by 10.229.88.140 with HTTP; Mon, 31 May 2010 09:44:15 -0700 (PDT) In-Reply-To: References: Date: Mon, 31 May 2010 22:14:15 +0530 Message-ID: From: Shrikanth Kamath To: Artem Belevich Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: DTrace and CTF data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2010 16:44:17 -0000 Thanks Artem, but I was actually asking about the CTF info, I always thought the probes used the CTF info for *knowing* where to instrument. So if I ran the CTFCONVERT utility on a *binary*, it should append CTF sections to it should it not ? If the CTFCONVERT ran successfully I should be able to see a .SUNW_ctf section when I run objdump --section-headers. But since this was not there in the binary but still FBT was able to instrument the *entry* of the function I was curious does FBT provider need the CTF info for function entry/return ? -- Shrikanth R K On Mon, May 31, 2010 at 2:21 AM, Artem Belevich wrote: > You may be confusing CTF info and the probes. Those are different things. > > CTF info just describes data types and variable/function location. > DTrace later uses it to figure out where and how to install the > probes. > > Probes are installed dynamically, at runtime when DTrace program is > run. That's why you see it with kgdb on the live kernel once probe has > been installed. > DTrace does not modify your original kernel binary, so you will not > see any probes there. > > --Artem > > > > On Sun, May 30, 2010 at 12:10 PM, Shrikanth Kamath > wrote: > > I have a query about the FBT provider in DTrace, does FBT provider not > need > > the CTF info for the /kernel binary... > > > > I have this observation, when I disassemble say a 'kernel_funtion' , I > see > > the function is not instrumented... > > > > (kgdb) disassemble kernel_function > > Dump of assembler code for function kernel_function: > > 0xc04aa05d : push %ebp > > 0xc04aa05e : mov %esp,%ebp > > 0xc04aa060 : sub $0x2c,%esp > > > > > > Now after I did a 'fbt::kernel_function:entry', if I disassemble the > > 'kernel_function'... > > > > (kgdb) disassemble kernel_function > > Dump of assembler code for function kernel_function: > > 0xc04aa05d : lock mov %esp,%ebp <== > FBT > > instrumentation > > 0xc04aa060 : sub $0x2c,%esp > > > > If I do a 'objdump' on the kernel.debug binary I do not see any CTF > sections > > showing up? > > > > > > -- > > Shrikanth R K > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to " > freebsd-hackers-unsubscribe@freebsd.org" > > >