Re: GNU Pth compatibility
On Thu, Jan 15, 2009 at 03:26:22AM -0500, Yang Zhang wrote: > - valgrind pth works with valgrind, but generates more (incorrect) messages. Its possible to compile pth with all neccessary annotations for valgrind. As far as I remember, its origin is from the valgrind mailing list. The patch in my from GNU pth derived version: http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth mfg Martin Kögler __ GNU Portable Threads (Pth)http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing [email protected] Automated List Manager (Majordomo) [email protected]
Re: GNU Pth compatibility
Steve Alstrin wrote: -Original Message- From: [email protected] [mailto:[email protected]] On Behalf Of Yang Zhang Sent: Thursday, January 15, 2009 10:28 AM To: [email protected] Subject: Re: GNU Pth compatibility Steve Alstrin wrote: - OS threads (pthreads) If your using pth you wont be using native threads. Actually, this is pretty important to me. I'm working on a program containing one or two OS threads handling network IO (each thread managing a set of user threads), along with some number of other OS threads that serve as compute threads which need to communicate with the network threads. Yes, it's possible to use processes and IPC, but the performance suffers as a result. Not for sure what you mean by all this. Are you saying that you will be linking to modules that use the native threads? If you are using the posix compliant portion of pth to use the pthread_* calls, then you will have link problems using both native threads and pth pthreads. Correct, I won't be using pth's pthreads interface, as I would want to use both pth and OS pthreads concurrently. - valgrind Not for sure about this one, but tools like Insure++ don't work well with these, if you need to use a memory checker, recompile with native for that test. Do you understand why exactly these memory checkers trip up on Pth? I would say its because they are messing around with the instruction pointer, which is what pth is doing also. The way that pth works is anytime an blocking call is used( i.e. any blocking i/o or sleep... Etc.) it switches to the next threads malloced stack space and modifies the instrution pointer to point to the next instruction for that thread. Right, but why is this a problem? Lots of things manipulate the instruction pointer. I would've thought it was more of a problem with assumptions about the stack...but I guess that's why I'm asking. Any details spared would be great. -- Yang Zhang http://www.mit.edu/~y_z/ __ GNU Portable Threads (Pth)http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing [email protected] Automated List Manager (Majordomo) [email protected]
RE: GNU Pth compatibility
-Original Message- From: [email protected] [mailto:[email protected]] On Behalf Of Yang Zhang Sent: Thursday, January 15, 2009 10:28 AM To: [email protected] Subject: Re: GNU Pth compatibility Steve Alstrin wrote: > - OS threads (pthreads) > If your using pth you wont be using native threads. Actually, this is pretty important to me. I'm working on a program containing one or two OS threads handling network IO (each thread managing a set of user threads), along with some number of other OS threads that serve as compute threads which need to communicate with the network threads. Yes, it's possible to use processes and IPC, but the performance suffers as a result. Not for sure what you mean by all this. Are you saying that you will be linking to modules that use the native threads? If you are using the posix compliant portion of pth to use the pthread_* calls, then you will have link problems using both native threads and pth pthreads. > > - valgrind > Not for sure about this one, but tools like Insure++ don't work well > with these, if you need to use a memory checker, recompile with native > for that test. Do you understand why exactly these memory checkers trip up on Pth? I would say its because they are messing around with the instruction pointer, which is what pth is doing also. The way that pth works is anytime an blocking call is used( i.e. any blocking i/o or sleep... Etc.) it switches to the next threads malloced stack space and modifies the instrution pointer to point to the next instruction for that thread. -- Yang Zhang http://www.mit.edu/~y_z/ __ GNU Portable Threads (Pth)http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing [email protected] Automated List Manager (Majordomo) [email protected] __ GNU Portable Threads (Pth)http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing [email protected] Automated List Manager (Majordomo) [email protected]
Re: GNU Pth compatibility
Steve Alstrin wrote: - OS threads (pthreads) If your using pth you wont be using native threads. Actually, this is pretty important to me. I'm working on a program containing one or two OS threads handling network IO (each thread managing a set of user threads), along with some number of other OS threads that serve as compute threads which need to communicate with the network threads. Yes, it's possible to use processes and IPC, but the performance suffers as a result. - valgrind Not for sure about this one, but tools like Insure++ don't work well with these, if you need to use a memory checker, recompile with native for that test. Do you understand why exactly these memory checkers trip up on Pth? -- Yang Zhang http://www.mit.edu/~y_z/ __ GNU Portable Threads (Pth)http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing [email protected] Automated List Manager (Majordomo) [email protected]
RE: GNU Pth compatibility
Comments inline below. -Original Message- From: [email protected] [mailto:[email protected]] On Behalf Of Yang Zhang Sent: Thursday, January 15, 2009 2:26 AM To: [email protected] Subject: GNU Pth compatibility Hi, I'm wondering if anyone can verify if GNU Pth works properly (or doesn't work properly) with any of the following: - gdb Works fine with gdb, although azs far as gdb is concerned you will ojnly see a single thread. - OS threads (pthreads) If your using pth you wont be using native threads. - valgrind Not for sure about this one, but tools like Insure++ don't work well with these, if you need to use a memory checker, recompile with native for that test. - gprof Havent tried... - google-perftools Don't even know what this is I've been bitten in the past by another user-level threading package's incompatibilities/quirks with most of the above; I'm wondering if Pth is a better solution in these regards. -- Yang Zhang http://www.mit.edu/~y_z/ __ GNU Portable Threads (Pth)http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing [email protected] Automated List Manager (Majordomo) [email protected] __ GNU Portable Threads (Pth)http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing [email protected] Automated List Manager (Majordomo) [email protected]
Re: GNU Pth compatibility
I didn't have any problems using gdb on the executables with Pth (used GNU/Linux Fedora 8). Don't know about the rest. Yang Zhang wrote: > Hi, I'm wondering if anyone can verify if GNU Pth works properly (or > doesn't work properly) with any of the following: > > - gdb > - OS threads (pthreads) > - valgrind > - gprof > - google-perftools > > I've been bitten in the past by another user-level threading package's > incompatibilities/quirks with most of the above; I'm wondering if Pth is > a better solution in these regards. __ GNU Portable Threads (Pth)http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing [email protected] Automated List Manager (Majordomo) [email protected]
