head	1.32;
access;
symbols
	RELENG_8_4:1.29.0.2
	RELENG_9_1_0_RELEASE:1.28.2.1.4.2
	RELENG_9_1:1.28.2.1.0.4
	RELENG_9_1_BP:1.28.2.1
	RELENG_8_3_0_RELEASE:1.21.2.3.2.1
	RELENG_8_3:1.21.2.3.0.2
	RELENG_8_3_BP:1.21.2.3
	RELENG_9_0_0_RELEASE:1.28.2.1.2.1
	RELENG_9_0:1.28.2.1.0.2
	RELENG_9_0_BP:1.28.2.1
	RELENG_9:1.28.0.2
	RELENG_9_BP:1.28
	RELENG_7_4_0_RELEASE:1.17.2.2.8.1
	RELENG_8_2_0_RELEASE:1.21.2.1.6.1
	RELENG_7_4:1.17.2.2.0.8
	RELENG_7_4_BP:1.17.2.2
	RELENG_8_2:1.21.2.1.0.6
	RELENG_8_2_BP:1.21.2.1
	RELENG_8_1_0_RELEASE:1.21.2.1.4.1
	RELENG_8_1:1.21.2.1.0.4
	RELENG_8_1_BP:1.21.2.1
	RELENG_7_3_0_RELEASE:1.17.2.2.6.1
	RELENG_7_3:1.17.2.2.0.6
	RELENG_7_3_BP:1.17.2.2
	RELENG_8_0_0_RELEASE:1.21.2.1.2.1
	RELENG_8_0:1.21.2.1.0.2
	RELENG_8_0_BP:1.21.2.1
	RELENG_8:1.21.0.2
	RELENG_8_BP:1.21
	RELENG_7_2_0_RELEASE:1.17.2.2.4.1
	RELENG_7_2:1.17.2.2.0.4
	RELENG_7_2_BP:1.17.2.2
	RELENG_7_1_0_RELEASE:1.17.2.2.2.1
	RELENG_6_4_0_RELEASE:1.14.10.1.6.1
	RELENG_7_1:1.17.2.2.0.2
	RELENG_7_1_BP:1.17.2.2
	RELENG_6_4:1.14.10.1.0.6
	RELENG_6_4_BP:1.14.10.1
	RELENG_7_0_0_RELEASE:1.17
	RELENG_6_3_0_RELEASE:1.14.10.1
	RELENG_7_0:1.17.0.4
	RELENG_7_0_BP:1.17
	RELENG_6_3:1.14.10.1.0.4
	RELENG_6_3_BP:1.14.10.1
	RELENG_7:1.17.0.2
	RELENG_7_BP:1.17
	RELENG_6_2_0_RELEASE:1.14.10.1
	RELENG_6_2:1.14.10.1.0.2
	RELENG_6_2_BP:1.14.10.1
	RELENG_5_5_0_RELEASE:1.14
	RELENG_5_5:1.14.0.16
	RELENG_5_5_BP:1.14
	RELENG_6_1_0_RELEASE:1.14
	RELENG_6_1:1.14.0.14
	RELENG_6_1_BP:1.14
	RELENG_6_0_0_RELEASE:1.14
	RELENG_6_0:1.14.0.12
	RELENG_6_0_BP:1.14
	RELENG_6:1.14.0.10
	RELENG_6_BP:1.14
	RELENG_5_4_0_RELEASE:1.14
	RELENG_5_4:1.14.0.8
	RELENG_5_4_BP:1.14
	RELENG_4_11_0_RELEASE:1.9.2.1
	RELENG_4_11:1.9.2.1.0.16
	RELENG_4_11_BP:1.9.2.1
	RELENG_5_3_0_RELEASE:1.14
	RELENG_5_3:1.14.0.6
	RELENG_5_3_BP:1.14
	RELENG_5:1.14.0.4
	RELENG_5_BP:1.14
	RELENG_4_10_0_RELEASE:1.9.2.1
	RELENG_4_10:1.9.2.1.0.14
	RELENG_4_10_BP:1.9.2.1
	RELENG_5_2_1_RELEASE:1.14
	RELENG_5_2_0_RELEASE:1.14
	RELENG_5_2:1.14.0.2
	RELENG_5_2_BP:1.14
	RELENG_4_9_0_RELEASE:1.9.2.1
	RELENG_4_9:1.9.2.1.0.12
	RELENG_4_9_BP:1.9.2.1
	RELENG_5_1_0_RELEASE:1.12
	RELENG_5_1:1.12.0.4
	RELENG_5_1_BP:1.12
	RELENG_4_8_0_RELEASE:1.9.2.1
	RELENG_4_8:1.9.2.1.0.10
	RELENG_4_8_BP:1.9.2.1
	RELENG_5_0_0_RELEASE:1.12
	RELENG_5_0:1.12.0.2
	RELENG_5_0_BP:1.12
	RELENG_4_7_0_RELEASE:1.9.2.1
	RELENG_4_7:1.9.2.1.0.8
	RELENG_4_7_BP:1.9.2.1
	RELENG_4_6_2_RELEASE:1.9.2.1
	RELENG_4_6_1_RELEASE:1.9.2.1
	RELENG_4_6_0_RELEASE:1.9.2.1
	RELENG_4_6:1.9.2.1.0.6
	RELENG_4_6_BP:1.9.2.1
	RELENG_4_5_0_RELEASE:1.9.2.1
	RELENG_4_5:1.9.2.1.0.4
	RELENG_4_5_BP:1.9.2.1
	RELENG_4_4_0_RELEASE:1.9.2.1
	RELENG_4_4:1.9.2.1.0.2
	RELENG_4_4_BP:1.9.2.1
	KSE_MILESTONE_2:1.12
	KSE_PRE_MILESTONE_2:1.12
	RELENG_4_3_0_RELEASE:1.9
	RELENG_4_3:1.9.0.4
	RELENG_4_3_BP:1.9
	RELENG_4_2_0_RELEASE:1.9
	RELENG_4_1_1_RELEASE:1.9
	PRE_SMPNG:1.9
	RELENG_4_1_0_RELEASE:1.9
	RELENG_3_5_0_RELEASE:1.5
	RELENG_4_0_0_RELEASE:1.9
	RELENG_4:1.9.0.2
	RELENG_4_BP:1.9
	RELENG_3_4_0_RELEASE:1.5
	RELENG_3_3_0_RELEASE:1.5
	RELENG_3_2_PAO:1.5.0.4
	RELENG_3_2_PAO_BP:1.5
	RELENG_3_2_0_RELEASE:1.5
	RELENG_3_1_0_RELEASE:1.5
	RELENG_3:1.5.0.2
	RELENG_3_BP:1.5
	RELENG_2_2_8_RELEASE:1.2.8.2
	RELENG_3_0_0_RELEASE:1.5
	RELENG_2_2_7_RELEASE:1.2.8.2
	RELENG_2_2_6_RELEASE:1.2.8.2
	RELENG_2_2_5_RELEASE:1.2.8.1
	bsd_44_lite_2:1.1.1.2
	RELENG_2_2_2_RELEASE:1.2
	RELENG_2_2_1_RELEASE:1.2
	RELENG_2_2_0_RELEASE:1.2
	RELENG_2_1_7_RELEASE:1.2
	RELENG_2_1_6_1_RELEASE:1.2
	RELENG_2_1_6_RELEASE:1.2
	RELENG_2_2:1.2.0.8
	RELENG_2_2_BP:1.2
	RELENG_2_1_5_RELEASE:1.2
	RELENG_2_1_0_RELEASE:1.2
	RELENG_2_1_0:1.2.0.6
	RELENG_2_1_0_BP:1.2
	RELENG_2_0_5_RELEASE:1.2
	RELENG_2_0_5:1.2.0.4
	RELENG_2_0_5_BP:1.2
	RELENG_2_0_5_ALPHA:1.2
	RELEASE_2_0:1.2
	BETA_2_0:1.2
	ALPHA_2_0:1.2.0.2
	bsd_44_lite:1.1.1.1
	CSRG:1.1.1;
