From: Nikodemus S. <nik...@ra...> - 2008-01-10 16:02:12
|
I've been looking at the oprofile support possibilities for SBCL. (Taking the patches seen here by Samium as my starting point.) >From where I stand, the first order of business is to support oprofiling of code loaded from the core -- which also has the nice property of staying still till the next save-lisp-and-die call. The JIT_SUPPORT branch of oprofile works by writing "fake ELF .so"'s that claim {anon:anon} samples from the dependents of the process. Unfortunately, since the core is mapped with file-backing, the samples are claimed by the core file (quite sensibly!), and the JIT_SUPPORT magic is unable to claim them. I believe the right thing will be to fix oprofile to be able to claim samples from file-backed mappings, but before hacking on oprofile, here's a patch that kludges around this by providing the runtime option --mmap-core without which os_map doesn't actually mmap the fd on Linux, but rather mmaps an anonymous region, and then reads from the fd. No, I'm not going to commit this, but something like this (maybe "--dont-mmap-core" instead of this) will be needed unless I/we can get oprofile to deal with file-backed mappings. Cheers, -- Nikodemus |