Maynard Johnson | 2 Aug 2010 23:42
Picon
Favicon

Re: [PATCH] Clean up overflow stats message

Suravee Suthikulpanit wrote:
> The patch looks fine.
> 
> Suravee

Patch applied.  Thanks.

-Maynard

> 
> On 7/15/2010 9:11 AM, Maynard Johnson wrote:
>> Hi, Suravee,
>> Could you please review this patch?  Thanks.
>>
>> -Maynard
>>
>> -----------------------------------------------------------------
>>
>> On 07/13/2010 6:47 PM, Maynard Johnson wrote:
>>    
>>> More than one user has reported confusion concerning the warning message "Overflow stats not
available" that can occur if you use opreport before the stats files are copied
to<session-dir>/samples/current.  Currently, the stats files are not copied over until 'opcontrol
--shutdown (or --deinit)'.  Thus, if a user does 'opcontrol --dump' and then 'opreport', the stats files
will not have been copied yet, so they'll get the pointless message.  What's worse is that if there actually
*were* overflows that occurred, they won't get the warning about that, which is what we really want.
>>>
>>> The attached patch moves the copying of the stats files do opcontrol's do_dump_data routine.  This
routine gets called anytime the user does --dump, --stop, --shutdown, or --deinit.  The multiple times
the files are copied is actually a good thing, since at each of these stages, new samples may have been
(Continue reading)

Witting, Jon [Tech] | 3 Aug 2010 16:49
Picon

OProfile unable to find image.

Hi all,

 

I have just started using Oprofile for the first time and have come across an issue I’m hoping someone can help me with.

 

I have run the following commands (in order):

 

opcontrol --init

opcontrol --setup --no-vmlinux

opcontrol --start

[I now run my executable program file]

opcontrol --dump

opcontrol --save=testSession

opreport --long-filenames

[which give the output below (I have only shown the top few lines)]

 

CPU: AMD64 processors, speed 2400.22 MHz (estimated)

Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask

of 0x00 (No unit mask) count 100000

CPU_CLK_UNHALT...|

  samples|      %|

------------------

 26126117 99.0961 /no-vmlinux

    56463  0.2142 /lib64/tls/libc-2.3.4.so

    53599  0.2033 /usr/bin/oprofiled

    22360  0.0848 /lib/tls/libc-2.3.4.so

    15797  0.0599 /opt/sunjava-1.5.0_12/jre/lib/amd64/server/libjvm.so

    14074  0.0534 /usr/lib64/libstdc++.so.6.0.3

    14017  0.0532 /lib64/ld-2.3.4.so

     6893  0.0261 /lib64/tls/libpthread-2.3.4.so

     6642  0.0252 /sbin/modprobe

     5759  0.0218 /bin/bash

     3820  0.0145 /opt/IBM/db2udb-runtime-client-V9.1FP03/db2/lib64/libdb2.so.1

     3326  0.0126 /opt/df-4.15.6/as442rw8_64/release/libdf_util_opt.so

 

opreport -l image:/no-vmlinux

[then I get the following error]

 

CPU: AMD64 processors, speed 2400.22 MHz (estimated)

Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000

samples  %        symbol name

26126117 100.000  (no symbols)

warning: /no-vmlinux could not be found.

 

I cannot understand why this can’t be found. It clearly states in the first output that it exists, with the following line:

 

‘26126117 99.0961 /no-vmlinux’

 

If someone could help explain to me what is going wrong I would really really appreciate it.

 

 

Regards,

Jon W.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
William Cohen | 3 Aug 2010 17:20
Picon
Favicon

Re: OProfile unable to find image.

On 08/03/2010 10:49 AM, Witting, Jon [Tech] wrote:
> Hi all,
> 
>  
> 
> I have just started using Oprofile for the first time and have come across an issue I’m hoping someone can
help me with.
> 
>  

> 
> I have run the following commands (in order):
> 
>  
> 
> opcontrol --init
> 
> opcontrol --setup --no-vmlinux
> 
> opcontrol --start
> 
> [I now run my executable program file]
> 
> opcontrol --dump
> 
> opcontrol --save=testSession
> 
> opreport --long-filenames
> 
> [which give the output below (I have only shown the top few lines)]

Hi Jon,

The "--no-vmlinux" option is used when you are not interested in analyzing the samples from the kernel. The
samples from the kernel are recorded in /novmlinux. However, the needed information used by opreport is missing.

To give oprofile the needed information for analyzing the kernel you should setup oprofile with something
like the following on Red Hat Enterprise Linux:

opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/`uname -r`/vmlinux

Then you should be able to do something like 

opreport -l /usr/lib/debug/lib/modules/`uname -r`/vmlinux

-Will

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
Maynard Johnson | 4 Aug 2010 01:04
Picon
Favicon

Re: Getting function listings for Kernel modules

