Deleted Added
full compact
kern_timeout.c (256281) kern_timeout.c (260817)
1/*-
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * From: @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * From: @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: stable/10/sys/kern/kern_timeout.c 255877 2013-09-26 10:06:50Z davide $");
38__FBSDID("$FreeBSD: stable/10/sys/kern/kern_timeout.c 260817 2014-01-17 10:58:59Z avg $");
39
40#include "opt_callout_profiling.h"
41#include "opt_kdtrace.h"
42#if defined(__arm__)
43#include "opt_timer.h"
44#endif
45
46#include <sys/param.h>

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

64#include <machine/cpu.h>
65#endif
66
67#ifndef NO_EVENTTIMERS
68DPCPU_DECLARE(sbintime_t, hardclocktime);
69#endif
70
71SDT_PROVIDER_DEFINE(callout_execute);
39
40#include "opt_callout_profiling.h"
41#include "opt_kdtrace.h"
42#if defined(__arm__)
43#include "opt_timer.h"
44#endif
45
46#include <sys/param.h>

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

64#include <machine/cpu.h>
65#endif
66
67#ifndef NO_EVENTTIMERS
68DPCPU_DECLARE(sbintime_t, hardclocktime);
69#endif
70
71SDT_PROVIDER_DEFINE(callout_execute);
72SDT_PROBE_DEFINE1(callout_execute, kernel, , callout_start, callout-start,
72SDT_PROBE_DEFINE1(callout_execute, kernel, , callout__start,
73 "struct callout *");
73 "struct callout *");
74SDT_PROBE_DEFINE1(callout_execute, kernel, , callout_end, callout-end,
74SDT_PROBE_DEFINE1(callout_execute, kernel, , callout__end,
75 "struct callout *");
76
77#ifdef CALLOUT_PROFILING
78static int avg_depth;
79SYSCTL_INT(_debug, OID_AUTO, to_avg_depth, CTLFLAG_RD, &avg_depth, 0,
80 "Average number of items examined per softclock call. Units = 1/1000");
81static int avg_gcalls;
82SYSCTL_INT(_debug, OID_AUTO, to_avg_gcalls, CTLFLAG_RD, &avg_gcalls, 0,

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

673#endif
674 CTR3(KTR_CALLOUT, "callout %p func %p arg %p",
675 c, c_func, c_arg);
676 }
677#if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING)
678 sbt1 = sbinuptime();
679#endif
680 THREAD_NO_SLEEPING();
75 "struct callout *");
76
77#ifdef CALLOUT_PROFILING
78static int avg_depth;
79SYSCTL_INT(_debug, OID_AUTO, to_avg_depth, CTLFLAG_RD, &avg_depth, 0,
80 "Average number of items examined per softclock call. Units = 1/1000");
81static int avg_gcalls;
82SYSCTL_INT(_debug, OID_AUTO, to_avg_gcalls, CTLFLAG_RD, &avg_gcalls, 0,

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

673#endif
674 CTR3(KTR_CALLOUT, "callout %p func %p arg %p",
675 c, c_func, c_arg);
676 }
677#if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING)
678 sbt1 = sbinuptime();
679#endif
680 THREAD_NO_SLEEPING();
681 SDT_PROBE(callout_execute, kernel, , callout_start, c, 0, 0, 0, 0);
681 SDT_PROBE(callout_execute, kernel, , callout__start, c, 0, 0, 0, 0);
682 c_func(c_arg);
682 c_func(c_arg);
683 SDT_PROBE(callout_execute, kernel, , callout_end, c, 0, 0, 0, 0);
683 SDT_PROBE(callout_execute, kernel, , callout__end, c, 0, 0, 0, 0);
684 THREAD_SLEEPING_OK();
685#if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING)
686 sbt2 = sbinuptime();
687 sbt2 -= sbt1;
688 if (sbt2 > maxdt) {
689 if (lastfunc != c_func || sbt2 > maxdt * 2) {
690 ts2 = sbttots(sbt2);
691 printf(

--- 755 unchanged lines hidden ---
684 THREAD_SLEEPING_OK();
685#if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING)
686 sbt2 = sbinuptime();
687 sbt2 -= sbt1;
688 if (sbt2 > maxdt) {
689 if (lastfunc != c_func || sbt2 > maxdt * 2) {
690 ts2 = sbttots(sbt2);
691 printf(

--- 755 unchanged lines hidden ---