200 likes | 215 Views
Explore the improved multi-threading capabilities in Paradyn and Dyninst, including support for Open/MP constructs and enhanced stability for Linux applications. Learn about the backward compatibility features and future developments.
E N D
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. • 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.
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.
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.
A Multithreaded DyninstAPI ASync Events MT Interface MT Tramp Guards MT Process Control DyninstAPI paradynd
Current DyninstAPI Model BPatch_thread BPatch_process BPatch_image BPatch_module BPatch_function
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.
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.
Backwards Compatibility • Use execNewProcess() instead of createProcess(). BPatch_process *p = bpatch->execNewProcess(…) • Get threads from a process: BPatch_Vector<BPatch_thread> *thrds = p->getThreads()
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(…);
MT Dyninst Summary • Initial support • Linux/x86 • AIX • Solaris • Future support • Linux/IA64 • Linux/AMD-64 • Will be available in DyninstAPI 5.0
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.
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.
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