Craig Masley wrote:
> when I run opreport this way, I get the opreport error: invalid
> --image-path=options

Aren't you also getting a message that indicates an invalid directory name?  If so, what does the complete
message say?  And what is the *exact* command you're using?

-Maynard

P.S. I re-added oprofile-list to cc.  Please don't remove it.

> 
> On Fri, Jul 30, 2010 at 12:19 PM, Maynard Johnson <maynardj <at> us.ibm.com>wrote:
> 
>> Craig Masley wrote:
>>> Hello,
>>>
>>> I'm trying to use oprofile to get information about some kernel modules
>> that
>>> I am developing.  I have gotten to the point where I can see the modules
>>> listed in my profile dump, but I can't get it to list any function level
>>> information for said module.  I was wondering if there are special flags
>>> that I have to include in my module code in order to get the detail level
>>> that I'm looking for.
>> Run opreport with " -p /lib/modules/`uname -r` ".
>>
>> -Maynard
>>>
>>> Thanks,
>>>
>>> -Craig
>>>
>>>
>>>
>>>
>>>
>> ------------------------------------------------------------------------------
>>> The Palm PDK Hot Apps Program offers developers who use the
>>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>>> of $1 Million in cash or HP Products. Visit us here for more details:
>>> http://p.sf.net/sfu/dev2dev-palm
>>>
>>>
>>>
>>> _______________________________________________
>>> oprofile-list mailing list
>>> oprofile-list <at> lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>>
>>
> 

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
Avi Gozlan | 4 Aug 2010 11:34
Picon
Favicon

Re: Re: OProfile for 64 bit

On 07/29/2010 03:49 AM, Avi Gozlan wrote:
> > Hello,
> > 
> > I'm using OProfile 0.9.4 successfully on 32 bit. However, when trying on 64 bit I get only partial
results. Sampling data for the vmlinux file are missing (sampling data for other kernel modules are
reported). 
> > 
> > The relevant vmlinux file was added in /boot, the --vmlinux configuration parameter was set
accordingly. The oprofile.ko module was compiled for 64 bit. Yet sample data for vmlinux are missing.
> > 
> > Any insight to this would help.
> > 
> > Thanks,
> > 
> > Avi

> Hi Avi,

> It would be useful to provide a few detail on the distribution, kernel version, and more detail on how you
are configuring oprofile.  Most recent kernel have support for oprofile. Should use that rather than the
kernel module built in the oprofile package. OProfile is included in a number of distributions is there a
particular reason you have to build a local copy?

> One way that I could imagine thing failing is that the oprofile daemon is not getting the address range for
the kernel and is discarding kernel samples as a result. You might take a look through
/var/lib/oprofile/samples/oprofiled.log to see if there are any clues on what is going on.

> -Will

I'm using OProfile on SecurePlatform, which is a hardened Linux OS based on RHEL3. Yet, the kernel is 2.6.18
which includes the OProfile kernel module. 

I build a local copy of OProfile user mode components since the OS is hardened. The rpm won't install either,
as it is dependant on RHEL5 rpms. I configure OProfile running './configure --prefix /usr'. The product
is then installed on the SecurePlatform machine. Please note that this procedure is used for user mode
components only (opcontrol, opreport etc.), as the OProfile kernel module is installed as part of the
Linux kernel.

This configuration works great on 32 bit machines. I get samples for kernel modules as well as for user mode
images. However this is not the case with 64 bit machines. On such machines, I get samples for user mode
images and for various kernel modules, yet not for vmlinux. I verified (using opconrol --status) that
vmlinux is configured properly. 

The vmlinux kernel as well as oprofile.ko is compiled for 64 bit (using gcc-4.1.1-52.x86_64).

Following is the information in the oprofiled.log:

oprofiled started Wed Aug  4 09:11:35 2010
kernel pointer size: 8

Wed Aug  4 09:11:58 2010

Nr. sample dumps: 2
Nr. non-backtrace samples: 13215
Nr. kernel samples: 12195
Nr. lost samples (no kernel/user): 0
Nr. lost kernel samples: 9097
Nr. incomplete code structs: 0
Nr. samples lost due to sample file open failure: 0
Nr. samples lost due to no permanent mapping: 0
Nr. event lost due to buffer overflow: 0
Nr. samples lost due to no mapping: 0
Nr. backtraces skipped due to no file mapping: 0
Nr. samples lost due to no mm: 23
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 0
Nr. backtrace aborted: 0
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 0
Nr. backtrace aborted: 0
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 0
Nr. backtrace aborted: 0
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 0
Nr. backtrace aborted: 0
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 1967
Nr. backtrace aborted: 0
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 2558
Nr. backtrace aborted: 0
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 5225
Nr. backtrace aborted: 0
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 7153
Nr. backtrace aborted: 0
oprofiled stopped Wed Aug  4 09:11:58 2010

