This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PowerPC - support application profiling


On Thu, 2002-11-14 at 16:49, Jonathan Larmour wrote:
> Gary Thomas wrote:
> > +
> > +    implements CYGPKG_PROFILE_TIMER
> 
> CYGINT_PROFILE_TIMER shirley? Or even CYGINT_PROFILE_HAL_TIMER since the 
> enable function has "hal" in it.
> 

OK.

> I'll be interested to see the generic support. I presume it's for gprof? 
> If it is, I would suggest CYGPKG_PROFILE_GPROF (living in 
> services/profile/gprof), as gprof isn't the only profiling system out 
> there. I think NavEcos said he was working on another(?) for example so we 
> should support more than one, even if we would prefer gprof.
> 

Yes, it is gprof based, so I guess I'll move it down a level (sigh).

> > +#ifdef CYGPKG_PROFILE
> 
> Hmm... I didn't think we wanted to say that just because a package was 
> loaded it was therefore necessarily doing stuff.
> 
> > +//--------------------------------------------------------------------------
> > +//
> > +// Profiling support - uses a separate high-speed timer
> > +//
> > +
> > +#include <cyg/hal/hal_arch.h>
> > +#include <cyg/hal/hal_intr.h>
> > +#include <cyg/hal/quicc/ppc8xx.h>
> > +#include <cyg/infra/profile.h>
> 
> infra?

Would you prefer "services"?  I don't see it going at the top-level.

> 
> > +// Can't rely on Cyg_Interrupt class being defined.
> > +#define Cyg_InterruptHANDLED 1
> 
> You can use the driver API.

Fair enough.

> 
> > +void
> > +hal_enable_profile_timer(int resolution)
> > +{
> > +    // Run periodic timer interrupt for profile 
> > +    cyg_uint16 piscr;
> > +    int period = resolution / 100;
> 
> Shouldn't this be a Cyg_resolution (from the driver API) to be properly 
> generic - i.e. the raison d'etre of having the numerator/denominator split.
> 

I really don't see any use for anything other than "samples/second".

> I think this shows up how we don't have proper support for a generic 
> interface to arbitrary hardware timers. Not something to solve now, but 
> it's something we lack.
> 

Agreed - hence the interface.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]