2000-01-14 07:57:47 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
1998-09-15 06:23:21 +00:00
|
|
|
LIB= devstat
|
2003-08-18 15:25:39 +00:00
|
|
|
SHLIBDIR?= /lib
|
Run a revision of the devstat interface:
Kernel:
Change statistics to use the *uptime() timescale (ie: relative to
boottime) rather than the UTC aligned timescale. This makes the
device statistics code oblivious to clock steps.
Change timestamps to bintime format, they are cheaper.
Remove the "busy_count", and replace it with two counter fields:
"start_count" and "end_count", which are updated in the down and
up paths respectively. This removes the locking constraint on
devstat.
Add a timestamp argument to devstat_start_transaction(), this will
normally be a timestamp set by the *_bio() function in bp->bio_t0.
Use this field to calculate duration of I/O operations.
Add two timestamp arguments to devstat_end_transaction(), one is
the current time, a NULL pointer means "take timestamp yourself",
the other is the timestamp of when this transaction started (see
above).
Change calculation of busy_time to operate on "the salami principle":
Only when we are idle, which we can determine by the start+end
counts being identical, do we update the "busy_from" field in the
down path. In the up path we accumulate the timeslice in busy_time
and update busy_from.
Change the byte_* and num_* fields into two arrays: bytes[] and
operations[].
Userland:
Change the misleading "busy_time" name to be called "snap_time" and
make the time long double since that is what most users need anyway,
fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same
timescale as the kernel fields.
Change devstat_compute_etime() to operate on struct bintime.
Remove the version 2 legacy interface: the change to bintime makes
compatibility far too expensive.
Fix a bug in systat's "vm" page where boot relative busy times would
be bogus.
Bump __FreeBSD_version to 500107
Review & Collaboration by: ken
2003-03-15 21:59:06 +00:00
|
|
|
# Bump DEVSTAT_USER_API_VER in devstat.h every time this is incremented.
|
2007-05-21 02:49:08 +00:00
|
|
|
SHLIB_MAJOR= 6
|
1998-09-15 06:23:21 +00:00
|
|
|
SRCS= devstat.c
|
2000-01-14 07:57:47 +00:00
|
|
|
INCS= devstat.h
|
1998-09-15 06:23:21 +00:00
|
|
|
|
2004-02-05 22:44:25 +00:00
|
|
|
DPADD= ${LIBKVM}
|
|
|
|
LDADD= -lkvm
|
2001-08-04 18:25:48 +00:00
|
|
|
|
2001-03-27 17:27:19 +00:00
|
|
|
MAN= devstat.3
|
1998-09-15 06:23:21 +00:00
|
|
|
|
2001-08-04 18:25:48 +00:00
|
|
|
MLINKS+=devstat.3 devstat_getnumdevs.3
|
|
|
|
MLINKS+=devstat.3 devstat_getgeneration.3
|
|
|
|
MLINKS+=devstat.3 devstat_getversion.3
|
|
|
|
MLINKS+=devstat.3 devstat_checkversion.3
|
|
|
|
MLINKS+=devstat.3 devstat_getdevs.3
|
|
|
|
MLINKS+=devstat.3 devstat_selectdevs.3
|
|
|
|
MLINKS+=devstat.3 devstat_buildmatch.3
|
|
|
|
MLINKS+=devstat.3 devstat_compute_statistics.3
|
|
|
|
MLINKS+=devstat.3 devstat_compute_etime.3
|
1999-01-06 05:00:17 +00:00
|
|
|
MLINKS+=devstat.3 getnumdevs.3
|
|
|
|
MLINKS+=devstat.3 getgeneration.3
|
|
|
|
MLINKS+=devstat.3 getversion.3
|
|
|
|
MLINKS+=devstat.3 checkversion.3
|
|
|
|
MLINKS+=devstat.3 getdevs.3
|
|
|
|
MLINKS+=devstat.3 selectdevs.3
|
|
|
|
MLINKS+=devstat.3 buildmatch.3
|
|
|
|
MLINKS+=devstat.3 compute_stats.3
|
|
|
|
MLINKS+=devstat.3 compute_etime.3
|
|
|
|
|
2001-05-18 13:41:42 +00:00
|
|
|
CFLAGS+=-I${.CURDIR}
|
1998-09-15 06:23:21 +00:00
|
|
|
|
2001-09-23 23:03:23 +00:00
|
|
|
WARNS?= 2
|
|
|
|
|
1998-09-15 06:23:21 +00:00
|
|
|
.include <bsd.lib.mk>
|