Re: Problem: how to identify source code points for latency profiling

Aaron Ucko (UCKO@vax1.rockhurst.edu)
Sun, 09 Jun 1996 18:38:39 -0600 (CST)


>> > what is the point of using __inline__ functions ...
>> >
>> > __inline__ void foo( arg ) {
>>
>> Arg is evaluated once. You don't get burned by nasty macro expansion
>> side effects (especially since we nest inlines 3 deep in places).
>
>i will use the IP pointer instead of __FILE__ and __LINE__ then, as a
>global identifier for source code points. It's more robust anyways.
>
>about transforming IP values (code addresses) into symbols later:
>
>i guess line info is lost or hard to recover. I can do function name
>matching, based on the symbol map [like readprofile], but this isnt enough
>for identifying cli()-s and sti()-s in most cases :((
>
>so this looks like trouble :( IP values are not human readable enough

Possible solutions:
1) Compile the kernel with -g.
2) create macro wrappers for inline functions, something like
#define foo(x) _foo_(x,__FILE__,__LINE__)
inline _foo_(int, char *, int) {
...
}

-- Aaron Ucko (ucko@vax1.rockhurst.edu; finger for PGP public key) | httyp!
"That's right," he said. "We're philosophers. We think, therefore we am."
-- Terry Pratchett, _Small Gods_ | Geek Code 3.1 [for explanation, finger
hayden@mankato.msus.edu]: GCS/M/S/C d- s: a18 C++(+++)>++++ UL++>++++ P++
L++>+++++ E- W(-) N++(+) o+ K- w--- O M@ V-(--) PS++(+++) PE- Y(+) PGP(+) t(+)
!5 X-- R(-) tv-@ b++(+++) DI+ !D-- G++(+++) e->+++++(*) h!>+ r-(--)>+++ y?