zhou rui | 2 May 08:13 2011
Picon

different result from "top"

the machine has 24 cores,

"top" shows MY_APPLICATION use about 40% cpu. (Irix mode on)

but from oprofile, it only use 0.8799% cpu?
why?

CPU: Intel Architectural Perfmon, speed 2666.01 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
unit mask of 0x00 (No unit mask) count 100000
CPU_CLK_UNHALT...|
  samples|      %|
------------------
   656980 40.1202 vmlinux
   473114 28.8919 vmlinux
   298978 18.2579 MY_KERN_DRIVER
   165838 10.1273 ixgbe
    14408  0.8799 MY_APPLICATION
    10443  0.6377 libc-2.11.1.so
     8251  0.5039 processor
     4658  0.2845 oprofiled

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Nicolas Kaiser | 2 May 15:48 2011
Face
Picon

[PATCH resend] s390: oprofile: fix error checks in oprofile_hwsampler_init()

Checking 'oprofile_min_interval < 0' and
'oprofile_max_interval < 0' doesn't work because
'oprofile_min_interval' and 'oprofile_max_interval' are unsigned.

Signed-off-by: Nicolas Kaiser <nikai <at> nikai.net>
---
Untested.

 arch/s390/oprofile/init.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
index c63d7e5..09c3088 100644
--- a/arch/s390/oprofile/init.c
+++ b/arch/s390/oprofile/init.c
 <at>  <at>  -138,22 +138,26  <at>  <at>  static int oprofile_create_hwsampling_files(struct super_block *sb,

 static int oprofile_hwsampler_init(struct oprofile_operations *ops)
 {
+	long retval;
+
 	if (hwsampler_setup())
 		return -ENODEV;

 	/*
 	 * create hwsampler files only if hwsampler_setup() succeeds.
 	 */
-	oprofile_min_interval = hwsampler_query_min_interval();
-	if (oprofile_min_interval < 0) {
+	retval = hwsampler_query_min_interval();
(Continue reading)

Martin Schwidefsky | 2 May 17:01 2011
Picon

Re: [PATCH resend] s390: oprofile: fix error checks in oprofile_hwsampler_init()

On Mon, 2 May 2011 15:48:05 +0200
Nicolas Kaiser <nikai <at> nikai.net> wrote:

> Checking 'oprofile_min_interval < 0' and
> 'oprofile_max_interval < 0' doesn't work because
> 'oprofile_min_interval' and 'oprofile_max_interval' are unsigned.
> 
> Signed-off-by: Nicolas Kaiser <nikai <at> nikai.net>

Makes sense, I'll queue it up. Thanks.

--

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

Robert Richter | 3 May 10:55 2011
Picon

Re: [PATCH resend] s390: oprofile: fix error checks in oprofile_hwsampler_init()

On 02.05.11 09:48:05, Nicolas Kaiser wrote:
> Checking 'oprofile_min_interval < 0' and
> 'oprofile_max_interval < 0' doesn't work because
> 'oprofile_min_interval' and 'oprofile_max_interval' are unsigned.

max/min_interval are through all the code always unsigned. I don't
know how min/max_sampl_rate in struct hws_qsi_info_block is spec'ed,
but there it is unsigned too.

So the best would be to return qsi.min/max_sampl_rate in
hwsampler_query_min/max_interval() directly with no error codes as
unsigned longs and to change the code in oprofile_hwsampler_init() to
check for null. Both functions hwsampler_query_min/max_interval()
could be moved to hwsampler.h as static inline functions. This makes
the code also easier.

This patch does not handle the null value case and the data truncation
by casting from unsigned to singed is not fixed.

-Robert

> 
> Signed-off-by: Nicolas Kaiser <nikai <at> nikai.net>
> ---
> Untested.
> 
>  arch/s390/oprofile/init.c |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
(Continue reading)

Richard Purdie | 3 May 11:39 2011
Picon

Re: opreport error

On Fri, 2011-04-29 at 10:38 -0500, Maynard Johnson wrote:
> durga prasad wrote:
> > Hi Maynad,
> > 
> > Thanks for your reply.
> > 
> > oprofile on the target is working after copying all binaries and libraries
> > to the target(Arm-cortexA9).
> > I can run oprofile only in timer mode.
> > But if I run oprofile in using hardware performance counter its failing.
> > 
> > I am using the following commands to run oprofile in normal mode
> > 
> > *# opcontrol -v*
> > opcontrol: oprofile 0.9.7git compiled on Apr 29 2011 11:00:14
> > 
> > On the target always opcontrol --setup fails with below error,
> > I am manually creating the directory /dev/oprofile and mounting the
> > oprofilefs
> > 
> > *# opcontrol --no-vmlinux*
> > 
> > When I set the events as below I am getting error
> > 
> > *# opcontrol --event=CPU_CYCLES:64:0x00:1:1*
> > 
> > /opt/oprofile/bin/opcontrol: line 2071: id: not found
> Durga,
> According to what's currently in our git repo, line 2071 is:
>         BINDIR="/usr/bin"
(Continue reading)

durga prasad | 4 May 09:49 2011
Picon

Re: [PATCH resend] s390: oprofile: fix error checks in oprofile_hwsampler_init()


Thanks for the reply.
I can able to run oprofile on the target(ARM V7-CA9) in timer mode.
The problem of Bad magic number is because of the JFFS2 file system.So I mounted usb on the target and colleted the sample on the target.
I am able to analyze the sample on the target.But for analyzing the samples on the host I am doing the follows process.

I mounted the USB to /var/lib/oprofile -- so the sample will be collected directly to USB

After the I am running oparchieve on the target

oparchive -o /var/lib/oprofile/durga/

I am doing opimport on the host PC

# opimport -V -a /media/Pen_drive/durga/ -o /home/durga/oprofile/
  error: must specify exactly 1 input file

I am getting the above error always.
How to analyze the sample collected in the Host PC after collecting the samples in Pen drive from target?


Your help will be warmly received.

Regards,
Durga Prasad








On Tue, May 3, 2011 at 5:55 PM, Robert Richter <robert.richter <at> amd.com> wrote:
On 02.05.11 09:48:05, Nicolas Kaiser wrote:
> Checking 'oprofile_min_interval < 0' and
> 'oprofile_max_interval < 0' doesn't work because
> 'oprofile_min_interval' and 'oprofile_max_interval' are unsigned.

max/min_interval are through all the code always unsigned. I don't
know how min/max_sampl_rate in struct hws_qsi_info_block is spec'ed,
but there it is unsigned too.

So the best would be to return qsi.min/max_sampl_rate in
hwsampler_query_min/max_interval() directly with no error codes as
unsigned longs and to change the code in oprofile_hwsampler_init() to
check for null. Both functions hwsampler_query_min/max_interval()
could be moved to hwsampler.h as static inline functions. This makes
the code also easier.

This patch does not handle the null value case and the data truncation
by casting from unsigned to singed is not fixed.

-Robert

>
> Signed-off-by: Nicolas Kaiser <nikai <at> nikai.net>
> ---
> Untested.
>
>  arch/s390/oprofile/init.c |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
> index c63d7e5..09c3088 100644
> --- a/arch/s390/oprofile/init.c
> +++ b/arch/s390/oprofile/init.c
> <at> <at> -138,22 +138,26 <at> <at> static int oprofile_create_hwsampling_files(struct super_block *sb,
>
>  static int oprofile_hwsampler_init(struct oprofile_operations *ops)
>  {
> +     long retval;
> +
>       if (hwsampler_setup())
>               return -ENODEV;
>
>       /*
>        * create hwsampler files only if hwsampler_setup() succeeds.
>        */
> -     oprofile_min_interval = hwsampler_query_min_interval();
> -     if (oprofile_min_interval < 0) {
> +     retval = hwsampler_query_min_interval();
> +     if (retval < 0) {
>               oprofile_min_interval = 0;
>               return -ENODEV;
>       }
> -     oprofile_max_interval = hwsampler_query_max_interval();
> -     if (oprofile_max_interval < 0) {
> +     oprofile_min_interval = retval;
> +     retval = hwsampler_query_max_interval();
> +     if (retval < 0) {
>               oprofile_max_interval = 0;
>               return -ENODEV;
>       }
> +     oprofile_max_interval = retval;
>
>       if (oprofile_timer_init(ops))
>               return -ENODEV;
> --
> 1.7.3.4
>

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


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list



--
regards
prasad.....
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Antonio Cuni | 4 May 15:16 2011
Picon

opreport error

Hi all,

I'm trying to use oprofile, but I'm getting an error.  This is a transcript of
what I did:

$ sudo opcontrol --start
Profiler running.

$ ./pypy-c -m test.pystone
Pystone(1.1) time for 50000 passes = 0.21
This machine benchmarks at 238095 pystones/second

$ sudo opcontrol --stop
Stopping profiling.

$ sudo opcontrol --dump

 $ opreport -l ./pypy-c
Overflow stats not available
CPU: Intel Core/i7, speed 1600 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit
mask of 0x00 (No unit mask) count 100000
Counted UOPS_DECODED events (Counts the number of Uops decoded by various
subsystems.) with a unit mask of 0x0e (multiple flags) count 800000
opreport error: profile_t::samples_range(): start > end something wrong with
kernel or module layout ?
please report problem to oprofile-list <at> lists.sourceforge.net

Note that pypy-c is a python interpreter which contains a JIT compiler, i.e.
it produces and execute assembler at runtime. Could it be the reason why
opreport is confused?

thank you very much,
Antonio

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Maynard Johnson | 4 May 17:57 2011
Picon

Re: different result from "top"

On 05/02/2011 1:13 AM, zhou rui wrote:
> the machine has 24 cores,
>
> "top" shows MY_APPLICATION use about 40% cpu. (Irix mode on)
>
> but from oprofile, it only use 0.8799% cpu?
Your MY_APPLICATION binary may only be responsible for 0.8799% of cpu cycles 
during this profile run, but what about library calls and syscalls into the 
kernel?  In order to associate library and kernel samples with the executable, 
you need to do 'opcontrol --separate=lib,kernel' before starting the profiler. 
Also, be sure to stop oprofile immediately upon completion of MY_APPLICATION if 
you want to match up the oprofile percentage with what you were seeing in top.

-Maynard

> why?
>
> CPU: Intel Architectural Perfmon, speed 2666.01 MHz (estimated)
> Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
> unit mask of 0x00 (No unit mask) count 100000
> CPU_CLK_UNHALT...|
>    samples|      %|
> ------------------
>     656980 40.1202 vmlinux
>     473114 28.8919 vmlinux
>     298978 18.2579 MY_KERN_DRIVER
>     165838 10.1273 ixgbe
>      14408  0.8799 MY_APPLICATION
>      10443  0.6377 libc-2.11.1.so
>       8251  0.5039 processor
>       4658  0.2845 oprofiled
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today.  Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> oprofile-list mailing list
> oprofile-list <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Maynard Johnson | 4 May 18:00 2011
Picon

Re: [PATCH resend] s390: oprofile: fix error checks in oprofile_hwsampler_init()

On 05/04/2011 2:49 AM, durga prasad wrote:
>
> Thanks for the reply.
Durga, you're replying to the wrong thread.

-Maynard

> I can able to run oprofile on the target(ARM V7-CA9) in timer mode.
> The problem of Bad magic number is because of the JFFS2 file system.So I mounted
> usb on the target and colleted the sample on the target.
> I am able to analyze the sample on the target.But for analyzing the samples on
> the host I am doing the follows process.
>
> I mounted the USB to /var/lib/oprofile -- so the sample will be collected
> directly to USB
>
> After the I am running oparchieve on the target
>
> *oparchive -o /var/lib/oprofile/durga/*
>
> I am doing opimport on the host PC
>
> *# opimport -V -a /media/Pen_drive/durga/ -o /home/durga/oprofile/
>    error: must specify exactly 1 input file
>
> *I am getting the above error always.*
> *How to analyze the sample collected in the Host PC after collecting the samples
> in Pen drive from target*?
>
>
> *Your *help* will *be* warmly received.
>
> Regards,
> Durga Prasad
> *
>
>
> *
>
>
>
>
> On Tue, May 3, 2011 at 5:55 PM, Robert Richter <robert.richter <at> amd.com
> <mailto:robert.richter <at> amd.com>> wrote:
>
>     On 02.05.11 09:48:05, Nicolas Kaiser wrote:
>     >  Checking 'oprofile_min_interval < 0' and
>     >  'oprofile_max_interval < 0' doesn't work because
>     >  'oprofile_min_interval' and 'oprofile_max_interval' are unsigned.
>
>     max/min_interval are through all the code always unsigned. I don't
>     know how min/max_sampl_rate in struct hws_qsi_info_block is spec'ed,
>     but there it is unsigned too.
>
>     So the best would be to return qsi.min/max_sampl_rate in
>     hwsampler_query_min/max_interval() directly with no error codes as
>     unsigned longs and to change the code in oprofile_hwsampler_init() to
>     check for null. Both functions hwsampler_query_min/max_interval()
>     could be moved to hwsampler.h as static inline functions. This makes
>     the code also easier.
>
>     This patch does not handle the null value case and the data truncation
>     by casting from unsigned to singed is not fixed.
>
>     -Robert
>
>     >
>     >  Signed-off-by: Nicolas Kaiser <nikai <at> nikai.net <mailto:nikai <at> nikai.net>>
>     >  ---
>     >  Untested.
>     >
>     >   arch/s390/oprofile/init.c |   12 ++++++++----
>     >   1 files changed, 8 insertions(+), 4 deletions(-)
>     >
>     >  diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
>     >  index c63d7e5..09c3088 100644
>     >  --- a/arch/s390/oprofile/init.c
>     >  +++ b/arch/s390/oprofile/init.c
>     >   <at>  <at>  -138,22 +138,26  <at>  <at>  static int oprofile_create_hwsampling_files(struct
>     super_block *sb,
>     >
>     >   static int oprofile_hwsampler_init(struct oprofile_operations *ops)
>     >   {
>     >  +     long retval;
>     >  +
>     >        if (hwsampler_setup())
>     >                return -ENODEV;
>     >
>     >        /*
>     >         * create hwsampler files only if hwsampler_setup() succeeds.
>     >         */
>     >  -     oprofile_min_interval = hwsampler_query_min_interval();
>     >  -     if (oprofile_min_interval < 0) {
>     >  +     retval = hwsampler_query_min_interval();
>     >  +     if (retval < 0) {
>     >                oprofile_min_interval = 0;
>     >                return -ENODEV;
>     >        }
>     >  -     oprofile_max_interval = hwsampler_query_max_interval();
>     >  -     if (oprofile_max_interval < 0) {
>     >  +     oprofile_min_interval = retval;
>     >  +     retval = hwsampler_query_max_interval();
>     >  +     if (retval < 0) {
>     >                oprofile_max_interval = 0;
>     >                return -ENODEV;
>     >        }
>     >  +     oprofile_max_interval = retval;
>     >
>     >        if (oprofile_timer_init(ops))
>     >                return -ENODEV;
>     >  --
>     >  1.7.3.4
>     >
>
>     --
>     Advanced Micro Devices, Inc.
>     Operating System Research Center
>
>
>     ------------------------------------------------------------------------------
>     WhatsUp Gold - Download Free Network Management Software
>     The most intuitive, comprehensive, and cost-effective network
>     management toolset available today.  Delivers lowest initial
>     acquisition cost and overall TCO of any competing solution.
>     http://p.sf.net/sfu/whatsupgold-sd
>     _______________________________________________
>     oprofile-list mailing list
>     oprofile-list <at> lists.sourceforge.net <mailto:oprofile-list <at> lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
>
>
>
> --
> regards
> prasad.....

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Maynard Johnson | 4 May 18:07 2011
Picon

Re: opreport error

On 04/29/2011 11:32 AM, durga prasad wrote:
> Hi Maynad,
>
> I have one question,How to profile "ko files" for normal x86 architecture .
> Actually that I am not clear from the manual.
I was out for several days, so didn't see your message until today, which is why 
it's best to always keep the list on cc (I've added oprofile-list back to cc).

To get symbol information for kernel modules, use the '--image-path' option to 
opreport, pointing at the root location of your kernel modules (typically, 
"/lib/modules/`uname -r`").

-Maynard
>
> Regards,
> Durga
>
>
>
> On Sat, Apr 30, 2011 at 12:38 AM, Maynard Johnson <maynardj <at> us.ibm.com
> <mailto:maynardj <at> us.ibm.com>> wrote:
>
>     durga prasad wrote:
>     >  Hi Maynad,
>     >
>     >  Thanks for your reply.
>     >
>     >  oprofile on the target is working after copying all binaries and libraries
>     >  to the target(Arm-cortexA9).
>     >  I can run oprofile only in timer mode.
>     >  But if I run oprofile in using hardware performance counter its failing.
>     >
>     >  I am using the following commands to run oprofile in normal mode
>     >
>     >  *# opcontrol -v*
>     >  opcontrol: oprofile 0.9.7git compiled on Apr 29 2011 11:00:14
>     >
>     >  On the target always opcontrol --setup fails with below error,
>     >  I am manually creating the directory /dev/oprofile and mounting the
>     >  oprofilefs
>     >
>     >  *# opcontrol --no-vmlinux*
>     >
>     >  When I set the events as below I am getting error
>     >
>     >  *# opcontrol --event=CPU_CYCLES:64:0x00:1:1*
>     >
>     >  /opt/oprofile/bin/opcontrol: line 2071: id: not found
>     Durga,
>     According to what's currently in our git repo, line 2071 is:
>             BINDIR="/usr/bin"
>
>     Sorry, but it's a mystery to me why this would fail on your target.  You'll
>     have to look at opcontrol and do some debugging on your own.  I've added
>     Richard Purdie to cc (who has ARM experience), so maybe he can offer advice.
>
>     -Maynard
>
>     >  sh: 0: unknown operand
>     >  /opt/oprofile/bin/opcontrol: line 2100: id: not found
>     >  sh: 0: unknown operand
>     >  /opt/oprofile/bin/opcontrol: line 1: seq: not found
>     >  /opt/oprofile/bin/opcontrol: line 1: seq: not found
>     >  /opt/oprofile/bin/opcontrol: line 2103: seq: not found
>     >
>     >  After that I treid to start oprofile .
>     >
>     >  *# opcontrol --start*
>     >  /opt/oprofile/bin/opcontrol: line 2071: id: not found
>     >  sh: 0: unknown operand
>     >  /opt/oprofile/bin/opcontrol: line 2100: id: not found
>     >  sh: 0: unknown operand
>     >  /opt/oprofile/bin/opcontrol: line 2102: seq: not found
>     >  /opt/oprofile/bin/opcontrol: line 2102: seq: not found
>     >  /opt/oprofile/bin/opcontrol: line 2103: seq: not found
>     >  /opt/oprofile/bin/opcontrol: line 2103: seq: not found
>     >  *oprofiled: no events specified.*
>     >  Usage: oprofiled [OPTION...]
>     >        --session-dir=/var/lib/oprofile         place sample database in dir
>     >  instead of default location
>     >    -r, --kernel-range=start-end        Kernel VMA range
>     >    -k, --vmlinux=file             vmlinux kernel image
>     >        --no-vmlinux            vmlinux kernel image file not available
>     >        --xen-range=start-end           Xen VMA range
>     >        --xen-image=file           Xen image
>     >        --image=profile these comma separated image               image name
>     >  filter
>     >        --separate-lib=[0|1]        separate library samples for each distinct
>     >  application
>     >        --separate-kernel=[0|1]     separate kernel samples for each distinct
>     >  application
>     >        --separate-thread=[0|1]     thread-profiling mode
>     >        --separate-cpu=[0|1]        separate samples for each CPU
>     >    -e, --events=[events]              events list
>     >    -v, --version               show version
>     >    -V, --verbose=all,sfile,arcs,samples,module,misc             be verbose in
>     >  log file
>     >    -x, --ext-feature=<extended-feature-name>:[args]         enable extended
>     >  feature
>     >
>     >  Help options:
>     >    -?, --help                  Show this help message
>     >        --usage                 Display brief usage message
>     >  Couldn't start oprofiled.
>     >  Check the log file "/var/lib/oprofile/samples/oprofiled.log" and kernel
>     >  syslog
>     >
>     >  The log file "/var/lib/oprofile/samples/oprofiled.log" is also not created.
>     >
>     >  I tried running daemon
>     >
>     >  *#oprofiled --events=CPU_CYCLES:64:0x00:1:1 --no-vmlinux  --kernel-range
>     >  0xc002d000,0xc046f000 -V=all*
>     >  oprofiled: malformed events passed on the command line
>     >
>     >  But ophelp is showing all the events.
>     >
>     >  So the daemon is also not starting and its failing to profiling in normal
>     >  mode for Armv7-ca9
>     >
>     >  Another issue is:
>     >  I can able to the run the oprofile in the taget(Arm-cortexA9) in timer mode
>     >
>     >  As I am running the oprofile on the target,I don't have vmlinux binary on
>     >  the target.It is flashed in the nand.In this case how can I specify the
>     >  kernel to profile.
>     >
>     >  How can I profile the kernel object file(.ko files) using oprofile.In manual
>     >  it just mentioned to use -p option.
>     >
>     >  It is not very much clear for profiling a single or multiple * ".ko"* files.
>     >
>     >
>     >  Thanks in advance,
>     >  Durga Prasad
>     >
>     >
>     >  On Thu, Apr 28, 2011 at 11:42 PM, Maynard Johnson <maynardj <at> us.ibm.com
>     <mailto:maynardj <at> us.ibm.com>>wrote:
>     >
>     > > On 04/27/2011 9:10 PM, durga prasad wrote:
>     > >
>     > >> Hi Maynard,
>     > >>
>     > >> Thanks for your reply.
>     > >>
>     > >> Actually I downloaded the oprofile from git repository only.The current
>     > >> version
>     > >> I am running on my target is as below.
>     > >>
>     > >> *# opcontrol -v
>     > >> opcontrol: oprofile 0.9.7git compiled on Apr 25 2011 16:54:12*
>     > >>
>     > >> Initially I  tried to run the oprofile 0.9.7 git in normal mode using
>     > >> hardware
>     > >> counter .As it is not working in that mode I am running oprofile in timer
>     > >> mode.
>     > >>
>     > >> When I run the oprofile in normal mode the oprofiled daemon is not
>     > >> starting and
>     > >> it always gives error like unable to find the events and unitmask.
>     > >>
>     > >> Also I am using opcontrol --reset every time before start of the opcntrol
>     > >> and
>     > >> still I am getting the same error for opreport.
>     > >>
>     > >> when I open the log file using the cat command
>     > >> *# cat /var/lib/oprofile/samples/oprofiled.log*
>     > >> *oprofiled: open of
>     > >>
>     > >>
>     /var/lib/oprofile/samples//current/{kern}/no-vmlinux/{dep}/{kern}/no-vmlinux/TIM
>     > >> ER.0.0.all.all.all failed: Invalid argument*
>     > >>
>     > >> The total log is filled with the above error.
>     > >>
>     > >> I copied the binaries to /usr/bin/ of the target.Do I need to copy any
>     > >> libraries
>     > >> to the target.
>     > >>
>     > > That's definitely *not* sufficient.  I suggest you do a build on your host
>     > > machine and configure with '--prefix=<my-oprof-install-dir>'.   After
>     > > building, do a 'make install', then tar up the <my-oprof-install-dir> and
>     > > move it over to your target.  You certainly had pieces missing that would
>     > > have prevented you from using event-based profiling, so you shouldn't have
>     > > to do timer-based profiling once it's set up right on the target.  As for
>     > > all the errors in the log, that also may have something to do with missing
>     > > stuff from the install -- although, I'm not sure.  So on your target, do:
>     > >  1. opcontrol --deinit
>     > >  2. opcontrol --reset
>     > >  3. delete oprofile binaries in /usr/bin
>     > >  4. delete the oprofiled log
>     > >  5. delete /root/.oprofile/daemonrc
>     > >  6. extract the tar file from your host containing <my-oprof-install-dir>
>     > >  7. start over again with opcontrol setup, start, etc.
>     > >
>     > > -Maynard
>     > >
>     > >
>     > >> Please let me any other information is required regarding this error.
>     > >>
>     > >>
>     > >> Regards
>     > >> Durga Prasad
>     > >>
>     > >> On Thu, Apr 28, 2011 at 8:14 AM, Maynard Johnson <maynardj <at> us.ibm.com
>     <mailto:maynardj <at> us.ibm.com>
>     > >> <mailto:maynardj <at> us.ibm.com <mailto:maynardj <at> us.ibm.com>>> wrote:
>     > >>
>     > >>    durga prasad wrote:
>     > >> >  Hi All ,
>     > >> >
>     > >> >  I am trying to cross compile the oprofile 0.9.6 for ARMv7 for cortex
>     > >> A9 and
>     > >> >  it is success.
>     > >> >  I am facing issue while generating the report
>     > >> >
>     > >> >  I am running the oprofile on the target on timer mode with the
>     > >> following
>     > >> >  command.
>     > >> >
>     > >> >  *# insmod oprofile.ko timer=1*
>     > >> >
>     > >> >  Insmod is success and it gives the following output
>     > >> >  *
>     > >> >  oprofile: using arm/armv7-ca9
>     > >>    The message above implies that your kernel supports your processor.  As
>     > >> I've
>     > >>    said before, if you upgrade your oprofile, you'll have full support for
>     > >>    cortex A9 and won't have to use timer mode.
>     > >>
>     > >> >  oprofile: using timer interrupt.*
>     > >> >
>     > >> >  I am running the following command in the target for the oprofile.
>     > >> >
>     > >> >  *# opcontrol --start --no-vmlinux*
>     > >> >  /usr/bin/opcontrol: line 2071: id: not found
>     > >>    So you installed oprofile in /usr on your target?  Not being embedded
>     > >>    developer, I have to ask . . . is that typical?
>     > >> >  sh: 0: unknown operand
>     > >> >  /usr/bin/opcontrol: line 2100: id: not found
>     > >> >  sh: 0: unknown operand
>     > >>
>     > >>    I've never seen/heard of this error before.  Pull the latest oprofile
>     > >> source
>     > >>    and build/install it.  If you still get the error, then let us know.
>     > >>
>     > >> >  Using 2.6+ OProfile kernel interface.
>     > >> >  Using log file /var/lib/oprofile/samples/oprofiled.log
>     > >> >  Daemon started.
>     > >> >  Profiler running.
>     > >> >
>     > >> >  ps commad will display the daemon.
>     > >> >
>     > >> >  I ran my simple application and after that I dumped .
>     > >> >
>     > >> >  *#opcontrol --dump
>     > >> >  #opcontrol --stop*
>     > >> >
>     > >> >  After stoppping the profiler, I am generating the opreport with
>     > >> following
>     > >> >  command its failing.
>     > >> >
>     > >> >  *# opreport -l*
>     > >> >
>     > >> >  I am getting the following error.
>     > >> >  *
>     > >> >  opreport error: Invalid sample file, bad magic number:
>     > >> >  /var/lib/oprofile/samples/current/{kern}/no-v
>     > >> >  mlinux/{dep}/{kern}/no-vmlinux/TIMER.0.0.all.all.all*
>     > >>
>     > >>    You probably have old sample data taken from an older, incompatible
>     > >> version
>     > >>    of oprofile.  Be sure to use 'opcontrol --reset' at the beginning of
>     > >> your
>     > >>    profile runs to clear out old profile data.
>     > >>
>     > >> >
>     > >> >  when I used *oparchive* also I am getting the same error.
>     > >> >
>     > >> >  *# oparchive -o /home/durga/
>     > >> >  oparchive error: Invalid sample file, bad magic number:
>     > >> >  /var/lib/oprofile/samples/current/{kern}/no-
>     > >> >  vmlinux/{dep}/{kern}/no-vmlinux/TIMER.0.0.all.all.all*
>     > >> >
>     > >> >  Also I want to analyze the opreport on the host PC by transferring
>     > >> the files
>     > >> >  from the target to host. how can I do that?
>     > >> >  Is there any application to analyze the file generated by the
>     > >> oprofiler on
>     > >> >  the host PC ?
>     > >>
>     > >>    There are sections in the user manual (see our website) on the topics
>     > >> of
>     > >>    oparchive and opimport.  Also see the mailing list archives
>     > >>    (http://marc.info/?l=oprofile-list) and look for the topic "Running
>     > >> oprofile
>     > >>    on embedded systems" from June, 2008.
>     > >>
>     > >>    -Maynard
>     > >>
>     > >> >
>     > >> >  It would be great if somebody suggests me the reason behind the
>     > >> above error.
>     > >> >
>     > >> >
>     > >> >  Thanks in Advance,
>     > >> >  Durga Prasad
>     > >> >
>     > >> >
>     > >> >
>     > >> >
>     > >> >
>     > >>
>       ------------------------------------------------------------------------------
>     > >> >  WhatsUp Gold - Download Free Network Management Software
>     > >> >  The most intuitive, comprehensive, and cost-effective network
>     > >> >  management toolset available today.  Delivers lowest initial
>     > >> >  acquisition cost and overall TCO of any competing solution.
>     > >> > http://p.sf.net/sfu/whatsupgold-sd
>     > >> >
>     > >> >
>     > >> >
>     > >> >  _______________________________________________
>     > >> >  oprofile-list mailing list
>     > >> > oprofile-list <at> lists.sourceforge.net
>     <mailto:oprofile-list <at> lists.sourceforge.net>
>     > >> <mailto:oprofile-list <at> lists.sourceforge.net
>     <mailto:oprofile-list <at> lists.sourceforge.net>>
>     > >>
>     > >> > https://lists.sourceforge.net/lists/listinfo/oprofile-list
>     > >>
>     > >>
>     > >>
>     > >>
>     > >> --
>     > >> regards
>     > >> prasad.....
>     > >>
>     > >
>     > >
>     >
>     >
>
>
>
>
> --
> regards
> prasad.....

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd

Gmane