locks; strict;
comment	@# @;


1.32
date	2013.07.11.00.37.37;	author svnexp;	state Exp;
branches;
next	1.31;

1.31
date	2013.04.12.00.29.38;	author svnexp;	state Exp;
branches;
next	1.30;

1.30
date	2013.04.11.00.35.45;	author svnexp;	state Exp;
branches;
next	1.29;

1.29
date	2012.11.17.01.49.56;	author svnexp;	state Exp;
branches
	1.29.2.1;
next	1.28;

1.28
date	2011.05.14.01.53.38;	author attilio;	state Exp;
branches
	1.28.2.1;
next	1.27;

1.27
date	2011.01.23.11.08.36;	author uqs;	state Exp;
branches;
next	1.26;

1.26
date	2010.11.07.03.26.22;	author gonzo;	state Exp;
branches;
next	1.25;

1.25
date	2010.08.28.15.03.11;	author nwhitehorn;	state Exp;
branches;
next	1.24;

1.24
date	2010.08.23.22.24.11;	author imp;	state Exp;
branches;
next	1.23;

1.23
date	2010.03.01.00.27.55;	author rwatson;	state Exp;
branches;
next	1.22;

1.22
date	2010.01.02.09.58.07;	author ed;	state Exp;
branches;
next	1.21;

