1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Notes on profiling AI:
From: Ian Lance Taylor (ian@zembu.com)
[...]
>
>Fork is easy enough to handle, at least on GNU/Linux. If you set the
>environment variable GMON_OUT_PREFIX, glibc will automatically append
>the process ID when writing the gmon.out file. If you then also do
>this in the child after calling fork:
> extern void _start (void), etext (void);
> monstartup ((u_long) &_start, (u_long) &etext);
>you will a set of ${GMON_OUT_PREFIX}.pid files, one for the parent and
>one for each child.
Note: set GMON_OUT_PREFIX to be the desired filename prefix for the gmon.out
files.
|