diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-03-23 15:51:27 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-03-23 15:51:27 +0000 |
commit | 3a829b1c12609aae928c035b8f17ae238f6e809b (patch) | |
tree | 5ad109cbb6d1159db7d5a8d765f4995f015b7155 /sys/arch | |
parent | fe805d3568ba38f32e5785ef64ed5e07e2d1df00 (diff) |
Make rusage totals, itimers, and profile settings per-process instead
of per-rthread. Handling of per-thread tick and runtime counters
inspired by how FreeBSD does it.
ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/alpha/clock.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m88k_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/solbourne/solbourne/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/db_interface.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 4 |
7 files changed, 16 insertions, 16 deletions
diff --git a/sys/arch/alpha/alpha/clock.c b/sys/arch/alpha/alpha/clock.c index 9f4fbeb4fd7..e8c8db02f79 100644 --- a/sys/arch/alpha/alpha/clock.c +++ b/sys/arch/alpha/alpha/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.20 2010/09/20 06:33:46 matthew Exp $ */ +/* $OpenBSD: clock.c,v 1.21 2012/03/23 15:51:25 guenther Exp $ */ /* $NetBSD: clock.c,v 1.29 2000/06/05 21:47:10 thorpej Exp $ */ /* @@ -126,8 +126,8 @@ cpu_initclocks(void) * PALcode save a clock interrupt, which would get delivered * when we spl0() in autoconf.c. If established the clock * interrupt handler earlier, that interrupt would go to - * hardclock, which would then fall over because p->p_stats - * isn't set at that time. + * hardclock, which would then fall over because the pointer + * to the virtual timers wasn't set at that time. */ platform.clockintr = hardclock; schedhz = 16; diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 1e07d7bc885..4dba2b20078 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.507 2012/03/19 00:49:08 jsg Exp $ */ +/* $OpenBSD: machdep.c,v 1.508 2012/03/23 15:51:25 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -2458,7 +2458,7 @@ boot(int howto) if ((howto & RB_NOSYNC) == 0 && waittime < 0) { extern struct proc proc0; - /* protect against curproc->p_stats.foo refs in sync() XXX */ + /* make sure there's a process to charge for I/O in sync() */ if (curproc == NULL) curproc = &proc0; diff --git a/sys/arch/m88k/m88k/m88k_machdep.c b/sys/arch/m88k/m88k/m88k_machdep.c index 89ddb045343..8b94310e7dc 100644 --- a/sys/arch/m88k/m88k/m88k_machdep.c +++ b/sys/arch/m88k/m88k/m88k_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88k_machdep.c,v 1.51 2010/12/23 20:05:08 miod Exp $ */ +/* $OpenBSD: m88k_machdep.c,v 1.52 2012/03/23 15:51:26 guenther Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -560,7 +560,7 @@ cpu_emergency_disable() p->p_priority = p->p_usrpri; p->p_stat = SRUN; setrunqueue(p); - p->p_stats->p_ru.ru_nvcsw++; + p->p_ru.ru_nvcsw++; SCHED_UNLOCK(s); } diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c index d0a3ffe2d4a..ca9b8b7f812 100644 --- a/sys/arch/solbourne/solbourne/machdep.c +++ b/sys/arch/solbourne/solbourne/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.21 2011/07/05 04:48:02 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.22 2012/03/23 15:51:26 guenther Exp $ */ /* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */ /* @@ -538,7 +538,7 @@ boot(howto) if ((howto & RB_NOSYNC) == 0 && waittime < 0) { extern struct proc proc0; - /* XXX protect against curproc->p_stats.foo refs in sync() */ + /* make sure there's a process to charge for I/O in sync() */ if (curproc == NULL) curproc = &proc0; waittime = 0; diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 379b7d50c03..718ef15df43 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.137 2011/07/05 04:48:02 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.138 2012/03/23 15:51:26 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -551,7 +551,7 @@ boot(howto) if ((howto & RB_NOSYNC) == 0 && waittime < 0) { extern struct proc proc0; - /* XXX protect against curproc->p_stats.foo refs in sync() */ + /* make sure there's a process to charge for I/O in sync() */ if (curproc == NULL) curproc = &proc0; waittime = 0; diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c index a68f7aa52b3..96d351fe992 100644 --- a/sys/arch/sparc64/sparc64/db_interface.c +++ b/sys/arch/sparc64/sparc64/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.31 2011/07/03 18:34:14 oga Exp $ */ +/* $OpenBSD: db_interface.c,v 1.32 2012/03/23 15:51:26 guenther Exp $ */ /* $NetBSD: db_interface.c,v 1.61 2001/07/31 06:55:47 eeh Exp $ */ /* @@ -802,8 +802,8 @@ db_proc_cmd(addr, have_addr, count, modif) p->p_vmspace->vm_maxsaddr, p->p_vmspace->vm_ssize, (unsigned long long)ptoa(p->p_vmspace->vm_ssize)); db_printf("profile timer: %ld sec %ld usec\n", - p->p_stats->p_timer[ITIMER_PROF].it_value.tv_sec, - p->p_stats->p_timer[ITIMER_PROF].it_value.tv_usec); + p->p_p->ps_timer[ITIMER_PROF].it_value.tv_sec, + p->p_p->ps_timer[ITIMER_PROF].it_value.tv_usec); db_printf("pcb: %p tf: %p fpstate: %p\n", &p->p_addr->u_pcb, p->p_md.md_tf, p->p_md.md_fpstate); return; diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 2130f5d4818..6b30d4b1b4f 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.136 2011/07/05 04:48:02 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.137 2012/03/23 15:51:26 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -639,7 +639,7 @@ boot(howto) extern struct proc proc0; extern int sparc_clock_time_is_ok; - /* XXX protect against curproc->p_stats.foo refs in sync() */ + /* make sure there's a process to charge for I/O in sync() */ if (curproc == NULL) curproc = &proc0; waittime = 0; |