Deleted Added
full compact
subr_lock.c (212750) subr_lock.c (215034)
1/*-
2 * Copyright (c) 2006 John Baldwin <jhb@FreeBSD.org>
3 * 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

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

28 */
29
30/*
31 * This module holds the global variables and functions used to maintain
32 * lock_object structures.
33 */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 John Baldwin <jhb@FreeBSD.org>
3 * 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

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

28 */
29
30/*
31 * This module holds the global variables and functions used to maintain
32 * lock_object structures.
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/kern/subr_lock.c 212750 2010-09-16 16:13:12Z mdf $");
36__FBSDID("$FreeBSD: head/sys/kern/subr_lock.c 215034 2010-11-09 10:59:09Z brucec $");
37
38#include "opt_ddb.h"
39#include "opt_mprof.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/kernel.h>
44#include <sys/ktr.h>

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

165SLIST_HEAD(lphead, lock_prof);
166
167#define LPROF_HASH_SIZE 4096
168#define LPROF_HASH_MASK (LPROF_HASH_SIZE - 1)
169#define LPROF_CACHE_SIZE 4096
170
171/*
172 * Array of objects and profs for each type of object for each cpu. Spinlocks
37
38#include "opt_ddb.h"
39#include "opt_mprof.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/kernel.h>
44#include <sys/ktr.h>

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

165SLIST_HEAD(lphead, lock_prof);
166
167#define LPROF_HASH_SIZE 4096
168#define LPROF_HASH_MASK (LPROF_HASH_SIZE - 1)
169#define LPROF_CACHE_SIZE 4096
170
171/*
172 * Array of objects and profs for each type of object for each cpu. Spinlocks
173 * are handled seperately because a thread may be preempted and acquire a
173 * are handled separately because a thread may be preempted and acquire a
174 * spinlock while in the lock profiling code of a non-spinlock. In this way
175 * we only need a critical section to protect the per-cpu lists.
176 */
177struct lock_prof_type {
178 struct lphead lpt_lpalloc;
179 struct lpohead lpt_lpoalloc;
180 struct lphead lpt_hash[LPROF_HASH_SIZE];
181 struct lock_prof lpt_prof[LPROF_CACHE_SIZE];

--- 480 unchanged lines hidden ---
174 * spinlock while in the lock profiling code of a non-spinlock. In this way
175 * we only need a critical section to protect the per-cpu lists.
176 */
177struct lock_prof_type {
178 struct lphead lpt_lpalloc;
179 struct lpohead lpt_lpoalloc;
180 struct lphead lpt_hash[LPROF_HASH_SIZE];
181 struct lock_prof lpt_prof[LPROF_CACHE_SIZE];

--- 480 unchanged lines hidden ---