I would be thankful if you could supply your insight.

Avi

> 
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> oprofile-list mailing list
> oprofile-list <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
Robert Richter | 4 Aug 2010 12:47
Picon
Favicon

[GIT PULL] oprofile: updates for v2.6.34

Ingo,

please pull oprofile updates for v2.6.36:

 git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git core

It's just a small number of patches, see the log below. The branch is
already in linux-next for a long time.

Thanks,

-Robert

$ git log --stat --first-parent
cc49b092d308f8ea8634134b0d95d831a88a674b..729419f0090601406abe714c5f8872a3bd53ff68 | cat
commit 729419f0090601406abe714c5f8872a3bd53ff68
Author: Arnd Bergmann <arnd <at> arndb.de>
Date:   Wed Jul 7 17:40:13 2010 -0400

    oprofile: make event buffer nonseekable

    The event buffer cannot deal with seeks, so
    we should forbid that outright.

    Signed-off-by: Arnd Bergmann <arnd <at> arndb.de>
    Cc: Robert Richter <robert.richter <at> amd.com>
    Cc: oprofile-list <at> lists.sf.net
    Signed-off-by: Robert Richter <robert.richter <at> amd.com>

 drivers/oprofile/event_buffer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

commit b12eab1a796a306caef7046b21a76efa35f5f489
Author: Denis Kirjanov <dkirjanov <at> hera.kernel.org>
Date:   Tue Jun 1 15:43:34 2010 -0400

    powerpc/oprofile: fix potential buffer overrun in op_model_cell.c

    Fix potential initial_lfsr buffer overrun.
    Writing past the end of the buffer could happen when index == ENTRIES

    Signed-off-by: Denis Kirjanov <dkirjanov <at> kernel.org>
    Cc: stable <at> kernel.org
    Signed-off-by: Robert Richter <robert.richter <at> amd.com>

 arch/powerpc/oprofile/op_model_cell.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

commit d8a382d2662822248a97ce9d670b90e68aefbd3a
Merge: 45c34e0 c6df8d5
Author: Robert Richter <robert.richter <at> amd.com>
Date:   Fri Jun 4 11:33:10 2010 +0200

    Merge remote branch 'tip/perf/urgent' into oprofile/urgent

commit 45c34e05c4e3d36e7c44e790241ea11a1d90d54e
Author: John Villalovos <sodarock <at> gmail.com>
Date:   Fri May 7 12:41:40 2010 -0400

    Oprofile: Change CPUIDS from decimal to hex, and add some comments

    Back when the patch was submitted for "Add Xeon 7500 series support to
    oprofile", Robert Richter had asked for a followon patch that
    converted all the CPU ID values to hex.

    I have done that here for the "i386/core_i7" and "i386/atom" class
    processors in the ppro_init() function and also added some comments on
    where to find documentation on the Intel processors.

    Signed-off-by: John L. Villalovos <john.l.villalovos <at> intel.com>
    Signed-off-by: Robert Richter <robert.richter <at> amd.com>

 arch/x86/oprofile/nmi_int.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
Maynard Johnson | 4 Aug 2010 14:42
Picon
Favicon

Re: OProfile for 64 bit

On 08/04/2010 4:34 AM, Avi Gozlan wrote:
> On 07/29/2010 03:49 AM, Avi Gozlan wrote:
>>> Hello,
>>>
>>> I'm using OProfile 0.9.4 successfully on 32 bit. However, when trying on 64 bit I get only partial
results. Sampling data for the vmlinux file are missing (sampling data for other kernel modules are reported).
>>>
>>> The relevant vmlinux file was added in /boot, the --vmlinux configuration parameter was set
accordingly. The oprofile.ko module was compiled for 64 bit. Yet sample data for vmlinux are missing.
>>>
>>> Any insight to this would help.
>>>
>>> Thanks,
>>>
>>> Avi
>
>> Hi Avi,
>
>> It would be useful to provide a few detail on the distribution, kernel version, and more detail on how you
are configuring oprofile.  Most recent kernel have support for oprofile. Should use that rather than the
kernel module built in the oprofile package. OProfile is included in a number of distributions is there a
particular reason you have to build a local copy?
>
>> One way that I could imagine thing failing is that the oprofile daemon is not getting the address range for
the kernel and is discarding kernel samples as a result. You might take a look through
/var/lib/oprofile/samples/oprofiled.log to see if there are any clues on what is going on.
>
>> -Will
>
> I'm using OProfile on SecurePlatform, which is a hardened Linux OS based on RHEL3. Yet, the kernel is
2.6.18 which includes the OProfile kernel module.

