Re: Design hole in nptl (and more general in POSIX threads)
"Li, Xiao Feng" <[email protected]> Thu, 18 Dec 2003 18:24:31 +0800
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <06D5A38C3FFD964D802BDC6AC3E5377E04B902@bjsmsx401.ccr.corp.intel.com> |
Um.. I think this proposal is reasonable. Stack scanning is essential for the performance of managed runtime systems, NPTL certainly can do better in this field before special hardware support is available. -xiaofeng Date: Wed, 17 Dec 2003 12:29:49 +0000 From: Jamie Lokier <[email protected]> To: Dragi?a Duri? <[email protected]> Cc: [email protected] Subject: Re: Design hole in nptl (and more general in POSIX threads) Dragi?a Duri? wrote: > Advanced (probably every) garbage collector needs to scan threads > stacks for pointers to traced heap being kept in local variable spaces > of procedures in suspended threads. While suspending of other threads > is possible in portable way (thanks to this list for help) it is not > possible, in portable way, to get exact position of active portion of > threads stack. Only way (I know of) goes through pthread_getattr_np() > call which gives only partial information - one needs stack pointer > (obtainable only through oh-so-portable pthread debug interface and > only after hacking deeply nested include files for exact info on > position of stack pointer in greglist structure. You can send a signal such as SIGUSR1 to all threads and have them record the stack pointer in a data structure before putting themselves to sleep. > Meaning, it is not possible to implement this fundamental feature of > advanced high-level langugages in portable way. > > Are there plans to fix this somewhere before greglist? :) Well, no matter what changes are made to nptl, it's not going to make the solution portable to non-nptl platforms is it? -- Jamie