On Sun, Nov 07, 2004 at 10:43:45AM -0700, Kristis Makris wrote:
> > First, if you're still working with 2.4, I wouldn't bother. Improvements
> > like this should only be for the 2.6 kernel OProfile.
>
> I'm working with 2.4.
Note I won't accept any patches that don't work with 2.6 kernel
OProfile.
> > Anyway, sounds like you need a generalisation of the 'module' concept to
> > generic kernel mappings. This can be as simple as renaming the interface
> > opd_create_kmapping() or whatever, or might require more significant
> > reworking.
>
> Using opd_create_module() I should be able to add to the list of mapping
> addresses. But how can I do so while the daemon is running ?
Well, by making changes to oprofiled so that it picks this information
from wherever you've placed it.
> opcontrol --start
> --add-mapping=my_first_module_name:0xc7770000:0xc777FFFF,my_second_module_name:0xc8880000,0xc888FFFF
> then I should be able to inform the daemon that there is an additional
> module mapping with the above start+end addresses. I see that in
> oprofiled.c USR1 and USR2 are used strictly for start/stop, so I don't
> see another way of communicating this information to the daemon (maybe
> there is).
If you only need to do this at start time, then add some oprofiled code
that reads /var/lib/oprofile/mappings file or something. If you need to
do it dynamically, then it's time to add some IPC to oprofiled (most
likely a named pipe).
regards
john
|