1.21
date	2009.07.23.21.12.21;	author bz;	state Exp;
branches
	1.21.2.1;
next	1.20;

1.20
date	2008.11.06.16.20.27;	author raj;	state Exp;
branches;
next	1.19;

1.19
date	2008.08.19.21.30.36;	author jhb;	state Exp;
branches;
next	1.18;

1.18
date	2008.08.19.19.55.33;	author jhb;	state Exp;
branches;
next	1.17;

1.17
date	2006.10.09.05.12.54;	author kmacy;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	2006.10.09.04.58.45;	author kmacy;	state Exp;
branches;
next	1.15;

1.15
date	2006.04.21.04.32.51;	author peter;	state Exp;
branches;
next	1.14;

1.14
date	2003.08.18.15.25.38;	author obrien;	state Exp;
branches
	1.14.10.1;
next	1.13;

1.13
date	2003.08.17.08.28.45;	author gordon;	state Exp;
branches;
next	1.12;

1.12
date	2001.05.18.13.41.23;	author ru;	state Exp;
branches;
next	1.11;

1.11
date	2001.03.27.17.27.04;	author ru;	state Exp;
branches;
next	1.10;

1.10
date	2001.03.21.22.52.48;	author peter;	state Exp;
branches;
next	1.9;

1.9
date	2000.01.14.07.57.32;	author rgrimes;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	99.10.04.14.56.04;	author peter;	state Exp;
branches;
next	1.7;

1.7
date	99.01.23.07.55.15;	author bde;	state Exp;
branches;
next	1.6;

1.6
date	99.01.22.10.36.03;	author dillon;	state Exp;
branches;
next	1.5;

1.5
date	98.09.09.11.27.33;	author kato;	state Exp;
branches;
next	1.4;

1.4
date	97.08.26.14.12.52;	author bde;	state Exp;
branches;
next	1.3;

1.3
date	97.07.18.06.32.39;	author asami;	state Exp;
branches;
next	1.2;

1.2
date	94.08.05.01.42.04;	author wollman;	state Exp;
branches
	1.2.8.1;
next	1.1;

1.1
date	94.05.27.04.58.51;	author rgrimes;	state Exp;
branches
	1.1.1.1;
next	;

1.29.2.1
date	2012.11.17.01.49.56;	author svnexp;	state dead;
branches;
next	1.29.2.2;

1.29.2.2
date	2013.03.28.13.03.17;	author svnexp;	state Exp;
branches;
next	;

1.28.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.28.2.1.2.1
	1.28.2.1.4.1;
next	1.28.2.2;

