This is the mail archive of the ecos-discuss@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: profiler & memory leak detector


NavEcos wrote:
> for everything I think for the i386).  I don't think it should be
> hard to determine which task was executing when the interrupt
> happened, but I hadn't planned on doing it.  I bet it can be
> done with a global variables - does anybody know if this is true
> or not, and if it's true - how ?

It *should* be safe to call cyg_thread_self() from anywhere - it just
reads a static variable. Of course, that's not guaranteed, but I guess a
profiler is always a bit messy and that hack worked fine for the simple
thread profiler I once implemented.

> My version also requires : Linux, and a network connection and
> binutils (i.e. readelf and the sort command) since my version is
> a HACK and makes use of external programs.

Which is fine, since that's exactly the Unix way to do it. :-)

Martin

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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