Re: Split Stacks proposal

2009-03-02 Thread Mark Mitchell
Ian Lance Taylor wrote: Daniel showed how this can fail for objects with internal pointers. This includes __gnu_cxx::__vstring, which is likely to be the default std::string class in libstdc++ 7, so this is not an unlikely occurrence. The C++ standard limits the compiler's ability to

Re: Split Stacks proposal

2009-03-02 Thread Joe Buck
On Mon, Mar 02, 2009 at 12:16:42PM -0800, Mark Mitchell wrote: Ian Lance Taylor wrote: Daniel showed how this can fail for objects with internal pointers. This includes __gnu_cxx::__vstring, which is likely to be the default std::string class in libstdc++ 7, so this is not an unlikely

Re: Split Stacks proposal

2009-03-02 Thread Michael Veksler
Joe Buck wrote: On Mon, Mar 02, 2009 at 12:16:42PM -0800, Mark Mitchell wrote: The C++ standard limits the compiler's ability to introduce copies. It says Here are where copies occur; some of these can be optimized away. It doesn't say anything about inserting more copies. So, depending

Re: Split Stacks proposal

2009-03-02 Thread Ian Lance Taylor
Michael Veksler mveks...@techunix.technion.ac.il writes: In this case, how is it possible to copy the objects? Will things just crash at run-time? Although people have been discussing copying the objects, I should point out that my original proposal suggests not copying. Instead the code can

Re: Split Stacks proposal

2009-02-27 Thread Mathieu Lacage
comments below, On Thu, 2009-02-26 at 14:05 -0800, Ian Lance Taylor wrote: I've put a project proposal for split stacks on the wiki at http://gcc.gnu.org/wiki/SplitStacks . The idea is to permit the stack of a single thread to be split into discontiguous segments, thus permitting many more

Re: Split Stacks proposal

2009-02-27 Thread Andrew Haley
Ian Lance Taylor wrote: Joel Sherrill joel.sherr...@oarcorp.com writes: Ian Lance Taylor wrote: I've put a project proposal for split stacks on the wiki at http://gcc.gnu.org/wiki/SplitStacks . The idea is to permit the stack of a single thread to be split into discontiguous segments, thus

Re: Split Stacks proposal

2009-02-27 Thread Dave Korn
Mathieu Lacage wrote: It would be totally awesome to do this if you could provide an option to delegate to a user-provided function the allocation and deallocation of the stack blobs needed by threads. Ideally, I would even be able to use heap memory for that stack space if I wanted to.

Re: Split Stacks proposal

2009-02-27 Thread Daniel Jacobowitz
On Fri, Feb 27, 2009 at 09:10:10AM +0100, Mathieu Lacage wrote: - if you want to use the stack protector and split stacks, it should be fairly trivial to extend the data structure which contains the stack protector with a new field, no ? The stack protector is just a word, not a pointer.

Re: Split Stacks proposal

2009-02-27 Thread Ian Lance Taylor
Andi Kleen a...@firstfloor.org writes: Ian Lance Taylor i...@google.com writes: I've put a project proposal for split stacks on the wiki at http://gcc.gnu.org/wiki/SplitStacks . The idea is to permit the stack of a single thread to be split into discontiguous segments, thus permitting many

Re: Split Stacks proposal

2009-02-27 Thread Ian Lance Taylor
Mathieu Lacage mathieu.lac...@sophia.inria.fr writes: On Thu, 2009-02-26 at 14:05 -0800, Ian Lance Taylor wrote: I've put a project proposal for split stacks on the wiki at http://gcc.gnu.org/wiki/SplitStacks . The idea is to permit the stack of a single thread to be split into discontiguous

Re: Split Stacks proposal

2009-02-27 Thread Mathieu Lacage
On Fri, 2009-02-27 at 08:54 -0800, Ian Lance Taylor wrote: It would be totally awesome to do this if you could provide an option to delegate to a user-provided function the allocation and deallocation of the stack blobs needed by threads. Yes, this would be a goal. The main reason I

Re: Split Stacks proposal

2009-02-27 Thread Ian Lance Taylor
Mathieu Lacage mathieu.lac...@sophia.inria.fr writes: On Fri, 2009-02-27 at 08:54 -0800, Ian Lance Taylor wrote: It would be totally awesome to do this if you could provide an option to delegate to a user-provided function the allocation and deallocation of the stack blobs needed by

Re: Split Stacks proposal

2009-02-27 Thread John Regehr
This effort is relevant: http://research.microsoft.com/en-us/um/people/jcondit/capriccio-sosp-2003.pdf John Regehr

Re: Split Stacks proposal

2009-02-27 Thread Ian Lance Taylor
John Regehr reg...@cs.utah.edu writes: This effort is relevant: http://research.microsoft.com/en-us/um/people/jcondit/capriccio-sosp-2003.pdf Yes. Unfortunately, their analysis which lets them avoid testing at the entry to each function requires a complete call graph, which is not something

Split Stacks proposal

2009-02-26 Thread Ian Lance Taylor
I've put a project proposal for split stacks on the wiki at http://gcc.gnu.org/wiki/SplitStacks . The idea is to permit the stack of a single thread to be split into discontiguous segments, thus permitting many more threads to be active at one time without worrying about stack overflow or about

Re: Split Stacks proposal

2009-02-26 Thread Joel Sherrill
Ian Lance Taylor wrote: I've put a project proposal for split stacks on the wiki at http://gcc.gnu.org/wiki/SplitStacks . The idea is to permit the stack of a single thread to be split into discontiguous segments, thus permitting many more threads to be active at one time without worrying about

Re: Split Stacks proposal

2009-02-26 Thread Andi Kleen
Ian Lance Taylor i...@google.com writes: I've put a project proposal for split stacks on the wiki at http://gcc.gnu.org/wiki/SplitStacks . The idea is to permit the stack of a single thread to be split into discontiguous segments, thus permitting many more threads to be active at one time