All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Petlan <mpetlan@redhat.com>
To: dhara buch <dharabuchphd@gmail.com>
Cc: xen-devel@lists.xen.org
Subject: Re: Oprofile Report
Date: Thu, 23 Mar 2017 15:38:03 +0100 (CET)	[thread overview]
Message-ID: <alpine.LRH.2.20.1703231526530.19588@Diego> (raw)
In-Reply-To: <CA+ALRJVF6BoEwXkX_3Co_O10EMYG73xzAoF=birTSxH0e5GUNg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2780 bytes --]

On Thu, 23 Mar 2017, dhara buch wrote:
> Hello,
> I am doing profiling with command, 
> 
> operf ./test --events=BR_INST_RETIRED
> where test.c is a simple c language file. 
> 
> then, I am trying to collect information with command
>  
> opreport --symbols --debug-info
> 
> From the documents of Oprofile, I assume that the above command lists profiling result as per the symbols i.e. I can get result showing samples, linear info, image name and symbol name.
> 
> As per my command I expect my file name (test.c) to be in the linear info and image name, but shows [no location information] in linear info. The filename does not get listed in image
> name also. 
> 
> What is lacking?

Hi, I think you need to rebuild the test with '-g' switch.
If the test binary does not have debuginfo, opreport cannot
resolve that.

Me trying with debuginfo:

samples  %        linenr info                 image name               symbol name
10       66.6667  (no location information)   no-vmlinux               /no-vmlinux
2        13.3333  exact_counts.c:13           exact_counts             main
1         6.6667  exact_counts.c:10           exact_counts             f_65535x
1         6.6667  exact_counts.c:9            exact_counts             f_997x
1         6.6667  (no location information)   ld-2.17.so               _dl_fini

And without:

samples  %        linenr info                 image name               symbol name
10       55.5556  (no location information)   no-vmlinux               /no-vmlinux
3        16.6667  (no location information)   exact_counts             f_65535x
2        11.1111  (no location information)   exact_counts             main
1         5.5556  (no location information)   ld-2.17.so               _dl_add_to_slotinfo
1         5.5556  (no location information)   ld-2.17.so               _dl_next_tls_modid
1         5.5556  (no location information)   ld-2.17.so               _dl_relocate_object

Is this the problem you are asking about?

> 
> I tried to set vmlinux with operf --vmlinux option also where vmlinux file in in /usr/lib/debug/lib/4*/vmlinux, still the above commands do not list test file entries.

The "--vmlinux" option is there for enabling this for samples
obtained in kernelspace.

By default (assuming you have no kernel debuginfo available),
operf marks all the samples taken in kernel (e.g. your program
called a syscall and the sample was taken when the syscall was
being executed or you profile systemwide) as "no-vmlinux".

This is sufficient if you care about userspace only and not about
the "time" spent in kernel.

If you care about kernelspace, you need the '--vmlinux' option
with correct path specified.

> 
> What is lacking?
> 
> Thank you,
> 
> Dhara buch
> 
>

Has this helped?

Cheers,
Michael

>

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-03-23 14:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 10:58 Oprofile Report dhara buch
2017-03-23 14:38 ` Michael Petlan [this message]
2017-03-24  9:07   ` dhara buch
     [not found]     ` <alpine.LRH.2.20.1703241047200.15349@Diego>
2017-03-24 11:02       ` dhara buch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.20.1703231526530.19588@Diego \
    --to=mpetlan@redhat.com \
    --cc=dharabuchphd@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.