1.28.2.2
date	2012.11.17.11.36.24;	author svnexp;	state Exp;
branches;
next	;

1.28.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.28.2.1.2.2;

1.28.2.1.2.2
date	2012.11.17.08.36.25;	author svnexp;	state Exp;
branches;
next	;

1.28.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.28.2.1.4.2;

1.28.2.1.4.2
date	2012.11.17.08.47.14;	author svnexp;	state Exp;
branches;
next	;

1.21.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.21.2.1.2.1
	1.21.2.1.4.1
	1.21.2.1.6.1;
next	1.21.2.2;

1.21.2.2
date	2011.01.15.19.23.14;	author rwatson;	state Exp;
branches;
next	1.21.2.3;

1.21.2.3
date	2011.02.18.00.02.35;	author obrien;	state Exp;
branches
	1.21.2.3.2.1;
next	1.21.2.4;

1.21.2.4
date	2012.11.17.10.36.09;	author svnexp;	state Exp;
branches;
next	;

1.21.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.21.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.21.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.21.2.3.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.21.2.3.2.2;

1.21.2.3.2.2
date	2012.11.17.08.24.50;	author svnexp;	state Exp;
branches;
next	;

1.17.2.1
date	2008.08.26.17.57.38;	author jhb;	state Exp;
branches;
next	1.17.2.2;

1.17.2.2
date	2008.08.26.18.00.06;	author jhb;	state Exp;
branches
	1.17.2.2.2.1
	1.17.2.2.4.1
	1.17.2.2.6.1
	1.17.2.2.8.1;
next	1.17.2.3;

1.17.2.3
date	2012.11.17.08.02.53;	author svnexp;	state Exp;
branches;
next	;

1.17.2.2.2.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.17.2.2.4.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.17.2.2.6.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.17.2.2.8.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.17.2.2.8.2;

1.17.2.2.8.2
date	2012.11.17.08.16.49;	author svnexp;	state Exp;
branches;
next	;

1.14.10.1
date	2006.07.24.23.29.05;	author peter;	state Exp;
branches
	1.14.10.1.6.1;
next	1.14.10.2;

1.14.10.2
date	2012.11.17.07.40.25;	author svnexp;	state Exp;
branches;
next	;

1.14.10.1.6.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.9.2.1
date	2001.04.25.10.04.32;	author ru;	state Exp;
branches;
next	1.9.2.2;

1.9.2.2
date	2012.11.17.07.23.55;	author svnexp;	state Exp;
branches;
next	;

1.2.8.1
date	97.07.18.06.33.13;	author asami;	state Exp;
branches;
next	1.2.8.2;

1.2.8.2
date	98.02.18.09.08.57;	author jkh;	state Exp;
branches;
next	;

1.1.1.1
date	94.05.27.04.58.52;	author rgrimes;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	97.07.03.03.19.45;	author bde;	state Exp;
branches;
next	;


desc
@@


1.32
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/253167
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@#	@@(#)Makefile	8.1 (Berkeley) 6/4/93
# $FreeBSD: head/lib/libkvm/Makefile 253167 2013-07-10 19:44:43Z trociny $

LIB=	kvm
SHLIBDIR?= /lib
SHLIB_MAJOR=	6
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}

.if exists(${.CURDIR}/kvm_${MACHINE_ARCH}.c)
KVM_ARCH=${MACHINE_ARCH}
.else
KVM_ARCH=${MACHINE_CPUARCH}
.endif

WARNS?=	3

