From: "Daniel Phillips" <phillips@xxxxxxxxxxxxxx>
> I built kernprof with gcc 3.0.2 and was able to boot ok. I did not
patch the
> compiler.
Correct. The gcc patch applies to 2.94.x, but beginning with 2.96.x the
gcc source appears to reflect the patch. However, 2.96.x and -pg
(needed by CONFIG_MCOUNT) doesn't appear to build a working kernel. I
was able to use gcc 3.0.1 (with and without -pg) to build a working
2.4.13+kernprof kernel, but 3.0.1 does *not* build a working
2.4.13+lockmeter kernel.
I have no personal experience with gcc 3.0.2.
> I have used kernprof -i successfully, but kernprof have seen no
> discernible results for call graphs. I imagine I'm supposed to do
this:
>
> kernprof -tcg
> kernprof -b
> <wait a while>
> kernprof -g
>
> Is that correct? Nothing happens. PC sampling works fine. Does this
mean
> that mcount isn't working?
"kernprof -g" should produce a file "gmon.out".
> I didn't have any luck with pmc.
I haven't tried pmc with anything beyond gcc (patched) 2.94.x and a
2.4.10 kernel.
> By the way, is there supposed to be a gmon.c, or is that function
handled by
> kernprof now?
The kernprof command produces a gmon.out file, and the gprof command
takes the gmon.out and the vmlinux binary and produces the final results
file.
> Finally, I made this change to the Makefile to get it to compile:
>
> -LINUX_INC_ROOT = /usr/include
> +LINUX_INC_ROOT = /usr/src/linux/include
Or you can simply set this environment variable before the "make" or as
part of the "make".
John Hawkes
hawkes@xxxxxxx
|