tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sane support for SMP kernel profiling

In article <>,
Thor Simon  <> wrote:
>We've fixed SMP kernel profiling, which worked poorly at best (particularly
>on systems with high HZ) since a lock was taken and released around every
>single entry to mcount.  Thanks to Andy for the suggestion as to how.
>The following patch includes:
>       * A convenience change to to make it simpler to
>         cross-build profiling kernels (-p)
>       * Per-CPU profiling space
>       * Changes to kgmon to fetch profiling data per-CPU rather than
>         globally on MP systems.  gprof already knows how to merge
>         multiple profiles so there seems little reason to include this
>         functionaity in the kernel code or kgmon, both of which should
>         be as small and simple as possible.
>       * The MCOUNT macro is cleaned up to an inline function on
>         architectures which define PROFILE_TASTEFUL_FUNCTIONS.  The idea is
>         to eventually eliminate the macro.
>       * The kernel and userspace mcount implementations are separated
>         into two source files to clean up (some of) a really ugly #ifdef
>         mess.
>       * A correct, non-locking mcount implementation is included for
>         i386.  Other ports still build and should be no worse than they
>         were before, but also no better.
>Patch is against netbsd-5.  Comments much appreciated.

Perhaps move it from common to sys and libc since nothing is shared anymore.


Home | Main Index | Thread Index | Old Index