Deleted Added
full compact
vm_meter.c (103216) vm_meter.c (104387)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)vm_meter.c 8.4 (Berkeley) 1/4/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)vm_meter.c 8.4 (Berkeley) 1/4/94
34 * $FreeBSD: head/sys/vm/vm_meter.c 103216 2002-09-11 08:13:56Z julian $
34 * $FreeBSD: head/sys/vm/vm_meter.c 104387 2002-10-02 20:31:47Z jhb $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/lock.h>
41#include <sys/mutex.h>
42#include <sys/proc.h>

--- 70 unchanged lines hidden (view full) ---

113 mtx_unlock_spin(&sched_lock);
114 continue;
115 break;
116 default:
117 FOREACH_THREAD_IN_PROC(p, td) {
118 /* Need new statistics XXX */
119 switch (td->td_state) {
120 case TDS_INHIBITED:
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/lock.h>
41#include <sys/mutex.h>
42#include <sys/proc.h>

--- 70 unchanged lines hidden (view full) ---

113 mtx_unlock_spin(&sched_lock);
114 continue;
115 break;
116 default:
117 FOREACH_THREAD_IN_PROC(p, td) {
118 /* Need new statistics XXX */
119 switch (td->td_state) {
120 case TDS_INHIBITED:
121 if (TD_ON_MUTEX(td) ||
121 if (TD_ON_LOCK(td) ||
122 (td->td_inhibitors ==
123 TDI_SWAPPED)) {
124 totalp->t_sw++;
125 } else if (TD_IS_SLEEPING(td) ||
126 TD_AWAITING_INTR(td) ||
127 TD_IS_SUSPENDED(td)) {
128 if (td->td_priority <= PZERO)
129 totalp->t_dw++;

--- 216 unchanged lines hidden ---
122 (td->td_inhibitors ==
123 TDI_SWAPPED)) {
124 totalp->t_sw++;
125 } else if (TD_IS_SLEEPING(td) ||
126 TD_AWAITING_INTR(td) ||
127 TD_IS_SUSPENDED(td)) {
128 if (td->td_priority <= PZERO)
129 totalp->t_dw++;

--- 216 unchanged lines hidden ---