Re: Instrumenting multithreaded applications

Joachim Durchholz <joachim_d@gmx.de>
25 Jan 2003 01:02:43 -0500

          From comp.compilers

Related articles
Instrumenting multithreaded applications legendre@u.arizona.edu (Matthew Legendre) (2003-01-21)
Re: Instrumenting multithreaded applications nmm1@cus.cam.ac.uk (2003-01-25)
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)
| List of all articles for this month |
From: Joachim Durchholz <joachim_d@gmx.de>
Newsgroups: comp.compilers
Date: 25 Jan 2003 01:02:43 -0500
Organization: Compilers Central
References: 03-01-118
Keywords: parallel, testing
Posted-Date: 25 Jan 2003 01:02:42 EST

The problem seems to be the global data structure.
I see two approaches:
1) Rewrite the routines to access the global data structure so that
their critical sections are extremely short. Then switch off threading
within the critical sections.
2) If (1) is impossible, you can set up a small queue that has short
critical sections. The queue will take up profiling data that cannot be
currently written to the global data structure due to locking; the
routines that write to the global data structure go into a loop
immediately before exit if they find new data in the queue.


(2) is just an emergency strategy if (1) doesn't work - it introduces
additional code that must be written and tested, it adds to the
instrumentation overhead, and it introduces dynamic data structure hassles.


Regards,
Joachim


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.