SRCS=	kvm.c kvm_${KVM_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
	kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
    ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
SRCS+=	kvm_minidump_${KVM_ARCH}.c
.endif
INCS=	kvm.h

MAN=	kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 \
	kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 \
	kvm_read.3

MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3 \
	kvm_getpcpu.3 kvm_dpcpu_setcpu.3 \
	kvm_getpcpu.3 kvm_read_zpcpu.3 \
	kvm_getpcpu.3 kvm_counter_u64_fetch.3
MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3
MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3
MLINKS+=kvm_read.3 kvm_write.3

.include <bsd.lib.mk>
@


1.31
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249358
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d2 1
a2 1
# $FreeBSD: head/lib/libkvm/Makefile 249358 2013-04-11 10:14:28Z glebius $
d6 1
@


1.30
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249344
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d2 1
a2 1
# $FreeBSD: head/lib/libkvm/Makefile 249344 2013-04-10 20:26:53Z glebius $
d31 1
a31 1
	kvm_getpcpu.3 kvm_counter_u64_fetch
@


1.29
log
@Switching exporter and resync
@
text
@d2 1
a2 1
# $FreeBSD: head/lib/libkvm/Makefile 221869 2011-05-14 01:53:38Z attilio $
d28 4
a31 2
MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3
MLINKS+=kvm_getpcpu.3 kvm_dpcpu_setcpu.3
@


1.29.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:03:17 +0000
@
text
@d1 34
@


1.29.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 30
#	@@(#)Makefile	8.1 (Berkeley) 6/4/93
# $FreeBSD: releng/8.4/lib/libkvm/Makefile 218785 2011-02-18 00:02:35Z obrien $

LIB=	kvm
SHLIBDIR?= /lib
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}

.if ${MACHINE} == "sun4v"
CFLAGS+=-DSUN4V
.endif

SRCS=	kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
	kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips"
SRCS+=	kvm_minidump_${MACHINE_ARCH}.c
.endif
INCS=	kvm.h

MAN=	kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 \
	kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 \
	kvm_read.3

MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3
MLINKS+=kvm_getpcpu.3 kvm_dpcpu_setcpu.3
MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3
MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3
MLINKS+=kvm_read.3 kvm_write.3

.include <bsd.lib.mk>
@


1.28
log
@SVN rev 221869 on 2011-05-14 01:53:38Z by attilio

Disconnect sun4v architecture from the three.

Some files keep the SUN4V tags as a code reference, for the future,
if any rewamped sun4v support wants to be added again.

Reviewed by:	marius
Tested by:	sbruno
Approved by:	re
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.28.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.28.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/9/lib/libkvm/Makefile 221869 2011-05-14 01:53:38Z attilio $
@


1.28.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.28.2.1.4.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.1/lib/libkvm/Makefile 221869 2011-05-14 01:53:38Z attilio $
@


1.28.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.28.2.1.2.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.0/lib/libkvm/Makefile 221869 2011-05-14 01:53:38Z attilio $
@


1.27
log
@SVN rev 217745 on 2011-01-23 11:08:36Z by uqs

libkvm: fix process runtime calculation on crashdumps

Fix a long standing bug, where the procs ticks where assumed to be in
us. Instead, read cpu_tick_frequency from the kernel and use the same
logic to convert runtime. This is still too optimistic in that it
assumes cpu_tick_frequency is available and fixed. Since this function
is only called on crashdumps, I think we can live with that. Testing has
shown the values to be correct for different kern.hz inside Virtualbox.

Bump WARNS. Alignment issues on some archs mean this is still at 3.

Reviewed by:	bde
@
text
@a7 4
.if ${MACHINE} == "sun4v"
CFLAGS+=-DSUN4V
.endif

@


1.26
log
@SVN rev 214904 on 2010-11-07 03:26:22Z by gonzo

Add minidump support for MIPS
@
text
@d18 1
a18 1
WARNS?=	0
@


1.25
log
@SVN rev 211934 on 2010-08-28 15:03:11Z by nwhitehorn

Repair some build breakage introduced in r211725 and garbage collect some
code made obsolete in the same commit.
@
text
@d23 1
a23 1
    ${MACHINE_CPUARCH} == "arm"
@