Well, I don't think that's a stock RHEL 3 kernel you're running on.  The snippet 
from oprofiled.log you show below indicates "lost kernel samples".  You can get 
this symptom when oprofile *knows* it's got a kernel sample, but when it tries 
to locate the sample address in the range of the vmlinux image you provided (via 
'opcontrol --vmlinux=<blah>'), it fails.  I would guess that the vmlinux 
pathname you're providing to oprofile doesn't match up with what's actually running.

-Maynard

>
> I build a local copy of OProfile user mode components since the OS is hardened. The rpm won't install
either, as it is dependant on RHEL5 rpms. I configure OProfile running './configure --prefix /usr'. The
product is then installed on the SecurePlatform machine. Please note that this procedure is used for user
mode components only (opcontrol, opreport etc.), as the OProfile kernel module is installed as part of
the Linux kernel.
>
> This configuration works great on 32 bit machines. I get samples for kernel modules as well as for user mode
images. However this is not the case with 64 bit machines. On such machines, I get samples for user mode
images and for various kernel modules, yet not for vmlinux. I verified (using opconrol --status) that
vmlinux is configured properly.
>
> The vmlinux kernel as well as oprofile.ko is compiled for 64 bit (using gcc-4.1.1-52.x86_64).
>
> Following is the information in the oprofiled.log:
>
> oprofiled started Wed Aug  4 09:11:35 2010
> kernel pointer size: 8
>
> Wed Aug  4 09:11:58 2010
>
> Nr. sample dumps: 2
> Nr. non-backtrace samples: 13215
> Nr. kernel samples: 12195
> Nr. lost samples (no kernel/user): 0
> Nr. lost kernel samples: 9097
> Nr. incomplete code structs: 0
> Nr. samples lost due to sample file open failure: 0
> Nr. samples lost due to no permanent mapping: 0
> Nr. event lost due to buffer overflow: 0
> Nr. samples lost due to no mapping: 0
> Nr. backtraces skipped due to no file mapping: 0
> Nr. samples lost due to no mm: 23
> Nr. samples lost cpu buffer overflow: 0
> Nr. samples received: 0
> Nr. backtrace aborted: 0
> Nr. samples lost cpu buffer overflow: 0
> Nr. samples received: 0
> Nr. backtrace aborted: 0
> Nr. samples lost cpu buffer overflow: 0
> Nr. samples received: 0
> Nr. backtrace aborted: 0
> Nr. samples lost cpu buffer overflow: 0
> Nr. samples received: 0
> Nr. backtrace aborted: 0
> Nr. samples lost cpu buffer overflow: 0
> Nr. samples received: 1967
> Nr. backtrace aborted: 0
> Nr. samples lost cpu buffer overflow: 0
> Nr. samples received: 2558
> Nr. backtrace aborted: 0
> Nr. samples lost cpu buffer overflow: 0
> Nr. samples received: 5225
> Nr. backtrace aborted: 0
> Nr. samples lost cpu buffer overflow: 0
> Nr. samples received: 7153
> Nr. backtrace aborted: 0
> oprofiled stopped Wed Aug  4 09:11:58 2010
>
> I would be thankful if you could supply your insight.
>
> Avi
>
>>
>> ------------------------------------------------------------------------------
>> The Palm PDK Hot Apps Program offers developers who use the
>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> of $1 Million in cash or HP Products. Visit us here for more details:
>> http://p.sf.net/sfu/dev2dev-palm
>> _______________________________________________
>> oprofile-list mailing list
>> oprofile-list <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> oprofile-list mailing list
> oprofile-list <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
Robert Richter | 4 Aug 2010 12:49
Picon
Favicon

Re: [GIT PULL] oprofile: updates for v2.6.36

On 04.08.10 12:47:38, Robert Richter wrote:
> Ingo,
> 
> please pull oprofile updates for v2.6.36:

(Of course v2.6.36 should also be in the subject.)

--

-- 
Advanced Micro Devices, Inc.
Operating System Research Center

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
Ingo Molnar | 4 Aug 2010 16:25
Picon
Picon
Favicon

Re: [GIT PULL] oprofile: updates for v2.6.36


* Robert Richter <robert.richter <at> amd.com> wrote:

> Ingo,
> 
> please pull oprofile updates for v2.6.36:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git core
> 
> It's just a small number of patches, see the log below. The branch is
> already in linux-next for a long time.

Pulled, thanks a lot Robert!

	Ingo

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
jberdine | 5 Aug 2010 18:45
Picon

trouble starting: "missing opcontrol --init"

Hi,

I'm just starting to try oprofile.  Version 0.9.5 is installed on a RHEL
machine I have non-root access to, and working from the "Getting
Started" section of the manual, I see the following behavior:

$ opcontrol --no-vmlinux
Kernel support not available, missing opcontrol --init as root ?

I am not concerned with profiling the kernel.

Does this message mean that the installation is somehow broken?  Is it
feasible to individually install the latest version without root access?

Thanks!
Josh

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm

Gmane