1 / 20

Support for Multi-Threading and Open/MP

Support for Multi-Threading and Open/MP. Matthew LeGendre legendre@cs.wisc.edu. Overview. Open/MP We currently support Open/MP applications as regular multithreaded apps. We’re adding support to name Open/MP constructs. Multithreaded DyninstAPI Currently available in Paradyn.

bbarker
Download Presentation

Support for Multi-Threading and Open/MP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Support for Multi-Threading and Open/MP Matthew LeGendre legendre@cs.wisc.edu

  2. Overview • Open/MP • We currently support Open/MP applications as regular multithreaded apps. • We’re adding support to name Open/MP constructs. • Multithreaded DyninstAPI • Currently available in Paradyn. • We’re adding support for multithreaded applications in Dyninst. • Improved support for multithreaded Linux/x86 in Paradyn. • Better stability. • Now available on some 2.4 kernels.

  3. Open/MP • Open/MP programs are currently supported the same as other threaded applications. • The recent addition of loops in the resource hierarchy compliments our existing Open/MP support. • Future work remains in naming Open/MP resources.

  4. Current State of Open/MP

  5. Current State of Open/MP

  6. Todo: Name Open/MP Threads

  7. Todo: Name Open/MP Loops

  8. Todo: Name Open/MP Synchronization Primitives

  9. Multithreaded DyninstAPI • Paradyn supports Multithreaded applications. • We’re adding that support to Dyninst. • Make the Dyninst implementation thread aware. • Modify the DyninstAPI interface to allow for control and instrumentation of threads.

  10. A Multithreaded DyninstAPI ASync Events MT Interface MT Tramp Guards MT Process Control DyninstAPI paradynd

  11. Current DyninstAPI Model BPatch_thread BPatch_process BPatch_image BPatch_module BPatch_function

  12. Backwards Compatibility • Process operations that used to exist in BPatch_thread are being copied to BPatch_process. • The old BPatch_thread functions will call the equivalent functions in BPatch_process. • The new BPatch_process functions should be used when writing new mutators. For Example: • BPatch_thread::malloc will call BPatch_process::malloc in the owner process.

  13. Backwards Compatibility • Existing mutators will continue to work on single threaded applications. • Mutators will have to be updated to use the new interface before they work on multithreaded applications.

  14. Backwards Compatibility • Use execNewProcess() instead of createProcess(). BPatch_process *p = bpatch->execNewProcess(…) • Get threads from a process: BPatch_Vector<BPatch_thread> *thrds = p->getThreads()

  15. Inserting Instrumentation • Instrumentation that is run by all threads: • proc->insertSnippet(…); • Instrumentation that is run by one thread: • thrd->insertSnippet(…); • Instrumentation that is run once: • proc->oneTimeCode(…); • Instrumentation that is run once by a thread: • thrd->oneTimeCode(…);

  16. MT Dyninst Summary • Initial support • Linux/x86 • AIX • Solaris • Future support • Linux/IA64 • Linux/AMD-64 • Will be available in DyninstAPI 5.0

  17. Linux MT Support in Paradyn • We’ve improved Paradyn’s support of Multithreaded Linux Applications. • Rewrote much of our Linux process control code. • Added support for more versions of the NPTL threading library. • Independent control of each thread.

  18. Linux MT Support in Paradyn • Improved stability • Support for the NPTL threading package • Most Linux 2.6 kernels • RHEL, RedHat 9, Fedora Core • The old linuxthreads threading package is currently unsupported.

  19. Summary • Name Open/MP constructs in a future Paradyn release • Multithreaded DyninstAPI will be available in release 5.0 • Improved Linux threading support in Paradyn release 4.2

  20. Questions?

More Related