1.24
log
@SVN rev 211725 on 2010-08-23 22:24:11Z by imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
@
text
@d12 6
d20 1
a20 1
SRCS=	kvm.c kvm_${MACHINE_CPUARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
d24 1
a24 1
SRCS+=	kvm_minidump_${MACHINE_CPUARCH}.c
@


1.23
log
@SVN rev 204494 on 2010-03-01 00:27:55Z by rwatson

A first cut at teaching libkvm how to deal with dynamic per-CPU storage
(DPCPU):

A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes
of DPCPU.  Calls to kvm_nlist(3) will automatically translate DPCPU
symbols and return a pointer to the current CPU's version of the data.
Consumers needing to read the same symbol on several CPUs will invoke a
series of setcpu/nlist calls, one per CPU of interest.

This addition makes it possible for tools like netstat(1) to query the
values of DPCPU variables during crashdump analysis, and is based on
similar code handling virtualized global variables.

MFC after:	1 week
Sponsored by:	Juniper Networks, Inc.
@
text
@d14 1
a14 1
SRCS=	kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
d16 3
a18 2
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm"
SRCS+=	kvm_minidump_${MACHINE_ARCH}.c
@


1.22
log
@SVN rev 201381 on 2010-01-02 09:58:07Z by ed

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
@
text
@d26 1
@


1.21
log
@SVN rev 195838 on 2009-07-23 21:12:21Z by bz

Make libkvm work on live systems and crashdumps with and
without VIMAGE virtualization in the kernel.

If we cannot resolve a symbol try to see if we can find it with
prefix of the virtualized subsystem, currently only "vnet_entry"
by identifying either the vnet of the current process for a
live system or the vnet of proc0 (or of dumptid if compiled
in a non-default way).

The way this is done currently allows us to only touch libkvm
but no single application. Once we are going to virtualize more
subsystems we will have to review this decision for better scaling.

Submitted by:	rwatson (initial version of kvm_vnet.c, lots of ideas)
Reviewed by:	rwatson
Approved by:	re (kib)
@
text
@d12 2
@


1.21.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.21.2.2
log
@SVN rev 217454 on 2011-01-15 19:23:14Z by rwatson

Merge r204494, r204511 from head to stable/8:

  A first cut at teaching libkvm how to deal with dynamic per-CPU storage
  (DPCPU):

  A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes
  of DPCPU.  Calls to kvm_nlist(3) will automatically translate DPCPU
  symbols and return a pointer to the current CPU's version of the data.
  Consumers needing to read the same symbol on several CPUs will invoke a
  series of setcpu/nlist calls, one per CPU of interest.

  This addition makes it possible for tools like netstat(1) to query the
  values of DPCPU variables during crashdump analysis, and is based on
  similar code handling virtualized global variables.

  Sponsored by:   Juniper Networks, Inc.

  Not all programs including kvm.h include the necessary headers to use
  u_int, so prefer unsigned int.

  Pointed out by: bz, kib, Mr Tinderbox
@
text
@a23 1
MLINKS+=kvm_getpcpu.3 kvm_dpcpu_setcpu.3
@


1.21.2.3
log
@SVN rev 218785 on 2011-02-18 00:02:35Z by obrien

MFC: r214904: bring MIPS minidump support to libkvm
@
text
@d14 1
a14 2
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips"
@


1.21.2.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/8/lib/libkvm/Makefile 218785 2011-02-18 00:02:35Z obrien $
@


1.21.2.3.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.21.2.3.2.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/8.3/lib/libkvm/Makefile 218785 2011-02-18 00:02:35Z obrien $
@


1.21.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.21.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.21.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.20
log
@SVN rev 184728 on 2008-11-06 16:20:27Z by raj

Support kernel crash mini dumps on ARM architecture.

Obtained from:	Juniper Networks, Semihalf
@
text
@d13 1
a13 1
	kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c
@


1.19
log
@SVN rev 181880 on 2008-08-19 21:30:36Z by jhb

Add a new routine kvm_getcptime(3) for fetching the equivalent of
'kern.cp_time'.  For a live kernel it uses the sysctl.  For a crashdump,
it first checks to see if the kernel has a 'cp_time' global symbol.  If
it does, it uses that.  If that doesn't work, when it uses the recently
added kvm_getmaxcpu(3) and kvm_getpcpu(3) routines to walk all the CPUs
and sum up their counters.

MFC after:	1 week
@
text
@d14 1
a14 1
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
@


1.18
log
@SVN rev 181876 on 2008-08-19 19:55:33Z by jhb

Add two new routines to libkvm for working with per-CPU data:
kvm_getmaxcpu() and kvm_getpcpu().

MFC after:	1 week
@
text
@d12 1
a12 1
SRCS=	kvm.c kvm_${MACHINE_ARCH}.c kvm_file.c kvm_getloadavg.c \
d19 3
a21 2
MAN=	kvm.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 kvm_getpcpu.3 \
	kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3
@


1.17
log
@unbreak build for sparc64 etc.
TARGET won't be defined on non subarches

Approved by: rwatson (mentor)
Reviewed by: jmg
@
text
@d13 1
a13 1
	kvm_getswapinfo.c kvm_proc.c
d19 2
a20 2
MAN=	kvm.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 kvm_getprocs.3 \
	kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 kvm_read.3
d22 1
@


1.17.2.1
log
@SVN rev 182203 on 2008-08-26 17:57:38Z by jhb

MFC: Add kvm_getmaxcpu() and kvm_getpcpu().
@
text
@d13 1
a13 1
	kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c
d19 2
a20 2
MAN=	kvm.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 kvm_getpcpu.3 \
	kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3
a21 1
MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3
@


1.17.2.2
log
@SVN rev 182204 on 2008-08-26 18:00:06Z by jhb

MFC: Add kvm_getcptime(3).
@
text
@d12 1
a12 1
SRCS=	kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
d19 2
a20 3
MAN=	kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 \
	kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 \
	kvm_read.3
@


1.17.2.3
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/7/lib/libkvm/Makefile 182204 2008-08-26 18:00:06Z jhb $
@


1.17.2.2.8.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.17.2.2.8.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/7.4/lib/libkvm/Makefile 182204 2008-08-26 18:00:06Z jhb $
@


1.17.2.2.6.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.17.2.2.4.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.17.2.2.2.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.16
log
@buildworld fixes for sun4v
not sure why pmap.c is included as it is unchanged

Approved by: rwatson (mentor)
Reviewed by: jmg
@
text
@d7 2
a8 1
.if ${TARGET} == "sun4v"
@


1.15
log
@Teach libkvm how to read minidumps.  It turns out that minidumps are
far more convenient for libkvm to work with because of the page table
block at the beginning.  As a result, the MD code is smaller.

libkvm will automatically detect old vs mini dumps on i386 and amd64.

libkvm will handle i386 PAE and non-PAE modes.  There is a PAE flag in
the i386 minidump header to signal the width of the entries in the
page table block.

Other convenient values are also present, such as kernbase and the direct
map addresses on amd64.
@
text
@d7 4
@


1.14
log
@style.Makefile(5)
@
text
@d9 3
@


1.14.10.1
log
@MFC: Bring libkvm side of minidumps to 6.x on i386 and amd64.

Reminded by:  emaste
@
text
@a8 3
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
SRCS+=	kvm_minidump_${MACHINE_ARCH}.c
.endif
@


1.14.10.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/6/lib/libkvm/Makefile 160634 2006-07-24 23:29:06Z peter $
@


1.14.10.1.6.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.13
log
@Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.
@
text
@d5 1
a5 1
SHLIBDIR?=/lib
@


1.12
log
@Removed -I${.CURDIR}/.../sys from CFLAGS.
@
text
@d2 1
a2 1
# $FreeBSD: src/lib/libkvm/Makefile,v 1.11 2001/03/27 17:27:04 ru Exp $
d5 1
@


1.11
log
@MAN[1-9] -> MAN.
@
text
@d2 1
a2 1
# $FreeBSD: src/lib/libkvm/Makefile,v 1.10 2001/03/21 22:52:48 peter Exp $
d5 1
a5 1
CFLAGS+=-DLIBC_SCCS -I${.CURDIR} -I${.CURDIR}/../../sys
@


1.10
log
@Find <libkvm.h> in the source tree. This helps standalone builds.
@
text
@d2 1
a2 1
# $FreeBSD: src/lib/libkvm/Makefile,v 1.9 2000/01/14 07:57:32 rgrimes Exp $
d10 1
a10 1
MAN3=	kvm.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 kvm_getprocs.3 \
@


1.9
log
@Replace beforeinstall target with new variables used by .mk system.

Reviewed by:	marcel, and make world
@
text
@d2 1
a2 1
# $FreeBSD: src/lib/libkvm/Makefile,v 1.8 1999/10/04 14:56:04 peter Exp $
d5 1
a5 1
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}/../../sys
@


