On Fri, Jul 12, 2013 at 11:21:55AM +0300, Pekka Enberg wrote: > On Fri, Jul 12, 2013 at 11:13 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote: > > I also don't see it helping with the JIT stuff; you still need to write out a > > file with symbol information, we still need to find the file. A less hacky > > solution for the entire JIT thing is you writing a proper ELF-DSO and > > mmap()'ing that :-) > > > > Storing a JIT specific userspace pointer in the VMA doesn't help with any of > > that. > > I'm thinking about corner cases like 'perf top' here. I don't see how we can > write out a ELF-DSO because the JIT compiler can generate new symbols > at any given time. Mmap the file PROT_READ|PROT_WRITE|PROT_EXEC, map the _entire_ file, not just the text section; make the symbol table larger than you expect. Then write the symbol name after you've jit'ed the text but before you use it. IIRC you once told me you never overwrite text but always append new symbols. So you can basically fill the DSO with text/symbols use mmap memory writes. Once the DSO is full -- equal to your previous anon-exec region being full, you simply mmap a new DSO. Wouldn't that work? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>