Pan Xing wrote:
> (1)
> Now I am confused: What kind of operations be counted as system CPU
> usage, and what kind be counted as User CPU?
>
> Is is ture that all the dynamically linked module provided by
> system(libc.so, etc.) consists the %system and all static modules and
> the program itself consists the %User ?
No. Time spent executing kernel code is `system' time; everything else
is `user' time.
> (2)
> If it is true, how can I profile these program?
> I tried gprof and found it can only profile functions exactly defined in
> that program. For example, even the very common sqrt() could not be
> profiled.
You can build a profile version of a library. Many libraries have a
configure option (--with-profile) to allow a profile version to be
built automatically. Such libraries are generally named libfoo_p.a.
--
Glynn Clements <[EMAIL PROTECTED]>