Philippe Elie | 2 Aug 15:54 2005
Picon

Re: Remove bashisms from opcontrol

On Mon, 01 Aug 2005 at 22:47 +0000, Richard Purdie wrote:

> As things stand there are several bash dependencies in the opcontrol
> script. This means it can't run with the likes of busybox which is often
> found in embedded systems instead of bash.
> 
> This patch removes some of the simple problems:
> http://projects.o-hand.com/oprofile/oprofile_nobash1.patch
> 
> One further cleanup might be to set UID=`id -u` as the script starts and
> then just access UID. 
> 
> With that applied, the only problem is the CHOSEN_EVENTS array. busybox
> can't cope with arrays so this presents a problem. I can't see a way to
> fix it just using shell variables. It is possible to use an events file
> to get around this though:
> 
> http://projects.o-hand.com/oprofile/oprofile_nobash2.patch
> 
> Some simple functions are added to set and pull entries from the file,
> the line number being used as the array index.
> 
> I've tested this with both busybox and bash and it appears to work
> although I'm not a regular user of the events syntax so there may be
> something I've overlooked. 
> 
> I'm open to comments :)

I've applied the first patch, perhaps the approach given by Ralf Wildenhues
for the second patch is better :
(Continue reading)

Philippe Elie | 1 Aug 22:09 2005
Picon

(fwd) [ oprofile-Bugs-1249755 ] PPC/E500 no symbols

Hi, any idea on this bug ?

-- 
Philippe Elie
Picon Picon
From: SourceForge.net <noreply <at> sourceforge.net>
Subject: [ oprofile-Bugs-1249755 ] PPC/E500 no symbols
Date: 2005-08-01 18:34:50 GMT
Bugs item #1249755, was opened at 2005-08-01 11:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116191&aid=1249755&group_id=16191

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
(Continue reading)

William Cohen | 2 Aug 16:21 2005
Picon

default event sample rate too high

By default the default sample rate is set to 100,000 clock cycles 
between samples. This is a very high sample rate and it is not 
appropriate for a default. This would be 20,000 samples PER processor on 
  a machine with a 2 GHz clock rate, e.g. Pentium 4 and AMD64.

Something producing around 500-1000 samples per second for the default 
would be more reasonable. The low frequency processors will need to be 
tweaked to values appropriate for their frequency. Thoughts on how to 
improve the default sample event?

2005-08-02  Will Cohen  <wcohen <at> redhat.com>

	* libop/op_events.c: Adjust default sample interval.

-Wil
Attachment (default_interval.patch): text/x-patch, 313 bytes
John Levon | 2 Aug 16:31 2005

Re: default event sample rate too high

On Tue, Aug 02, 2005 at 10:21:09AM -0400, William Cohen wrote:

> By default the default sample rate is set to 100,000 clock cycles 
> between samples. This is a very high sample rate and it is not 
> appropriate for a default. This would be 20,000 samples PER processor on 
>  a machine with a 2 GHz clock rate, e.g. Pentium 4 and AMD64.

Have you measured the overhead?

The problem is that we want to scale up for the faster processors, since
they'll get through more insns, but not exactly, since there's more to
performance than the number of clock cycles.

Probably the best way to fix this is to add a metered default that
adjusts as needed. And we can allow this for any such event to finally
say "take 2000 samples a second" which we've wanted for a while.

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
Richard Purdie | 2 Aug 16:38 2005

Re: Remove bashisms from opcontrol

On Tue, 2005-08-02 at 15:54 +0200, Philippe Elie wrote:
> I've applied the first patch, perhaps the approach given by Ralf Wildenhues
> for the second patch is better :
> 
> set_event()
> {
>     eval "CHOSEN_EVENTS_$1=$2"
> }
> 
> get_event()
> {
>     eval "echo \$CHOSEN_EVENTS_$1"
> }
> 
> set_event 2 foo:bar
> get_event 2
> 
> Is this enough portable ?

Yes, busybox is happy with this. I'd actually already tried to do
something like this but hadn't realised eval could help!

