Related articles |
---|
[2 earlier articles] |
Re: Instrumenting multithreaded applications mailbox@dmitry-kazakov.de (Dmitry A.Kazakov) (2003-01-25) |
Re: Instrumenting multithreaded applications jstracke@speakeasy.net (John Stracke) (2003-01-25) |
Re: Instrumenting multithreaded applications bobduff@World.std.com (Robert A Duff) (2003-01-25) |
Re: Instrumenting multithreaded applications bje@redhat.com (Ben Elliston) (2003-01-25) |
Re: Instrumenting multithreaded applications joachim_d@gmx.de (Joachim Durchholz) (2003-01-25) |
Re: Instrumenting multithreaded applications chase@world.std.com (David Chase) (2003-01-25) |
Re: Instrumenting multithreaded applications lex@cc.gatech.edu (Lex Spoon) (2003-01-25) |
Re: Instrumenting multithreaded applications idbaxter@semdesigns.com (Ira Baxter) (2003-01-26) |
From: | Lex Spoon <lex@cc.gatech.edu> |
Newsgroups: | comp.compilers |
Date: | 25 Jan 2003 01:12:20 -0500 |
Organization: | Georgia Institute of Technology |
References: | 03-01-118 |
Keywords: | parallel, testing |
Posted-Date: | 25 Jan 2003 01:12:20 EST |
Matthew Legendre <legendre@u.arizona.edu> writes:
> Does anyone have any experience with or know of any work related to
> instrumenting a multithreaded application?
>
> We've got a situation where we want to insert instrumentation into a
> multithreaded application (for profiling purposes). We need to use some
> form of mutual exclusion since the instrumentation writes to a global data
> structure.
I haven't actually worked on this, but couldn't you give each thread
its own profiling table, and then combine everything at the end?
The the shared data would be a table of pointers to the tables for
individual threads. This shared data needs to be accessed only when
new threads are created, and when the program is shutting down and you
want to tally results. The data structure for the current thread can
be pointed to by a thread-local variable, something that most thread
systems provide.
Lex
Return to the
comp.compilers page.
Search the
comp.compilers archives again.