1.9.2.1
log
@MFC: MAN[1-9] -> MAN.
@
text
@d2 1
a2 1
# $FreeBSD: src/lib/libkvm/Makefile,v 1.9 2000/01/14 07:57:32 rgrimes Exp $
d10 1
a10 1
MAN=	kvm.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 kvm_getprocs.3 \
@


1.9.2.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/4/lib/libkvm/Makefile 75949 2001-04-25 10:04:44Z ru $
@


1.8
log
@Install <kvm.h> from here (after repo copy) so it's all in one package.
@
text
@d2 1
a2 1
# $FreeBSD$
d8 1
a15 4

beforeinstall:
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/kvm.h \
		${DESTDIR}/usr/include
@


1.7
log
@Fixed unsorting of SRCS and MAN3 in previous commit.

Sorted MLINKS.
@
text
@d2 1
d15 4
@


1.6
log
@    Implement kvm_getswapinfo() libkvm function.  Will be used by
    pstat, top, and systat.
@
text
@d5 2
a6 2
SRCS=	kvm.c kvm_${MACHINE_ARCH}.c kvm_file.c kvm_getloadavg.c kvm_proc.c \
	kvm_getswapinfo.c
d9 1
a9 1
	kvm_nlist.3 kvm_open.3 kvm_read.3 kvm_getswapinfo.3