I've attached patch based on this which is much neater - I'm quite happy
with it.

Thanks,

Richard
Attachment (oprofile_nobash3.patch): text/x-patch, 4414 bytes
(Continue reading)

John Levon | 2 Aug 16:41 2005

Re: Remove bashisms from opcontrol

On Tue, Aug 02, 2005 at 03:38:18PM +0100, Richard Purdie wrote:

> Yes, busybox is happy with this. I'd actually already tried to do
> something like this but hadn't realised eval could help!
> 
> I've attached patch based on this which is much neater - I'm quite happy
> with it.

Can you also fix up the docs in doc/ ? Also we should probably mention
busybox requirements in HACKING somewhere

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
Richard Purdie | 2 Aug 18:24 2005

Re: Remove bashisms from opcontrol

On Tue, 2005-08-02 at 15:41 +0100, John Levon wrote:
> Can you also fix up the docs in doc/ ? Also we should probably mention
> busybox requirements in HACKING somewhere

I've attached a new patch which hopefully covers all the documentation
and adds a few warnings about keeping the script free of bashisms. The
diff might not apply to the ChangeLog as I can't access the latest CVS
from sourceforge anonymously (anonymous access is time lagged).

The second patch adds mention of the ARM callgraphing code to the
oprofile website.

Cheers,

Richard
Attachment (arm_docs_update.patch): text/x-patch, 1801 bytes
Attachment (bash_doc_update.patch): text/x-patch, 6355 bytes
John Levon | 2 Aug 18:31 2005

Re: Remove bashisms from opcontrol

On Tue, Aug 02, 2005 at 05:24:49PM +0100, Richard Purdie wrote:

> I've attached a new patch which hopefully covers all the documentation
> and adds a few warnings about keeping the script free of bashisms. The
> diff might not apply to the ChangeLog as I can't access the latest CVS
> from sourceforge anonymously (anonymous access is time lagged).
> 
> The second patch adds mention of the ARM callgraphing code to the
> oprofile website.
> 

Seems fine to me

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
Maynard Johnson | 2 Aug 18:42 2005
Picon

Re: (fwd) [ oprofile-Bugs-1249755 ] PPC/E500 no symbols

Philippe Elie wrote:
> Hi, any idea on this bug ?
None, I'm afraid.  It's not one of the processors I contributed support 
for, nor am I familiar with it.  I believe this chip was designed solely 
by Motorola and was not part of the IBM/Motorola PowerPC collaboration.

Will added the following comment to the bug:
"Some changes were made in April this year for the ppc64 to handle 
synthetic symbol and I am wondering if those have any effect on this
not working on ppc/e500."
The answer is "no", since that bug only shows up when profiling 64-bit 
applications, and the objdump of the app in question shows it to be 
elf32-powerpc.

Regards,
Maynard
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Subject:
> [ oprofile-Bugs-1249755 ] PPC/E500 no symbols
> From:
> "SourceForge.net" <noreply <at> sourceforge.net>
> Date:
> Mon, 01 Aug 2005 11:34:50 -0700
> To:
> noreply <at> sourceforge.net
> 
(Continue reading)

Philippe Elie | 2 Aug 19:36 2005
Picon

Re: Remove bashisms from opcontrol

On Tue, 02 Aug 2005 at 17:24 +0000, Richard Purdie wrote:

> On Tue, 2005-08-02 at 15:41 +0100, John Levon wrote:
> > Can you also fix up the docs in doc/ ? Also we should probably mention
> > busybox requirements in HACKING somewhere
> 
> I've attached a new patch which hopefully covers all the documentation
> and adds a few warnings about keeping the script free of bashisms. The
> diff might not apply to the ChangeLog as I can't access the latest CVS
> from sourceforge anonymously (anonymous access is time lagged).
> 
> The second patch adds mention of the ARM callgraphing code to the
> oprofile website.

Applied, note than this break existing /root/.oprofile/daemonrc setup
and events must be re-setup with opcontrol -e 

regards,
Philippe

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

Gmane