Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   ryo
Date:           Sat Aug 14 17:51:20 UTC 2021

Modified Files:
        src/common/lib/libc/gmon: mcount.c
        src/sys/arch/aarch64/include: cpu.h
        src/sys/arch/alpha/include: cpu.h
        src/sys/arch/arm/include: cpu.h
        src/sys/arch/hppa/include: cpu.h
        src/sys/arch/mips/include: cpu.h
        src/sys/arch/or1k/include: cpu.h
        src/sys/arch/powerpc/include: cpu.h
        src/sys/arch/riscv/include: cpu.h
        src/sys/arch/sparc/include: cpu.h
        src/sys/arch/sparc64/include: cpu.h
        src/sys/arch/vax/include: cpu.h
        src/sys/arch/x86/include: cpu.h
        src/sys/kern: kern_clock.c subr_prof.c
        src/sys/sys: gmon.h
        src/usr.sbin/kgmon: kgmon.8 kgmon.c

Log Message:
Improved the performance of kernel profiling on MULTIPROCESSOR, and possible to get profiling data for each CPU.

In the current implementation, locks are acquired at the entrance of the mcount
internal function, so the higher the number of cores, the more lock conflict
occurs, making profiling performance in a MULTIPROCESSOR environment unusable
and slow. Profiling buffers has been changed to be reserved for each CPU,
improving profiling performance in MP by several to several dozen times.

- Eliminated cpu_simple_lock in mcount internal function, using per-CPU buffers.
- Add ci_gmon member to struct cpu_info of each MP arch.
- Add kern.profiling.percpu node in sysctl tree.
- Add new -c <cpuid> option to kgmon(8) to specify the cpuid, like openbsd.
  For compatibility, if the -c option is not specified, the entire system can be
  operated as before, and the -p option will get the total profiling data for
  all CPUs.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/common/lib/libc/gmon/mcount.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/aarch64/include/cpu.h
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/alpha/include/cpu.h
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/arm/include/cpu.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hppa/include/cpu.h
cvs rdiff -u -r1.132 -r1.133 src/sys/arch/mips/include/cpu.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/or1k/include/cpu.h
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/riscv/include/cpu.h
cvs rdiff -u -r1.109 -r1.110 src/sys/arch/sparc/include/cpu.h
cvs rdiff -u -r1.132 -r1.133 src/sys/arch/sparc64/include/cpu.h
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/vax/include/cpu.h
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.144 -r1.145 src/sys/kern/kern_clock.c
cvs rdiff -u -r1.49 -r1.50 src/sys/kern/subr_prof.c
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/gmon.h
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/kgmon/kgmon.8
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/kgmon/kgmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index