All of lore.kernel.org
 help / color / mirror / Atom feed
From: dhara buch <dharabuchphd@gmail.com>
To: Michael Petlan <mpetlan@redhat.com>
Cc: xen-devel@lists.xen.org
Subject: Re: Oprofile Report
Date: Fri, 24 Mar 2017 14:37:25 +0530	[thread overview]
Message-ID: <CA+ALRJVgWtcHXUMRUwy2hNi8pmTK_VwYLRe9Wvxdm291fVeaqQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.LRH.2.20.1703231526530.19588@Diego>


[-- Attachment #1.1: Type: text/plain, Size: 3723 bytes --]

Hi,

Yes, when I try to execute 'opreport --symbols --debug-info' command after
doing profiling for a .c file (let operf ./test),

I am expecting 'test.c:line_no' in linear info field as you are getting
'exact_counts.c:13' in the following:

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

I tried to install debuginfo using
#debuginfo-install kernel command.

But when I execute 'opreport --symbols --debug-info', I get only (no
location information)  in all of my samples.

What may be the reason?

On Thu, Mar 23, 2017 at 8:08 PM, Michael Petlan <mpetlan@redhat.com> wrote:

> 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 #1.2: Type: text/html, Size: 6642 bytes --]

[-- 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-24  9:07 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
2017-03-24  9:07   ` dhara buch [this message]
     [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=CA+ALRJVgWtcHXUMRUwy2hNi8pmTK_VwYLRe9Wvxdm291fVeaqQ@mail.gmail.com \
    --to=dharabuchphd@gmail.com \
    --cc=mpetlan@redhat.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.