d12 1
a12 1
MLINKS+=kvm_open.3 kvm_openfiles.3 kvm_open.3 kvm_close.3
@


1.5
log
@Change ${MACHINE} into ${MACHINE_ARCH} to support MACHINE=pc98.
@
text
@d5 2
a6 1
SRCS=	kvm.c kvm_${MACHINE_ARCH}.c kvm_file.c kvm_getloadavg.c kvm_proc.c
d9 1
a9 1
	kvm_nlist.3 kvm_open.3 kvm_read.3
@


1.4
log
@-I${DESTDIR}/sys -> -I${.CURDIR}/../../sys.
@
text
@d5 1
a5 1
SRCS=	kvm.c kvm_${MACHINE}.c kvm_file.c kvm_getloadavg.c kvm_proc.c
@


1.3
log
@Add ${DESTDIR} in front of absolute path.
@
text
@d4 1
a4 1
CFLAGS+=-DLIBC_SCCS -I${DESTDIR}/sys
@


1.2
log
@Make it work with our make macros.
@
text
@d4 1
a4 1
CFLAGS+=-DLIBC_SCCS -I/sys
@


1.2.8.1
log
@Merge 1.3.
@
text
@d4 1
a4 1
CFLAGS+=-DLIBC_SCCS -I${DESTDIR}/sys
@


1.2.8.2
log
@MFC: A few bits I missed on my 1st pass.
@
text
@d4 1
a4 1
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}/../../sys
@


1.1
log
@Initial revision
@
text
@d7 2
a8 2
MAN3=	kvm.0 kvm_geterr.0 kvm_getfiles.0 kvm_getloadavg.0 kvm_getprocs.0 \
	kvm_nlist.0 kvm_open.0 kvm_read.0
@


1.1.1.1
log
@BSD 4.4 Lite Lib Sources
@
text
@@


1.1.1.2
log
@Import Lite2's src/lib, except for non-i386 machine-dependent directories,
libc/db, libc/gen/crypt.* and libtelnet.  All affected files except 3
unimportant ones have already left the vendor branch.
@
text
@d1 1
a1 1
#	@@(#)Makefile	8.3 (Berkeley) 5/4/95
@
