[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: hwpmc ktrdump: failed to resolve ktr symbols
From:       shreyank amartya <shreyankfbsd () gmail ! com>
Date:       2019-09-12 8:54:02
Message-ID: CAD9jf8DwYRr1gBKF2u8MSxrWdv9GZTs-CDO=Pfp9xMPAEkBbdw () mail ! gmail ! com
[Download RAW message or body]

Thanks, yes it seems I was missing both those options (KTR and DDB) in my
kernel config.
Now, I have a module (hwpmc) from which I intend to collect traces.
However, when I build and load it, I don't see any ktraces when using it.
But if I install it and load the module on boot, ktraces appear. Why does
that happen? Anyway around that?

Thanks
Shreyank

On Fri, Aug 30, 2019 at 9:37 PM Navdeep Parhar <nparhar@gmail.com> wrote:

> On 2019-08-30 03:54, shreyank amartya wrote:
> > Hi,
> >
> > I'm trying to collect traces from hwpmc module. I compiled the module
> with
> > -DHWPMC_DEBUG option and set the sysctl kern.hwpmc.debugflags but I'm
> > unable to retrive the traces using ktrdump. I get this error message:
> >
> > ktrdump: failed to resolve ktr symbols
> >
> > I'm guessing that this error occurs because the symbols for hwpmc module
> > (compiled and loaded separately) are not a part of kernel. If this is the
> > case, then how do I get those symbols. In the ktr man page its also
> > mentioned that ddb and gdb can retrieve ktraces.
> >
> > I found the ddb command show ktr. But how do I invoke ddb (without a
> panic)?
>
> sysctl debug.kdb.enter=1
>
> >
> > I'm unable to find how can I use gdb to view the traces (I launched kgdb
> > but could not find a command to show kernel traces).
> >
> > Any idea on how to get ktrdump working? Or get the kernel traces.
>
> You need a kernel with KTR support.  See ktr(4) for a full list of
> the options and other details.  See "sysctl kern.conftxt" for what's
> in your running kernel.
>
> Regards,
> Navdeep
>
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic