Neil Schellenberger(deleted)
|
RE: API to switch between CPU's?
|
Neil Schellenberger(deleted)
05/10/2010 5:23 PM
post54126
|
RE: API to switch between CPU's?
Maybe we should consider adding a TLS field(s) or similar to help
profiling out? Or figuring out a sensible way to use profiling counters
where they're available?
On Mon, 2010-05-10 at 17:14 -0400, David Sarrazin wrote:
> I had suggested the offset mechanism, based on what I saw in the kernel
> tracing code.
>
> After some hallway discussions, there's a few problems with
> ClockCycles()
>
> 1. It measures all time spent in the system. This means that if a
> function is pre-empted, the pre-emption time is charged to the function.
> 2. The value returned by ClockCycles() may change depending on which
> core is in use, and the delta between the cores may also vary over time.
> 3. Any sort of power management that involves modifying a core's clock
> is going to make this really really hard.
>
> Benefits of ClockCycles()
>
> 1. On some systems, it's a really cheap call.
> 2. It offers the best resolution time source.
>
> It would be fair to say that any user who is profiling their system,
> should bind their threads to specific cores, so that thread migration is
> not measured by the profiling tools.
>
> The best solution would be to measure the run_time of each individual
> thread, because things like pre-emption, and core migration won't be
> included in the total. I don't think Neutrino records a thread's
> runtime with accurate enough resolution to provide meaningful
> information on many smaller functions.
>
> Pidin can get the runtime of a specific thread, however that is not a
> cheap operation, and I think the runtime is in millisecond resolution.
>
> David
>
> > -----Original Message-----
> > From: Neil Schellenberger [mailto:community-noreply@qnx.com]
> > Sent: May 10, 2010 4:52 PM
> > To: ostech-core_os
> > Subject: Re: API to switch between CPU's?
> >
> > Be careful not to make any assumptions about the relative
> > frequencies of the counters. It is entirely possible that
> > they are not synchronized on all platforms and that idled
> > processors may make no progress at all....
> >
> >
> >
> >
> > _______________________________________________
> >
> > OSTech
> > http://community.qnx.com/sf/go/post54119
> >
> >
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post54123
>
|
|
|