On 07/12/2013 11:55 AM, Peter Zijlstra wrote:
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.
I don't but I think Hotspot, for example, does recompile method. Dunno
if it's a problem really, we could easily come up with a versioning
scheme for the methods and teach perf to treat the different memory
regions as the same method.
On 07/12/2013 11:55 AM, Peter Zijlstra wrote:
Once the DSO is full -- equal to your previous anon-exec region being full,
you simply mmap a new DSO.
Wouldn't that work?
Okay and then whenever 'perf top' sees a non-mapped IP it reloads the
DSO (if it has changed)?
Yeah, I could see that working. It doesn't solve the problems Ingo
mentioned which are also important, though.
Pekka
--
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>