Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Aug 2019 09:07:16 -0700
From:      Navdeep Parhar <nparhar@gmail.com>
To:        shreyank amartya <shreyankfbsd@gmail.com>, freebsd-drivers@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: hwpmc ktrdump: failed to resolve ktr symbols
Message-ID:  <0534e1a9-af57-96cf-9ea2-ec4b30021226@gmail.com>
In-Reply-To: <CAD9jf8BXm2PgY=5DkKxrweuG4x-QEERhJyPTESCkxt_Bi84E9Q@mail.gmail.com>
References:  <CAD9jf8BXm2PgY=5DkKxrweuG4x-QEERhJyPTESCkxt_Bi84E9Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0534e1a9-af57-96cf-9ea2-ec4b30021226>