Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 May 2010 22:14:15 +0530
From:      Shrikanth Kamath <shrikanth07@gmail.com>
To:        Artem Belevich <fbsdlist@src.cx>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: DTrace and CTF data
Message-ID:  <AANLkTikLmVw-A_YWIc7zMa-duksynpy0YVVI-3zPlIMe@mail.gmail.com>
In-Reply-To: <AANLkTilgGU-v4fQmwKMjevqoX2e8IOaCLz72ZJ_ZJm2f@mail.gmail.com>
References:  <AANLkTinuvZ_8onIF1O1Z42TiItqFDDUmng8PtWCnZQmm@mail.gmail.com> <AANLkTilgGU-v4fQmwKMjevqoX2e8IOaCLz72ZJ_ZJm2f@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <fbsdlist@src.cx> 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
> <shrikanth07@gmail.com> 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 <kernel_function+0>: push   %ebp
> > 0xc04aa05e <kernel_function+1>: mov    %esp,%ebp
> > 0xc04aa060 <kernel_function+3>: 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 <kernel_function+0>: lock mov %esp,%ebp                 <==
> FBT
> > instrumentation
> > 0xc04aa060 <kernel_function+3>: 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"
> >
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikLmVw-A_YWIc7zMa-duksynpy0YVVI-3zPlIMe>