using perf tool
sohamwonderpiku4u at gmail.com
Sun Dec 8 14:17:07 EST 2013
You can annotate from within the perf report itself. What you have to do is
to take the perf record output. That will create a perf.data file. Now, run
perf archive. This will create a tarball.
Next, on the analyzing system (considering the output taken previously
needs to be examined on another system), copy over both the files. And then
as non-root run,
tar -zxvf filename.tar.bz2 ~/.debug
What this will do is that the unique build-ids corresponding to each ELF
image in the first system will be copied over to the new system (not
replacing but just plain copying for the purpose of analysis).
Now you run perf report on it and from inside of it, run annotate. It does
not need to be on the same kernel version or rather even, same hardware
architecture. It will run on whatever is there, x86_64, ARM, s390 etc.
On Sat, Dec 7, 2013 at 10:48 AM, Abu Rasheda <rcpilot2010 at gmail.com> wrote:
> I figure out, it quite simple. Writing steps here, so it may be useful
> for someone in future.
> perf record -a
> ctrl-C when done collecting data
> copy kernel_module.ko to
> perf annotate function_name_in_kernel_module
> Since you compiled kernel module on this machine, perf can get path
> from the binary and locate the source. enjoy.
> On Fri, Dec 6, 2013 at 7:14 PM, Abu Rasheda <rcpilot2010 at gmail.com> wrote:
> > Guys,
> > I want to annotate Linux kernel module with c-source using perf tool.
> > Is it possible ? can someone points me to the instructions how to do
> > this ?
> > Thanks
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernelnewbies