Juergen Schindele | 1 Jul 2005 14:33
Picon

oprofile fails on PXA270

Hello guys,
I tried oprofile the first time.

opreport is OK but
opreport -l /xxx/vmlinux fails
opreport -c (callgraph) fails
opreport -d (details) fails

I am using:
Trizepzs 4 PXA270 board
kernel 2.6.12 + patch 2761/1 from arm-linux
oprofile 0.9 compiled on Jul  1 2005 12:51:12

What i did :
opcontrol --vmlinux=/xxx/vmlinux
opcontrol --start
hanoi 100
opcontrol -shutdown

opreport -d
CPU: ARM/XScale PMU2, speed 0 MHz (estimated)
Counted CPU_CYCLES events (clock cycles counter) with a unit mask of 0x00 (No 
unit mask) count 100000
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

Thank you for your help
--------------------------------------------------------------
Jürgen Schindele            NENTEC Netzwerktechnologie GmbH
(Continue reading)

John Levon | 1 Jul 2005 15:31
Favicon

Re: oprofile fails on PXA270

On Fri, Jul 01, 2005 at 02:33:27PM +0200, Juergen Schindele wrote:

> kernel 2.6.12 + patch 2761/1 from arm-linux
> oprofile 0.9 compiled on Jul  1 2005 12:51:12

Please check out oprofile CVS and use that. Unfortunately we broke ARM
kernel support in 0.9 release. This is fixed in CVS and for the
forthcoming 0.9.1 release.

regards,
john

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Jason Lunz | 2 Jul 2005 18:40

build patch for oprofile 0.9 on 2.4.31 with gcc-3.4

I needed this to compile the oprofile 0.9 kernel module for linux 2.4.31
with gcc 3.4:

--- oprofile-0.9/module/oprofile.c.old	2005-07-02 12:04:19.000000000 -0400
+++ oprofile-0.9/module/oprofile.c	2005-07-02 12:04:25.000000000 -0400
 <at>  <at>  -114,7 +114,7  <at>  <at> 
 	ops->counter = ctr;
 }

-void op_do_profile(uint cpu, long eip, long irq_enabled, int ctr)
+void fastcall op_do_profile(uint cpu, long eip, long irq_enabled, int ctr)
 {
 	struct _oprof_data * data = &oprof_data[cpu];
 	pid_t const pid = current->pid;

Apparently with gcc 3.4, both the function declaration and definition
must have __attribute__((regparm(3))). FASTCALL/fastcall are #defined
like this for i386 in 2.4.31's include/linux/kernel.h:

#define FASTCALL(x)     x __attribute__((regparm(3)))
#define fastcall        __attribute__((regparm(3)))

Jason

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
(Continue reading)

Yao qi | 6 Jul 2005 03:20
Picon
Favicon

Why samples still left after oprofile daemon halted

I write two similar programs, and profile the performance of both 
sequentially, and then compare the two output.
I have met a problem that the samples of the first program still exist in 
/var/lib/oprfoile/sample/current/ when the deamon halted, the side effect of 
that is obvious, that is to say, the report of the second program will 
include the some information about the first one.
I put my script here to be more informtive.I profile the case of Level 2 
Cache Miss on Power4.

#!/bin/sh
opcontrol --init
opcontrol --event=PM_DC_INV_L2_GRP2:5000
opcontrol --no-vmlinux
opcontrol --image=/abc/def/ghi/cache-miss
opcontrol --start
./cache-miss
opcontrol --stop
opcontrol --dump

opreport -l
echo oprofile status1
opcontrol --status
echo oprofile status1
opcontrol -h

rm -rf /var/lib/oprofile/samples/current/\{root\}/

opcontrol --init
opcontrol --event=PM_DC_INV_L2_GRP2:5000
opcontrol --no-vmlinux
(Continue reading)

Yao qi | 6 Jul 2005 09:19
Picon
Favicon

child process exited abnormally when profile multi-thread program

I have written a test case of multi-thread for oprofile, the source code is 
as follows
#include <stdio.h>
#include <pthread.h>

#define N       300
void* mytread(void* arg)
{
        int i,j,k;
        long c;
        for(i=0; i< N; i++)
        for(j=0; j< N; j++)
        for(k=0; k< N; k++)
                c=i+j+k;
        printf("In thread!\n");
        return NULL;
}
int main()
{
        pthread_t th;

        if ( pthread_create(&th,NULL,mytread,NULL)!=0)
        {
                printf("can not create thread,exit!\n");
                exit(0);
        }
        printf("main process!\n");
        sleep(3);
        return 1;
}
(Continue reading)

John Levon | 6 Jul 2005 14:01
Favicon

Re: Why samples still left after oprofile daemon halted

On Wed, Jul 06, 2005 at 09:20:14AM +0800, Yao qi wrote:

> I have met a problem that the samples of the first program still exist in 
> /var/lib/oprfoile/sample/current/ when the deamon halted, the side effect 
> of that is obvious, that is to say, the report of the second program will 
> include the some information about the first one.

This is how it's supposed to work. You can either use --reset or --save
inbetween if you want a clean session.

regards,
john

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Yao qi | 7 Jul 2005 08:30
Picon
Favicon

[Discussion] Long file names in opreport

Hi, all
I have read the TODO in oprofile-0.9, I think to replace some part of the 
long file name by  ellipsis is necessary when the file name is too long.

There are three field relative to the file name, they are 'linenr info','app 
name','image name'. The Format_output can determine whether replace the file 
name by ellispsis by the length of the fiel name.

For example, the 'formatted' app name length is 25, if the actual length of  
file name is more than that, the corresponding output should be composed of 
like this:
   first 10 letters of file name +...+last 12 letters of file name
the other two are the same case.

I think rewriting the get_image_name and get_linenr_info in 
libpp/format_output.cpp, mabe I could code a patch on this, Any thoughts on 
this?

I am newbie in Open Source Community, so anyone could confirm or deny this?  
Thanks in advance!

Best Regards
----------------
Yao Qi
Bejing Institute of Technology

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

(Continue reading)

Haruki Dai-r35557 | 7 Jul 2005 15:37
Favicon

RE: child process exited abnormally when profile multi-thread pro gram

I quickly tested following code. I could capture without error by using oprofile-0.9 with 2.6.11-rc6 on
mpc8555e (powerpc-e500 core). 

Regards,
Dai

-----Original Message-----
From: oprofile-list-admin <at> lists.sourceforge.net
[mailto:oprofile-list-admin <at> lists.sourceforge.net] On Behalf Of Yao qi
Sent: Wednesday, July 06, 2005 2:20 AM
To: oprofile-list <at> lists.sourceforge.net
Subject: child process exited abnormally when profile multi-thread program

I have written a test case of multi-thread for oprofile, the source code is as follows #include <stdio.h>
#include <pthread.h>

#define N       300
void* mytread(void* arg)
{
        int i,j,k;
        long c;
        for(i=0; i< N; i++)
        for(j=0; j< N; j++)
        for(k=0; k< N; k++)
                c=i+j+k;
        printf("In thread!\n");
        return NULL;
}
int main()
{
(Continue reading)

Yao qi | 10 Jul 2005 07:37
Picon
Favicon

RE: child process exited abnormally when profile multi-thread program


>From: Haruki Dai-r35557 <Dai.Haruki <at> freescale.com>
>To: "'Yao qi'" <qiyaobit <at> hotmail.com>, oprofile-list <at> lists.sourceforge.net
>Subject: RE: child process exited abnormally when profile multi-thread 
>program
>Date: Thu, 7 Jul 2005 06:37:58 -0700
>
>I quickly tested following code. I could capture without error by using 
>oprofile-0.9 with 2.6.11-rc6 on mpc8555e (powerpc-e500 core).

Thank you very much for your test for my code. Can you post the consequence 
of the commands you use in details if avaliable? Maybe I lost something 
during the commands.

However, I still have no idea about this symptom. I have writen aonther code 
about multi-proecess with the "fork" call, there is also a warning:
__child process exited abnormally__

Has anyone met the questions of this kind?

Maybe I have further the test on X86 box.
>
>Regards,
>Dai
>

Best Regards
----------------
Yao Qi
Bejing Institute of Technology
(Continue reading)

John Levon | 11 Jul 2005 22:56
Favicon

Re: build patch for oprofile 0.9 on 2.4.31 with gcc-3.4

On Sat, Jul 02, 2005 at 04:40:51PM +0000, Jason Lunz wrote:

> I needed this to compile the oprofile 0.9 kernel module for linux 2.4.31
> with gcc 3.4:
> 
> -void op_do_profile(uint cpu, long eip, long irq_enabled, int ctr)
> +void fastcall op_do_profile(uint cpu, long eip, long irq_enabled, int ctr)

I applied this now, sorry for the delay.

thanks,
john

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar

Gmane