diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-03-12 09:37:17 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-03-12 09:37:17 +0000 |
commit | f0edf71d0715678b64251c85b679f3192b0020d8 (patch) | |
tree | ecfdecfd831ac54a526ebf9f664903cfddf09372 /sys/arch/hppa | |
parent | 22d6176c7a5b0d9982db2ad3b4a2e6befb249d3b (diff) |
Fix kernel profiling on MP systems by using per-CPU buffers and teach
kgmon(8) to deal with them, this time without public header changes.
Previously various CPUs were iterating over the same global buffer at
the same time to modify it and never ended.
This diff includes some ideas submited by Thor Simon to NetBSD via miod@.
ok deraadt@, mikeb@, haesbaert@
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/include/cpu.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index b477fc6b15a..536ae85f1fb 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.83 2013/02/12 08:06:22 mpi Exp $ */ +/* $OpenBSD: cpu.h,v 1.84 2013/03/12 09:37:16 mpi Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -103,6 +103,9 @@ struct cpu_info { #ifdef DIAGNOSTIC int ci_mutex_level; #endif +#ifdef GPROF + struct gmonparam *ci_gmon; +#endif } __attribute__((__aligned__(64))); #define CPUF_RUNNING 0x0001 /* CPU is running. */ |