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


Gary Thomas wrote:
On Thu, 2002-11-14 at 16:49, Jonathan Larmour wrote:


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).
Much easier now before you'd checked it in, at least! :-) Thanks.

+#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.
<cyg/profile/profile.h> seems fine. I think it's reasonable to assume there'll only be one profiling system enabled in any one configuration!

I also just noticed you've made it profile_hit() rather than cyg_profile_hit() or some such slightly less polluting thing, e.g. __profile_hit would be just as fine.

+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".
Yeah, fair point. Periodicity is all that matters, not the precise frequency.

Thanks,

Jifl
--
eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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