All of lore.kernel.org
 help / color / mirror / Atom feed
* Oprofile Report
@ 2017-03-23 10:58 dhara buch
  2017-03-23 14:38 ` Michael Petlan
  0 siblings, 1 reply; 4+ messages in thread
From: dhara buch @ 2017-03-23 10:58 UTC (permalink / raw)
  To: Michael Petlan, xen-devel


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

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?

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.

What is lacking?

Thank you,

Dhara buch

[-- Attachment #1.2: Type: text/html, Size: 1139 bytes --]

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Oprofile Report
  2017-03-23 10:58 Oprofile Report dhara buch
@ 2017-03-23 14:38 ` Michael Petlan
  2017-03-24  9:07   ` dhara buch
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Petlan @ 2017-03-23 14:38 UTC (permalink / raw)
  To: dhara buch; +Cc: xen-devel

[-- 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Oprofile Report
  2017-03-23 14:38 ` Michael Petlan
@ 2017-03-24  9:07   ` dhara buch
       [not found]     ` <alpine.LRH.2.20.1703241047200.15349@Diego>
  0 siblings, 1 reply; 4+ messages in thread
From: dhara buch @ 2017-03-24  9:07 UTC (permalink / raw)
  To: Michael Petlan; +Cc: xen-devel


[-- 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Oprofile Report
       [not found]     ` <alpine.LRH.2.20.1703241047200.15349@Diego>
@ 2017-03-24 11:02       ` dhara buch
  0 siblings, 0 replies; 4+ messages in thread
From: dhara buch @ 2017-03-24 11:02 UTC (permalink / raw)
  To: Michael Petlan; +Cc: xen-devel


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

Actually, I am compiling a very simple c program test.c with

gcc -g test.c -o test

but it is not affecting output. Is there any way by which I can check
whether the binary image generates debug info or not?

On Fri, Mar 24, 2017 at 3:26 PM, Michael Petlan <mpetlan@redhat.com> wrote:

> Please read my previous message once more:
>
>       Hi, I think you need to rebuild the test with '-g' switch.
>       If the test binary does not have debuginfo, opreport cannot
>       resolve that.
>
> On Fri, 24 Mar 2017, dhara buch wrote:
>
>> 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?
>>
>
> The reason is that OProfile cannot find debuginfo of your test app.
> Probably because it does not contain any ;-)
>
> Recompile your test application with the '-g' gcc switch.
>
>
> FURTHER INFO:
>
> If you are profiling an application installed from packages, you
> need to have the corresponding debuginfo package. For example,
> for profiling firefox, you need firefox-debuginfo (RHEL, Fedora,
> CentOS) or (probably) firefox-dbg packages (Ubuntu). It's also
> good to have the debuginfos of all the required libraries.
>
> On RHEL/CentOS/Fedora, you can install that easily by:
> debuginfo-install <your_package>
>
> Cheers,
> Michael
>
>
>
>> 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: 7648 bytes --]

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-24 11:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 10:58 Oprofile Report dhara buch
2017-03-23 14:38 ` Michael Petlan
2017-03-24  9:07   ` dhara buch
     [not found]     ` <alpine.LRH.2.20.1703241047200.15349@Diego>
2017-03-24 11:02       ` dhara buch

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.