svn commit: r209227 - in projects/ppc64: bin/sh contrib/tzcode/zic etc/periodic/daily gnu/lib/libdialog/TESTS include lib/clang lib/clang/libllvmanalysis lib/clang/libllvmbitreader lib/clang/libllv...

Nathan Whitehorn nwhitehorn at FreeBSD.org
Wed Jun 16 02:50:18 UTC 2010


Author: nwhitehorn
Date: Wed Jun 16 02:50:16 2010
New Revision: 209227
URL: http://svn.freebsd.org/changeset/base/209227

Log:
  IFC to pull in syscons changes

Added:
  projects/ppc64/etc/periodic/daily/800.scrub-zfs
     - copied unchanged from r209226, head/etc/periodic/daily/800.scrub-zfs
Modified:
  projects/ppc64/bin/sh/histedit.c
  projects/ppc64/contrib/tzcode/zic/zic.8
  projects/ppc64/gnu/lib/libdialog/TESTS/check3.c
  projects/ppc64/gnu/lib/libdialog/TESTS/menu3.c
  projects/ppc64/gnu/lib/libdialog/TESTS/radio1.c
  projects/ppc64/gnu/lib/libdialog/TESTS/radio3.c
  projects/ppc64/include/histedit.h
  projects/ppc64/lib/clang/clang.build.mk
  projects/ppc64/lib/clang/libllvmanalysis/Makefile
  projects/ppc64/lib/clang/libllvmbitreader/Makefile
  projects/ppc64/lib/clang/libllvmbitwriter/Makefile
  projects/ppc64/lib/clang/libllvmcodegen/Makefile
  projects/ppc64/lib/clang/libllvmcore/Makefile
  projects/ppc64/lib/clang/libllvmipo/Makefile
  projects/ppc64/lib/clang/libllvmmc/Makefile
  projects/ppc64/lib/clang/libllvmscalaropts/Makefile
  projects/ppc64/lib/clang/libllvmsupport/Makefile
  projects/ppc64/lib/clang/libllvmsystem/Makefile
  projects/ppc64/lib/clang/libllvmtarget/Makefile
  projects/ppc64/lib/libedit/filecomplete.c
  projects/ppc64/lib/libedit/filecomplete.h
  projects/ppc64/lib/libmemstat/memstat.c
  projects/ppc64/lib/libmemstat/memstat.h
  projects/ppc64/lib/libmemstat/memstat_internal.h
  projects/ppc64/lib/libmemstat/memstat_uma.c
  projects/ppc64/sbin/hastd/ebuf.c
  projects/ppc64/sbin/hastd/hast_proto.c
  projects/ppc64/sbin/hastd/hastd.c
  projects/ppc64/sbin/hastd/metadata.c
  projects/ppc64/sbin/hastd/nv.c
  projects/ppc64/sbin/hastd/primary.c
  projects/ppc64/sbin/hastd/secondary.c
  projects/ppc64/share/examples/kld/syscall/test/call.c
  projects/ppc64/share/man/man4/bpf.4
  projects/ppc64/share/man/man5/periodic.conf.5
  projects/ppc64/share/man/man9/vfs_busy.9
  projects/ppc64/share/man/man9/vfs_unbusy.9
  projects/ppc64/sys/amd64/acpica/acpi_wakeup.c
  projects/ppc64/sys/amd64/amd64/fpu.c
  projects/ppc64/sys/amd64/amd64/machdep.c
  projects/ppc64/sys/amd64/amd64/mp_machdep.c
  projects/ppc64/sys/amd64/amd64/vm_machdep.c
  projects/ppc64/sys/amd64/ia32/ia32_signal.c
  projects/ppc64/sys/amd64/include/mca.h
  projects/ppc64/sys/arm/arm/pmap.c
  projects/ppc64/sys/cam/scsi/scsi_all.h
  projects/ppc64/sys/dev/acpica/acpi_cpu.c
  projects/ppc64/sys/dev/e1000/if_igb.c
  projects/ppc64/sys/dev/e1000/if_igb.h
  projects/ppc64/sys/dev/iwn/if_iwn.c
  projects/ppc64/sys/dev/md/md.c
  projects/ppc64/sys/dev/sound/pcm/feeder_eq.c
  projects/ppc64/sys/dev/sound/pcm/feeder_rate.c
  projects/ppc64/sys/dev/sound/pcm/sound.c
  projects/ppc64/sys/dev/usb/wlan/if_rum.c
  projects/ppc64/sys/dev/usb/wlan/if_run.c
  projects/ppc64/sys/dev/usb/wlan/if_ural.c
  projects/ppc64/sys/fs/nfsclient/nfs_clport.c
  projects/ppc64/sys/fs/nfsserver/nfs_nfsdport.c
  projects/ppc64/sys/fs/tmpfs/tmpfs_vnops.c
  projects/ppc64/sys/geom/gate/g_gate.c
  projects/ppc64/sys/i386/acpica/acpi_wakeup.c
  projects/ppc64/sys/i386/include/mca.h
  projects/ppc64/sys/kern/kern_tc.c
  projects/ppc64/sys/net/bpf.c
  projects/ppc64/sys/net/bpf.h
  projects/ppc64/sys/net/bpfdesc.h
  projects/ppc64/sys/netgraph/ng_patch.c
  projects/ppc64/sys/netinet/sctp_asconf.c
  projects/ppc64/sys/netinet/sctp_pcb.c
  projects/ppc64/sys/powerpc/ofw/ofw_syscons.c
  projects/ppc64/sys/sys/pmc.h
  projects/ppc64/sys/sys/proc.h
  projects/ppc64/sys/sys/time.h
  projects/ppc64/sys/vm/uma.h
  projects/ppc64/sys/vm/uma_core.c
  projects/ppc64/sys/vm/uma_int.h
  projects/ppc64/sys/vm/vm_page.c
  projects/ppc64/sys/vm/vm_pageout.c
  projects/ppc64/sys/x86/x86/mca.c
  projects/ppc64/tools/build/mk/OptionalObsoleteFiles.inc
  projects/ppc64/tools/tools/nanobsd/nanobsd.sh
  projects/ppc64/usr.bin/vmstat/vmstat.c
  projects/ppc64/usr.bin/wtmpcvt/wtmpcvt.c
  projects/ppc64/usr.sbin/moused/moused.c
  projects/ppc64/usr.sbin/sysinstall/disks.c
  projects/ppc64/usr.sbin/tzsetup/tzsetup.c
Directory Properties:
  projects/ppc64/   (props changed)
  projects/ppc64/cddl/contrib/opensolaris/   (props changed)
  projects/ppc64/contrib/ee/   (props changed)
  projects/ppc64/contrib/expat/   (props changed)
  projects/ppc64/contrib/file/   (props changed)
  projects/ppc64/contrib/gdb/   (props changed)
  projects/ppc64/contrib/gnu-sort/   (props changed)
  projects/ppc64/contrib/groff/   (props changed)
  projects/ppc64/contrib/less/   (props changed)
  projects/ppc64/contrib/libpcap/   (props changed)
  projects/ppc64/contrib/ncurses/   (props changed)
  projects/ppc64/contrib/one-true-awk/   (props changed)
  projects/ppc64/contrib/openbsm/   (props changed)
  projects/ppc64/contrib/openpam/   (props changed)
  projects/ppc64/contrib/pf/   (props changed)
  projects/ppc64/contrib/tcpdump/   (props changed)
  projects/ppc64/contrib/tcsh/   (props changed)
  projects/ppc64/contrib/tzcode/stdtime/   (props changed)
  projects/ppc64/contrib/tzcode/zic/   (props changed)
  projects/ppc64/contrib/tzdata/   (props changed)
  projects/ppc64/contrib/wpa/   (props changed)
  projects/ppc64/lib/libutil/   (props changed)
  projects/ppc64/lib/libz/   (props changed)
  projects/ppc64/sbin/   (props changed)
  projects/ppc64/sbin/ipfw/   (props changed)
  projects/ppc64/share/mk/bsd.arch.inc.mk   (props changed)
  projects/ppc64/sys/   (props changed)
  projects/ppc64/sys/amd64/include/xen/   (props changed)
  projects/ppc64/sys/arm/conf/SHEEVAPLUG   (props changed)
  projects/ppc64/sys/cddl/contrib/opensolaris/   (props changed)
  projects/ppc64/sys/contrib/dev/acpica/   (props changed)
  projects/ppc64/sys/contrib/x86emu/   (props changed)
  projects/ppc64/sys/dev/xen/xenpci/   (props changed)
  projects/ppc64/usr.bin/csup/   (props changed)
  projects/ppc64/usr.bin/procstat/   (props changed)

Modified: projects/ppc64/bin/sh/histedit.c
==============================================================================
--- projects/ppc64/bin/sh/histedit.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/bin/sh/histedit.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -119,6 +119,9 @@ histedit(void)
 				if (hist)
 					el_set(el, EL_HIST, history, hist);
 				el_set(el, EL_PROMPT, getprompt);
+				el_set(el, EL_ADDFN, "sh-complete",
+				    "Filename completion",
+				    _el_fn_sh_complete);
 			} else {
 bad:
 				out2fmt_flush("sh: can't initialize editing\n");
@@ -135,6 +138,7 @@ bad:
 				el_set(el, EL_EDITOR, "vi");
 			else if (Eflag)
 				el_set(el, EL_EDITOR, "emacs");
+			el_set(el, EL_BIND, "^I", "sh-complete", NULL);
 			el_source(el, NULL);
 		}
 	} else {

Modified: projects/ppc64/contrib/tzcode/zic/zic.8
==============================================================================
--- projects/ppc64/contrib/tzcode/zic/zic.8	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/contrib/tzcode/zic/zic.8	Wed Jun 16 02:50:16 2010	(r209227)
@@ -120,9 +120,9 @@ Non-blank lines are expected to be of on
 rule lines, zone lines, and link lines.
 .Pp
 A rule line has the form:
-.Dl "Rule	NAME	FROM	TO	TYPE	IN	ON		AT	SAVE	LETTER/S
+.Dl "Rule	NAME	FROM	TO	TYPE	IN	ON		AT	SAVE	LETTER/S"
 For example:
-.Dl "Rule	US	1967	1973	\-	Apr	lastSun	2:00	1:00	D
+.Dl "Rule	US	1967	1973	\-	Apr	lastSun	2:00	1:00	D"
 .Pp
 The fields that make up a rule line are:
 .Bl -tag -width "LETTER/S" -offset indent
@@ -262,7 +262,7 @@ the variable part is null.
 A zone line has the form:
 .Dl "Zone	NAME	GMTOFF	RULES/SAVE	FORMAT	[UNTILYEAR [MONTH [DAY [TIME]]]]"
 For example:
-.Dl "Zone	Australia/Adelaide	9:30	Aus	CST	1971 Oct 31 2:00
+.Dl "Zone	Australia/Adelaide	9:30	Aus	CST	1971 Oct 31 2:00"
 The fields that make up a zone line are:
 .Bl -tag -width indent
 .It NAME
@@ -319,9 +319,9 @@ continuation.
 .El
 .Pp
 A link line has the form
-.Dl "Link	LINK-FROM	LINK-TO
+.Dl "Link	LINK-FROM	LINK-TO"
 For example:
-.Dl "Link	Europe/Istanbul	Asia/Istanbul
+.Dl "Link	Europe/Istanbul	Asia/Istanbul"
 The
 .Em LINK-FROM
 field should appear as the
@@ -335,9 +335,9 @@ Except for continuation lines,
 lines may appear in any order in the input.
 .Pp
 Lines in the file that describes leap seconds have the following form:
-.Dl "Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
+.Dl "Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S"
 For example:
-.Dl "Leap	1974	Dec	31	23:59:60	+	S
+.Dl "Leap	1974	Dec	31	23:59:60	+	S"
 The
 .Em YEAR ,
 .Em MONTH ,

Copied: projects/ppc64/etc/periodic/daily/800.scrub-zfs (from r209226, head/etc/periodic/daily/800.scrub-zfs)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/ppc64/etc/periodic/daily/800.scrub-zfs	Wed Jun 16 02:50:16 2010	(r209227, copy of r209226, head/etc/periodic/daily/800.scrub-zfs)
@@ -0,0 +1,86 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# If there is a global system configuration file, suck it in.
+#
+if [ -r /etc/defaults/periodic.conf ]
+then
+    . /etc/defaults/periodic.conf
+    source_periodic_confs
+fi
+
+: ${daily_scrub_zfs_default_threshold=30}
+
+case "$daily_scrub_zfs_enable" in
+    [Yy][Ee][Ss])
+	echo
+	echo 'Scrubbing of zfs pools:'
+
+	if [ -z "${daily_scrub_zfs_pools}" ]; then
+		daily_scrub_zfs_pools="$(zpool list -H -o name)"
+	fi
+
+	for pool in ${daily_scrub_zfs_pools}; do
+		# sanity check
+		zpool list ${pool} >/dev/null 2>&1
+		if [ $? -ne 0 ]; then
+			echo "   WARNING: pool '${pool}' specified in"
+			echo "            '/etc/periodic.conf:daily_scrub_zfs_pools'"
+			echo "            does not exist"
+			continue
+		fi
+
+		# successful only if there is at least one pool to scrub
+		rc=0
+
+		# determine how many days shall be between scrubs
+		eval _pool_threshold=\${daily_scrub_zfs_${pool}_threshold}
+		if [ -z "${_pool_threshold}" ];then
+			_pool_threshold=${daily_scrub_zfs_default_threshold}
+		fi
+
+		_last_scrub=$(zpool history ${pool} | \
+		    egrep "^[0-9\.\:\-]{19} zpool scrub ${pool}\$" | tail -1 |\
+		    cut -d ' ' -f 1)
+		if [ -z "${_last_scrub}" ]; then
+			# creation time of the pool if no scrub was done
+			_last_scrub=$(zpool history ${pool} | \
+			    sed -ne '2s/ .*$//p')
+		fi
+
+		# Now minus last scrub (both in seconds) converted to days.
+		_scrub_diff=$(expr -e \( $(date +%s) - \
+		    $(date -j -f %F.%T ${_last_scrub} +%s) \) / 60 / 60 / 24)
+		if [ ${_scrub_diff} -le ${_pool_threshold} ]; then
+			echo "   skipping scrubbing of pool '${pool}':"
+			echo "      last scrubbing is ${_scrub_diff} days ago, threshold is set to ${_pool_threshold} days"
+			continue
+		fi
+
+		_status="$(zpool status ${pool} | grep scrub:)"
+		case "${_status}" in
+			*"scrub in progress"*)
+				echo "   scrubbing of pool '${pool}' already in progress, skipping:"
+				;;
+			*"none requested"*)
+				echo "   starting first scrubbing (after reboot) of pool '${pool}':"
+				zpool scrub ${pool}
+				;;
+			*)
+				echo "   starting scrubbing of pool '${pool}':"
+				zpool scrub ${pool}
+				;;
+		esac
+
+		echo "      consult 'zpool status ${pool}' for the result"
+	done
+	;;
+
+    *)
+	rc=0
+	;;
+esac
+
+exit $rc

Modified: projects/ppc64/gnu/lib/libdialog/TESTS/check3.c
==============================================================================
--- projects/ppc64/gnu/lib/libdialog/TESTS/check3.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/gnu/lib/libdialog/TESTS/check3.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -47,13 +47,13 @@ static int spending;
 static int
 check(dialogMenuItem *self)
 {
-    return ((int)self->data == spending);
+    return ((int)(intptr_t)self->data == spending);
 }
 
 static int
 spend(dialogMenuItem *self)
 {
-    spending = (int)self->data;
+    spending = (int)(intptr_t)self->data;
     return DITEM_SUCCESS | DITEM_REDRAW;
 }
 

Modified: projects/ppc64/gnu/lib/libdialog/TESTS/menu3.c
==============================================================================
--- projects/ppc64/gnu/lib/libdialog/TESTS/menu3.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/gnu/lib/libdialog/TESTS/menu3.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -44,7 +44,7 @@ maybe(dialogMenuItem *self)
 static char *insurance[] = {
     "1,000,000",	"Mondo insurance policy", "Off",
     "5,000,000",	"Mega insurance policy", "Off",
-    "10,000,000",	"Friend!  Most Favored customer!"
+    "10,000,000",	"Friend!  Most Favored customer!", "On"
 };
 
 static void

Modified: projects/ppc64/gnu/lib/libdialog/TESTS/radio1.c
==============================================================================
--- projects/ppc64/gnu/lib/libdialog/TESTS/radio1.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/gnu/lib/libdialog/TESTS/radio1.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -31,13 +31,13 @@ static int spending;
 static int
 check(dialogMenuItem *self)
 {
-    return ((int)self->data == spending);
+    return ((int)(intptr_t)self->data == spending);
 }
 
 static int
 spend(dialogMenuItem *self)
 {
-    spending = (int)self->data;
+    spending = (int)(intptr_t)self->data;
     return DITEM_SUCCESS | DITEM_REDRAW;
 }
 

Modified: projects/ppc64/gnu/lib/libdialog/TESTS/radio3.c
==============================================================================
--- projects/ppc64/gnu/lib/libdialog/TESTS/radio3.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/gnu/lib/libdialog/TESTS/radio3.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -31,13 +31,13 @@ static int spending;
 static int
 check(dialogMenuItem *self)
 {
-    return ((int)self->data == spending);
+    return ((int)(intptr_t)self->data == spending);
 }
 
 static int
 spend(dialogMenuItem *self)
 {
-    spending = (int)self->data;
+    spending = (int)(intptr_t)self->data;
     return DITEM_SUCCESS | DITEM_REDRAW;
 }
 

Modified: projects/ppc64/include/histedit.h
==============================================================================
--- projects/ppc64/include/histedit.h	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/include/histedit.h	Wed Jun 16 02:50:16 2010	(r209227)
@@ -106,6 +106,7 @@ int		 el_parse(EditLine *, int, const ch
 int		 el_set(EditLine *, int, ...);
 int		 el_get(EditLine *, int, ...);
 unsigned char	_el_fn_complete(EditLine *, int);
+unsigned char	_el_fn_sh_complete(EditLine *, int);
 
 /*
  * el_set/el_get parameters

Modified: projects/ppc64/lib/clang/clang.build.mk
==============================================================================
--- projects/ppc64/lib/clang/clang.build.mk	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/clang.build.mk	Wed Jun 16 02:50:16 2010	(r209227)
@@ -17,7 +17,7 @@ TARGET_ARCH?=	${MACHINE_ARCH}
 # XXX: 8.0, to keep __FreeBSD_cc_version happy
 CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" \
 	-DCLANG_VENDOR=\"FreeBSD\ \" -DSVN_REVISION=\"104832\" \
-	-DCLANG_VENDOR_SUFFIX=\"\ 20100614\"
+	-DCLANG_VENDOR_SUFFIX=\"\ 20100615\"
 
 .PATH:	${LLVM_SRCS}/${SRCDIR}
 

Modified: projects/ppc64/lib/clang/libllvmanalysis/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmanalysis/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmanalysis/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -10,15 +10,15 @@ SRCS=	AliasAnalysis.cpp AliasAnalysisCou
 	DbgInfoPrinter.cpp DebugInfo.cpp IVUsers.cpp InlineCost.cpp \
 	InstCount.cpp InstructionSimplify.cpp Interval.cpp \
 	IntervalPartition.cpp LazyValueInfo.cpp \
-	LibCallAliasAnalysis.cpp LibCallSemantics.cpp Lint.cpp \
-	LiveValues.cpp LoopDependenceAnalysis.cpp LoopInfo.cpp \
-	LoopPass.cpp MemoryBuiltins.cpp MemoryDependenceAnalysis.cpp \
+	LibCallAliasAnalysis.cpp Lint.cpp LiveValues.cpp \
+	LoopDependenceAnalysis.cpp LoopInfo.cpp LoopPass.cpp \
+	MemoryBuiltins.cpp MemoryDependenceAnalysis.cpp \
 	PHITransAddr.cpp PointerTracking.cpp PostDominators.cpp \
 	ProfileEstimatorPass.cpp ProfileInfo.cpp ProfileInfoLoader.cpp \
 	ProfileInfoLoaderPass.cpp ProfileVerifierPass.cpp \
 	ScalarEvolution.cpp ScalarEvolutionAliasAnalysis.cpp \
 	ScalarEvolutionExpander.cpp ScalarEvolutionNormalization.cpp \
-	SparsePropagation.cpp Trace.cpp ValueTracking.cpp
+	SparsePropagation.cpp ValueTracking.cpp
 
 TGHDRS=	Intrinsics
 

Modified: projects/ppc64/lib/clang/libllvmbitreader/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmbitreader/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmbitreader/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -3,7 +3,7 @@
 LIB=	llvmbitreader
 
 SRCDIR=	lib/Bitcode/Reader
-SRCS=	BitReader.cpp BitcodeReader.cpp
+SRCS=	BitcodeReader.cpp
 
 TGHDRS= Intrinsics
 

Modified: projects/ppc64/lib/clang/libllvmbitwriter/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmbitwriter/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmbitwriter/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -3,7 +3,7 @@
 LIB=	llvmbitwriter
 
 SRCDIR=	lib/Bitcode/Writer
-SRCS=	BitWriter.cpp BitcodeWriter.cpp BitcodeWriterPass.cpp \
+SRCS=	BitcodeWriter.cpp BitcodeWriterPass.cpp \
 	ValueEnumerator.cpp
 
 .include "../clang.lib.mk"

Modified: projects/ppc64/lib/clang/libllvmcodegen/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmcodegen/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmcodegen/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -7,21 +7,20 @@ SRCS=	AggressiveAntiDepBreaker.cpp Analy
 	CalcSpillWeights.cpp CodePlacementOpt.cpp \
 	CriticalAntiDepBreaker.cpp DeadMachineInstructionElim.cpp \
 	DwarfEHPrepare.cpp ELFCodeEmitter.cpp ELFWriter.cpp \
-	ExactHazardRecognizer.cpp GCMetadata.cpp GCMetadataPrinter.cpp \
-	GCStrategy.cpp IfConversion.cpp IntrinsicLowering.cpp \
-	LLVMTargetMachine.cpp LatencyPriorityQueue.cpp \
-	LiveInterval.cpp LiveIntervalAnalysis.cpp \
-	LiveStackAnalysis.cpp LiveVariables.cpp LowerSubregs.cpp \
-	MachineBasicBlock.cpp MachineCSE.cpp MachineDominators.cpp \
-	MachineFunction.cpp MachineFunctionAnalysis.cpp \
-	MachineFunctionPass.cpp MachineFunctionPrinterPass.cpp \
-	MachineInstr.cpp MachineLICM.cpp MachineLoopInfo.cpp \
-	MachineModuleInfo.cpp MachineModuleInfoImpls.cpp \
-	MachinePassRegistry.cpp MachineRegisterInfo.cpp \
-	MachineSSAUpdater.cpp MachineSink.cpp MachineVerifier.cpp \
-	ObjectCodeEmitter.cpp OcamlGC.cpp OptimizeExts.cpp \
-	OptimizePHIs.cpp PHIElimination.cpp Passes.cpp \
-	PostRASchedulerList.cpp PreAllocSplitting.cpp \
+	ExactHazardRecognizer.cpp GCMetadata.cpp GCStrategy.cpp \
+	IfConversion.cpp IntrinsicLowering.cpp LLVMTargetMachine.cpp \
+	LatencyPriorityQueue.cpp LiveInterval.cpp \
+	LiveIntervalAnalysis.cpp LiveStackAnalysis.cpp \
+	LiveVariables.cpp LowerSubregs.cpp MachineBasicBlock.cpp \
+	MachineCSE.cpp MachineDominators.cpp MachineFunction.cpp \
+	MachineFunctionAnalysis.cpp MachineFunctionPass.cpp \
+	MachineFunctionPrinterPass.cpp MachineInstr.cpp \
+	MachineLICM.cpp MachineLoopInfo.cpp MachineModuleInfo.cpp \
+	MachineModuleInfoImpls.cpp MachinePassRegistry.cpp \
+	MachineRegisterInfo.cpp MachineSSAUpdater.cpp MachineSink.cpp \
+	MachineVerifier.cpp ObjectCodeEmitter.cpp OcamlGC.cpp \
+	OptimizeExts.cpp OptimizePHIs.cpp PHIElimination.cpp \
+	Passes.cpp PostRASchedulerList.cpp PreAllocSplitting.cpp \
 	ProcessImplicitDefs.cpp PrologEpilogInserter.cpp \
 	PseudoSourceValue.cpp RegAllocFast.cpp RegAllocLinearScan.cpp \
 	RegAllocLocal.cpp RegAllocPBQP.cpp RegisterCoalescer.cpp \

Modified: projects/ppc64/lib/clang/libllvmcore/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmcore/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmcore/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -5,8 +5,8 @@ LIB=	llvmcore
 SRCDIR=	lib/VMCore
 SRCS=	AsmWriter.cpp Attributes.cpp AutoUpgrade.cpp BasicBlock.cpp \
 	ConstantFold.cpp Constants.cpp Core.cpp DebugLoc.cpp \
-	Dominators.cpp Function.cpp GVMaterializer.cpp Globals.cpp \
-	IRBuilder.cpp InlineAsm.cpp Instruction.cpp Instructions.cpp \
+	Dominators.cpp Function.cpp Globals.cpp IRBuilder.cpp \
+	InlineAsm.cpp Instruction.cpp Instructions.cpp \
 	IntrinsicInst.cpp LLVMContext.cpp LLVMContextImpl.cpp \
 	LeakDetector.cpp Metadata.cpp Module.cpp Pass.cpp \
 	PassManager.cpp PrintModulePass.cpp Type.cpp \

Modified: projects/ppc64/lib/clang/libllvmipo/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmipo/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmipo/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -6,11 +6,10 @@ SRCDIR=	lib/Transforms/IPO
 SRCS=	ArgumentPromotion.cpp ConstantMerge.cpp \
 	DeadArgumentElimination.cpp DeadTypeElimination.cpp \
 	ExtractGV.cpp FunctionAttrs.cpp GlobalDCE.cpp GlobalOpt.cpp \
-	IPConstantPropagation.cpp IPO.cpp InlineAlways.cpp \
-	InlineSimple.cpp Inliner.cpp Internalize.cpp LoopExtractor.cpp \
-	LowerSetJmp.cpp MergeFunctions.cpp PartialSpecialization.cpp \
-	PruneEH.cpp StripDeadPrototypes.cpp StripSymbols.cpp \
-	StructRetPromotion.cpp
+	IPConstantPropagation.cpp InlineAlways.cpp InlineSimple.cpp \
+	Inliner.cpp Internalize.cpp LoopExtractor.cpp LowerSetJmp.cpp \
+	MergeFunctions.cpp PartialSpecialization.cpp PruneEH.cpp \
+	StripDeadPrototypes.cpp StripSymbols.cpp StructRetPromotion.cpp
 
 TGHDRS=	Intrinsics
 

Modified: projects/ppc64/lib/clang/libllvmmc/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmmc/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmmc/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -5,11 +5,10 @@ LIB=	llvmmc
 SRCDIR=	lib/MC
 SRCS=	MCAsmInfo.cpp MCAsmInfoCOFF.cpp MCAsmInfoDarwin.cpp \
 	MCAsmStreamer.cpp MCAssembler.cpp MCCodeEmitter.cpp \
-	MCContext.cpp MCDisassembler.cpp MCExpr.cpp MCInst.cpp \
-	MCInstPrinter.cpp MCLoggingStreamer.cpp MCMachOStreamer.cpp \
-	MCNullStreamer.cpp MCObjectWriter.cpp MCSection.cpp \
-	MCSectionCOFF.cpp MCSectionELF.cpp MCSectionMachO.cpp \
-	MCStreamer.cpp MCSymbol.cpp MCValue.cpp MachObjectWriter.cpp \
-	TargetAsmBackend.cpp
+	MCContext.cpp MCExpr.cpp MCInst.cpp MCInstPrinter.cpp \
+	MCLoggingStreamer.cpp MCMachOStreamer.cpp MCNullStreamer.cpp \
+	MCObjectWriter.cpp MCSection.cpp MCSectionCOFF.cpp \
+	MCSectionELF.cpp MCSectionMachO.cpp MCStreamer.cpp \
+	MCSymbol.cpp MachObjectWriter.cpp TargetAsmBackend.cpp
 
 .include "../clang.lib.mk"

Modified: projects/ppc64/lib/clang/libllvmscalaropts/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmscalaropts/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmscalaropts/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -9,7 +9,7 @@ SRCS=	ADCE.cpp BasicBlockPlacement.cpp C
 	LICM.cpp LoopDeletion.cpp LoopIndexSplit.cpp LoopRotation.cpp \
 	LoopStrengthReduce.cpp LoopUnrollPass.cpp LoopUnswitch.cpp \
 	MemCpyOptimizer.cpp Reassociate.cpp Reg2Mem.cpp SCCP.cpp \
-	Scalar.cpp ScalarReplAggregates.cpp SimplifyCFGPass.cpp \
+	ScalarReplAggregates.cpp SimplifyCFGPass.cpp \
 	SimplifyHalfPowrLibCalls.cpp SimplifyLibCalls.cpp \
 	TailDuplication.cpp TailRecursionElimination.cpp
 

Modified: projects/ppc64/lib/clang/libllvmsupport/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmsupport/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmsupport/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -6,14 +6,13 @@ SRCDIR=	lib/Support
 SRCS=	APFloat.cpp APInt.cpp APSInt.cpp Allocator.cpp CommandLine.cpp \
 	ConstantRange.cpp Debug.cpp DeltaAlgorithm.cpp Dwarf.cpp \
 	ErrorHandling.cpp FileUtilities.cpp FoldingSet.cpp \
-	FormattedStream.cpp GraphWriter.cpp IsInf.cpp IsNAN.cpp \
-	ManagedStatic.cpp MemoryBuffer.cpp MemoryObject.cpp \
-	PluginLoader.cpp PrettyStackTrace.cpp Regex.cpp \
-	SlowOperationInformer.cpp SmallPtrSet.cpp SmallVector.cpp \
-	SourceMgr.cpp Statistic.cpp StringExtras.cpp StringMap.cpp \
-	StringPool.cpp StringRef.cpp SystemUtils.cpp \
-	TargetRegistry.cpp Timer.cpp Triple.cpp Twine.cpp \
-	circular_raw_ostream.cpp raw_os_ostream.cpp raw_ostream.cpp \
-	regcomp.c regerror.c regexec.c regfree.c regstrlcpy.c
+	FormattedStream.cpp GraphWriter.cpp ManagedStatic.cpp \
+	MemoryBuffer.cpp PluginLoader.cpp PrettyStackTrace.cpp \
+	Regex.cpp SlowOperationInformer.cpp SmallPtrSet.cpp \
+	SmallVector.cpp SourceMgr.cpp Statistic.cpp StringExtras.cpp \
+	StringMap.cpp StringPool.cpp StringRef.cpp TargetRegistry.cpp \
+	Timer.cpp Triple.cpp Twine.cpp circular_raw_ostream.cpp \
+	raw_os_ostream.cpp raw_ostream.cpp regcomp.c regerror.c \
+	regexec.c regfree.c regstrlcpy.c
 
 .include "../clang.lib.mk"

Modified: projects/ppc64/lib/clang/libllvmsystem/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmsystem/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmsystem/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -3,9 +3,8 @@
 LIB=	llvmsystem
 
 SRCDIR=	lib/System
-SRCS=	Alarm.cpp Atomic.cpp Disassembler.cpp DynamicLibrary.cpp \
-	Errno.cpp Host.cpp IncludeFile.cpp Memory.cpp Mutex.cpp \
-	Path.cpp Process.cpp Program.cpp RWMutex.cpp \
+SRCS=	Atomic.cpp DynamicLibrary.cpp Errno.cpp Host.cpp Memory.cpp \
+	Mutex.cpp Path.cpp Process.cpp Program.cpp RWMutex.cpp \
 	SearchForAddressOfSpecialSymbol.cpp Signals.cpp \
 	ThreadLocal.cpp Threading.cpp TimeValue.cpp Valgrind.cpp
 

Modified: projects/ppc64/lib/clang/libllvmtarget/Makefile
==============================================================================
--- projects/ppc64/lib/clang/libllvmtarget/Makefile	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/clang/libllvmtarget/Makefile	Wed Jun 16 02:50:16 2010	(r209227)
@@ -5,8 +5,7 @@ LIB=	llvmtarget
 SRCDIR=	lib/Target
 SRCS=	Mangler.cpp SubtargetFeature.cpp Target.cpp TargetAsmLexer.cpp \
 	TargetData.cpp TargetELFWriterInfo.cpp TargetFrameInfo.cpp \
-	TargetInstrInfo.cpp TargetIntrinsicInfo.cpp \
-	TargetLoweringObjectFile.cpp TargetMachine.cpp \
-	TargetRegisterInfo.cpp TargetSubtarget.cpp
+	TargetInstrInfo.cpp TargetLoweringObjectFile.cpp \
+	TargetMachine.cpp TargetRegisterInfo.cpp TargetSubtarget.cpp
 
 .include "../clang.lib.mk"

Modified: projects/ppc64/lib/libedit/filecomplete.c
==============================================================================
--- projects/ppc64/lib/libedit/filecomplete.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/libedit/filecomplete.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -50,8 +50,10 @@ __FBSDID("$FreeBSD$");
 #include "histedit.h"
 #include "filecomplete.h"
 
-static char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@',
-    '$', '>', '<', '=', ';', '|', '&', '{', '(', '\0' };
+static char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`',
+    '>', '<', '=', ';', '|', '&', '{', '(', '\0' };
+/* Tilde is deliberately omitted here, we treat it specially. */
+static char extra_quote_chars[] = { ')', '}', '*', '?', '[', '$', '\0' };
 
 
 /********************************/
@@ -347,13 +349,12 @@ fn_display_match_list(EditLine *el, char
 		count++;
 
 	/* Sort the items if they are not already sorted. */
-	qsort(&matches[1], (size_t)(len - 1), sizeof(char *),
-	    _fn_qsort_string_compare);
+	qsort(&matches[1], len, sizeof(char *), _fn_qsort_string_compare);
 
 	idx = 1;
 	for(; count > 0; count--) {
 		int more = limit > 0 && matches[0];
-		for(i = 0; more; i++, idx++) {
+		for(i = 0; more; idx++) {
 			more = ++i < limit && matches[idx + 1];
 			(void)fprintf(el->el_outfile, "%-*s%s", (int)max,
 			    matches[idx], more ? " " : "");
@@ -381,10 +382,14 @@ fn_complete(EditLine *el,
 	char **(*attempted_completion_function)(const char *, int, int),
 	const char *word_break, const char *special_prefixes,
 	const char *(*app_func)(const char *), size_t query_items,
-	int *completion_type, int *over, int *point, int *end)
+	int *completion_type, int *over, int *point, int *end,
+	const char *(*find_word_start_func)(const char *, const char *),
+	char *(*dequoting_func)(const char *),
+	char *(*quoting_func)(const char *))
 {
 	const LineInfo *li;
 	char *temp;
+	char *dequoted_temp;
 	char **matches;
 	const char *ctemp;
 	size_t len;
@@ -405,11 +410,15 @@ fn_complete(EditLine *el,
 
 	/* We now look backwards for the start of a filename/variable word */
 	li = el_line(el);
-	ctemp = li->cursor;
-	while (ctemp > li->buffer
-	    && !strchr(word_break, ctemp[-1])
-	    && (!special_prefixes || !strchr(special_prefixes, ctemp[-1]) ) )
-		ctemp--;
+	if (find_word_start_func)
+		ctemp = find_word_start_func(li->buffer, li->cursor);
+	else {
+		ctemp = li->cursor;
+		while (ctemp > li->buffer
+		    && !strchr(word_break, ctemp[-1])
+		    && (!special_prefixes || !strchr(special_prefixes, ctemp[-1]) ) )
+			ctemp--;
+	}
 
 	len = li->cursor - ctemp;
 #if defined(__SSP__) || defined(__SSP_ALL__)
@@ -422,6 +431,13 @@ fn_complete(EditLine *el,
 	(void)strncpy(temp, ctemp, len);
 	temp[len] = '\0';
 
+	if (dequoting_func) {
+		dequoted_temp = dequoting_func(temp);
+		if (dequoted_temp == NULL)
+			return retval;
+	} else
+		dequoted_temp = NULL;
+
 	/* these can be used by function called in completion_matches() */
 	/* or (*attempted_completion_function)() */
 	if (point != 0)
@@ -431,13 +447,13 @@ fn_complete(EditLine *el,
 
 	if (attempted_completion_function) {
 		int cur_off = (int)(li->cursor - li->buffer);
-		matches = (*attempted_completion_function) (temp,
+		matches = (*attempted_completion_function) (dequoted_temp ? dequoted_temp : temp,
 		    (int)(cur_off - len), cur_off);
 	} else
 		matches = 0;
 	if (!attempted_completion_function || 
 	    (over != NULL && !*over && !matches))
-		matches = completion_matches(temp, complet_func);
+		matches = completion_matches(dequoted_temp ? dequoted_temp : temp, complet_func);
 
 	if (over != NULL)
 		*over = 0;
@@ -452,8 +468,18 @@ fn_complete(EditLine *el,
 		 * possible matches if there is possible completion.
 		 */
 		if (matches[0][0] != '\0') {
+			char *quoted_match;
+			if (quoting_func) {
+				quoted_match = quoting_func(matches[0]);
+				if (quoted_match == NULL)
+					goto free_matches;
+			} else
+				quoted_match = NULL;
+
 			el_deletestr(el, (int) len);
-			el_insertstr(el, matches[0]);
+			el_insertstr(el, quoted_match ? quoted_match : matches[0]);
+
+			free(quoted_match);
 		}
 
 		if (what_to_do == '?')
@@ -515,12 +541,14 @@ fn_complete(EditLine *el,
 			retval = CC_NORM;
 		}
 
+free_matches:
 		/* free elements of array and the array itself */
 		for (i = 0; matches[i]; i++)
 			free(matches[i]);
 		free(matches);
 		matches = NULL;
 	}
+	free(dequoted_temp);
 #if defined(__SSP__) || defined(__SSP_ALL__)
 	free(temp);
 #endif
@@ -537,5 +565,103 @@ _el_fn_complete(EditLine *el, int ch __a
 {
 	return (unsigned char)fn_complete(el, NULL, NULL,
 	    break_chars, NULL, NULL, 100,
-	    NULL, NULL, NULL, NULL);
+	    NULL, NULL, NULL, NULL,
+	    NULL, NULL, NULL);
+}
+
+
+static const char *
+sh_find_word_start(const char *buffer, const char *cursor)
+{
+	const char *word_start = buffer;
+
+	while (buffer < cursor) {
+		if (*buffer == '\\')
+			buffer++;
+		else if (strchr(break_chars, *buffer))
+			word_start = buffer + 1;
+
+		buffer++;
+	}
+
+	return word_start;
+}
+
+
+static char *
+sh_quote(const char *str)
+{
+	const char *src;
+	int extra_len = 0;
+	char *quoted_str, *dst;
+
+	if (*str == '-' || *str == '+')
+		extra_len += 2;
+	for (src = str; *src != '\0'; src++)
+		if (strchr(break_chars, *src) ||
+		    strchr(extra_quote_chars, *src))
+			extra_len++;
+
+	quoted_str = malloc(sizeof(*quoted_str) *
+	    (strlen(str) + extra_len + 1));
+	if (quoted_str == NULL)
+		return NULL;
+
+	dst = quoted_str;
+	if (*str == '-' || *str == '+')
+		*dst++ = '.', *dst++ = '/';
+	for (src = str; *src != '\0'; src++) {
+		if (strchr(break_chars, *src) ||
+		    strchr(extra_quote_chars, *src))
+			*dst++ = '\\';
+		*dst++ = *src;
+	}
+	*dst = '\0';
+
+	return quoted_str;
+}
+
+
+static char *
+sh_dequote(const char *str)
+{
+	char *dequoted_str, *dst;
+
+	/* save extra space to replace \~ with ./~ */
+	dequoted_str = malloc(sizeof(*dequoted_str) * (strlen(str) + 1 + 1));
+	if (dequoted_str == NULL)
+		return NULL;
+
+	dst = dequoted_str;
+
+	/* dequote \~ at start as ./~ */
+	if (*str == '\\' && str[1] == '~') {
+		str++;
+		*dst++ = '.';
+		*dst++ = '/';
+	}
+
+	while (*str) {
+		if (*str == '\\')
+			str++;
+		if (*str)
+			*dst++ = *str++;
+	}
+	*dst = '\0';
+
+	return dequoted_str;
+}
+
+
+/*
+ * completion function using sh quoting rules; for key binding
+ */
+/* ARGSUSED */
+unsigned char
+_el_fn_sh_complete(EditLine *el, int ch __attribute__((__unused__)))
+{
+	return (unsigned char)fn_complete(el, NULL, NULL,
+	    break_chars, NULL, NULL, 100,
+	    NULL, NULL, NULL, NULL,
+	    sh_find_word_start, sh_dequote, sh_quote);
 }

Modified: projects/ppc64/lib/libedit/filecomplete.h
==============================================================================
--- projects/ppc64/lib/libedit/filecomplete.h	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/libedit/filecomplete.h	Wed Jun 16 02:50:16 2010	(r209227)
@@ -36,7 +36,10 @@ int fn_complete(EditLine *,
     char *(*)(const char *, int),
     char **(*)(const char *, int, int),
     const char *, const char *, const char *(*)(const char *), size_t,
-    int *, int *, int *, int *);
+    int *, int *, int *, int *,
+    const char *(*)(const char *, const char *),
+    char *(*)(const char *),
+    char *(*)(const char *));
 
 void fn_display_match_list(EditLine *, char **, size_t, size_t);
 char *fn_tilde_expand(const char *);

Modified: projects/ppc64/lib/libmemstat/memstat.c
==============================================================================
--- projects/ppc64/lib/libmemstat/memstat.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/libmemstat/memstat.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -188,6 +188,7 @@ _memstat_mt_reset_stats(struct memory_ty
 	mtp->mt_count = 0;
 	mtp->mt_free = 0;
 	mtp->mt_failures = 0;
+	mtp->mt_sleeps = 0;
 
 	mtp->mt_zonefree = 0;
 	mtp->mt_kegfree = 0;
@@ -304,6 +305,13 @@ memstat_get_failures(const struct memory
 	return (mtp->mt_failures);
 }
 
+uint64_t
+memstat_get_sleeps(const struct memory_type *mtp)
+{
+
+	return (mtp->mt_sleeps);
+}
+
 void *
 memstat_get_caller_pointer(const struct memory_type *mtp, int index)
 {

Modified: projects/ppc64/lib/libmemstat/memstat.h
==============================================================================
--- projects/ppc64/lib/libmemstat/memstat.h	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/libmemstat/memstat.h	Wed Jun 16 02:50:16 2010	(r209227)
@@ -139,6 +139,7 @@ uint64_t	 memstat_get_bytes(const struct
 uint64_t	 memstat_get_count(const struct memory_type *mtp);
 uint64_t	 memstat_get_free(const struct memory_type *mtp);
 uint64_t	 memstat_get_failures(const struct memory_type *mtp);
+uint64_t	 memstat_get_sleeps(const struct memory_type *mtp);
 void		*memstat_get_caller_pointer(const struct memory_type *mtp,
 		    int index);
 void		 memstat_set_caller_pointer(struct memory_type *mtp,

Modified: projects/ppc64/lib/libmemstat/memstat_internal.h
==============================================================================
--- projects/ppc64/lib/libmemstat/memstat_internal.h	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/libmemstat/memstat_internal.h	Wed Jun 16 02:50:16 2010	(r209227)
@@ -65,6 +65,7 @@ struct memory_type {
 	uint64_t	 mt_count;	/* Number of current allocations. */
 	uint64_t	 mt_free;	/* Number of cached free items. */
 	uint64_t	 mt_failures;	/* Number of allocation failures. */
+	uint64_t	 mt_sleeps;	/* Number of allocation sleeps. */
 
 	/*
 	 * Caller-owned memory.

Modified: projects/ppc64/lib/libmemstat/memstat_uma.c
==============================================================================
--- projects/ppc64/lib/libmemstat/memstat_uma.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/lib/libmemstat/memstat_uma.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -208,6 +208,7 @@ retry:
 		mtp->mt_numallocs = uthp->uth_allocs;
 		mtp->mt_numfrees = uthp->uth_frees;
 		mtp->mt_failures = uthp->uth_fails;
+		mtp->mt_sleeps = uthp->uth_sleeps;
 
 		for (j = 0; j < maxcpus; j++) {
 			upsp = (struct uma_percpu_stat *)p;
@@ -402,6 +403,7 @@ memstat_kvm_uma(struct memory_type_list 
 			mtp->mt_numallocs = uz.uz_allocs;
 			mtp->mt_numfrees = uz.uz_frees;
 			mtp->mt_failures = uz.uz_fails;
+			mtp->mt_sleeps = uz.uz_sleeps;
 			if (kz.uk_flags & UMA_ZFLAG_INTERNAL)
 				goto skip_percpu;
 			for (i = 0; i < mp_maxid + 1; i++) {

Modified: projects/ppc64/sbin/hastd/ebuf.c
==============================================================================
--- projects/ppc64/sbin/hastd/ebuf.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/sbin/hastd/ebuf.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -55,8 +55,8 @@ struct ebuf {
 	size_t		 eb_size;
 };
 
-static int ebuf_head_extent(struct ebuf *eb, size_t size);
-static int ebuf_tail_extent(struct ebuf *eb, size_t size);
+static int ebuf_head_extend(struct ebuf *eb, size_t size);
+static int ebuf_tail_extend(struct ebuf *eb, size_t size);
 
 struct ebuf *
 ebuf_alloc(size_t size)
@@ -110,7 +110,7 @@ ebuf_add_head(struct ebuf *eb, const voi
 		 * We can't add more entries at the front, so we have to extend
 		 * our buffer.
 		 */
-		if (ebuf_head_extent(eb, size) < 0)
+		if (ebuf_head_extend(eb, size) < 0)
 			return (-1);
 	}
 	assert(size <= (size_t)(eb->eb_used - eb->eb_start));
@@ -137,13 +137,13 @@ ebuf_add_tail(struct ebuf *eb, const voi
 		 * We can't add more entries at the back, so we have to extend
 		 * our buffer.
 		 */
-		if (ebuf_tail_extent(eb, size) < 0)
+		if (ebuf_tail_extend(eb, size) < 0)
 			return (-1);
 	}
 	assert(size <= (size_t)(eb->eb_end - (eb->eb_used + eb->eb_size)));
 
 	/*
-	 * If data is NULL the caller just wants to reserve place.
+	 * If data is NULL the caller just wants to reserve space.
 	 */
 	if (data != NULL)
 		bcopy(data, eb->eb_used + eb->eb_size, size);
@@ -203,7 +203,7 @@ ebuf_size(struct ebuf *eb)
  * Function adds size + (PAGE_SIZE / 4) bytes at the front of the buffer..
  */
 static int
-ebuf_head_extent(struct ebuf *eb, size_t size)
+ebuf_head_extend(struct ebuf *eb, size_t size)
 {
 	unsigned char *newstart, *newused;
 	size_t newsize;
@@ -231,7 +231,7 @@ ebuf_head_extent(struct ebuf *eb, size_t
  * Function adds size + ((3 * PAGE_SIZE) / 4) bytes at the back.
  */
 static int
-ebuf_tail_extent(struct ebuf *eb, size_t size)
+ebuf_tail_extend(struct ebuf *eb, size_t size)
 {
 	unsigned char *newstart;
 	size_t newsize;

Modified: projects/ppc64/sbin/hastd/hast_proto.c
==============================================================================
--- projects/ppc64/sbin/hastd/hast_proto.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/sbin/hastd/hast_proto.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -329,9 +329,7 @@ hast_proto_recv_hdr(struct proto_conn *c
 	*nvp = nv;
 	return (0);
 fail:
-	if (nv != NULL)
-		nv_free(nv);
-	else if (eb != NULL)
+	if (eb != NULL)
 		ebuf_free(eb);
 	return (-1);
 }

Modified: projects/ppc64/sbin/hastd/hastd.c
==============================================================================
--- projects/ppc64/sbin/hastd/hastd.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/sbin/hastd/hastd.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -200,7 +200,7 @@ listen_accept(void)
 
 	proto_local_address(conn, laddr, sizeof(laddr));
 	proto_remote_address(conn, raddr, sizeof(raddr));
-	pjdlog_info("Connection from %s to %s.", laddr, raddr);
+	pjdlog_info("Connection from %s to %s.", raddr, laddr);
 
 	/* Error in setting timeout is not critical, but why should it fail? */
 	if (proto_timeout(conn, HAST_TIMEOUT) < 0)
@@ -286,7 +286,7 @@ listen_accept(void)
 	if (token != NULL && memcmp(token, res->hr_token,
 	    sizeof(res->hr_token)) != 0) {
 		pjdlog_error("Token received from %s doesn't match.", raddr);
-		nv_add_stringf(nverr, "errmsg", "Toke doesn't match.");
+		nv_add_stringf(nverr, "errmsg", "Token doesn't match.");
 		goto fail;
 	}
 	/*
@@ -400,7 +400,11 @@ static void
 main_loop(void)
 {
 	fd_set rfds, wfds;
-	int fd, maxfd, ret;
+	int cfd, lfd, maxfd, ret;
+
+	cfd = proto_descriptor(cfg->hc_controlconn);
+	lfd = proto_descriptor(cfg->hc_listenconn);
+	maxfd = cfd > lfd ? cfd : lfd;
 
 	for (;;) {
 		if (sigchld_received) {
@@ -412,22 +416,13 @@ main_loop(void)
 			hastd_reload();
 		}
 
-		maxfd = 0;
+		/* Setup descriptors for select(2). */
 		FD_ZERO(&rfds);
+		FD_SET(cfd, &rfds);
+		FD_SET(lfd, &rfds);
 		FD_ZERO(&wfds);
-
-		/* Setup descriptors for select(2). */
-#define	SETUP_FD(conn)	do {						\
-	fd = proto_descriptor(conn);					\
-	if (fd >= 0) {							\
-		maxfd = fd > maxfd ? fd : maxfd;			\
-		FD_SET(fd, &rfds);					\
-		FD_SET(fd, &wfds);					\
-	}								\
-} while (0)
-		SETUP_FD(cfg->hc_controlconn);
-		SETUP_FD(cfg->hc_listenconn);
-#undef	SETUP_FD
+		FD_SET(cfd, &wfds);
+		FD_SET(lfd, &wfds);
 
 		ret = select(maxfd + 1, &rfds, &wfds, NULL, NULL);
 		if (ret == -1) {
@@ -437,13 +432,10 @@ main_loop(void)
 			pjdlog_exit(EX_OSERR, "select() failed");
 		}
 
-#define	ISSET_FD(conn)	\
-	(FD_ISSET((fd = proto_descriptor(conn)), &rfds) || FD_ISSET(fd, &wfds))
-		if (ISSET_FD(cfg->hc_controlconn))
+		if (FD_ISSET(cfd, &rfds) || FD_ISSET(cfd, &wfds))
 			control_handle(cfg);
-		if (ISSET_FD(cfg->hc_listenconn))
+		if (FD_ISSET(lfd, &rfds) || FD_ISSET(lfd, &wfds))
 			listen_accept();
-#undef	ISSET_FD
 	}
 }
 

Modified: projects/ppc64/sbin/hastd/metadata.c
==============================================================================
--- projects/ppc64/sbin/hastd/metadata.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/sbin/hastd/metadata.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -96,6 +96,7 @@ metadata_read(struct hast_resource *res,
 		rerrno = errno;
 		pjdlog_errno(LOG_ERR,
 		    "Unable to allocate memory to read metadata");
+		ebuf_free(eb);
 		goto fail;
 	}
 	buf = ebuf_data(eb, NULL);
@@ -154,6 +155,7 @@ metadata_read(struct hast_resource *res,
 		nv_free(nv);
 		goto fail;
 	}
+	nv_free(nv);
 	return (0);
 fail:
 	if (opened_here) {
@@ -172,6 +174,7 @@ metadata_write(struct hast_resource *res
 	unsigned char *buf, *ptr;
 	size_t size;
 	ssize_t done;
+	int ret;
 
 	buf = calloc(1, METADATA_SIZE);
 	if (buf == NULL) {
@@ -180,6 +183,8 @@ metadata_write(struct hast_resource *res
 		return (-1);
 	}
 
+	ret = -1;
+
 	nv = nv_alloc();
 	nv_add_string(nv, res->hr_name, "resource");
 	nv_add_uint64(nv, (uint64_t)res->hr_datasize, "datasize");
@@ -199,7 +204,7 @@ metadata_write(struct hast_resource *res
 	nv_add_string(nv, role2str(res->hr_role), "prevrole");
 	if (nv_error(nv) != 0) {
 		pjdlog_error("Unable to create metadata.");
-		goto fail;
+		goto end;
 	}
 	res->hr_previous_role = res->hr_role;
 	eb = nv_hton(nv);
@@ -211,12 +216,11 @@ metadata_write(struct hast_resource *res
 	done = pwrite(res->hr_localfd, buf, METADATA_SIZE, 0);
 	if (done < 0 || done != METADATA_SIZE) {
 		pjdlog_errno(LOG_ERR, "Unable to write metadata");
-		goto fail;
+		goto end;
 	}
-
-	return (0);
-fail:
+	ret = 0;
+end:
 	free(buf);
 	nv_free(nv);
-	return (-1);
+	return (ret);
 }

Modified: projects/ppc64/sbin/hastd/nv.c
==============================================================================
--- projects/ppc64/sbin/hastd/nv.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/sbin/hastd/nv.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -707,8 +707,10 @@ nv_add(struct nv *nv, const unsigned cha
 		assert(errno != 0);
 		if (nv->nv_error == 0)
 			nv->nv_error = errno;
+		free(nvh);
 		return;
 	}
+	free(nvh);
 	/* Add the actual data. */
 	if (ebuf_add_tail(nv->nv_ebuf, value, vsize) < 0) {
 		assert(errno != 0);

Modified: projects/ppc64/sbin/hastd/primary.c
==============================================================================
--- projects/ppc64/sbin/hastd/primary.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/sbin/hastd/primary.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -195,7 +195,10 @@ static pthread_mutex_t metadata_lock;
 	mtx_unlock(&hio_##name##_list_lock);				\
 } while (0)
 
-#define	SYNCREQ(hio)		do { (hio)->hio_ggio.gctl_unit = -1; } while (0)
+#define	SYNCREQ(hio)		do {					\
+	(hio)->hio_ggio.gctl_unit = -1;					\
+	(hio)->hio_ggio.gctl_seq = 1;					\
+} while (0)
 #define	ISSYNCREQ(hio)		((hio)->hio_ggio.gctl_unit == -1)
 #define	SYNCREQDONE(hio)	do { (hio)->hio_ggio.gctl_unit = -2; } while (0)
 #define	ISSYNCREQDONE(hio)	((hio)->hio_ggio.gctl_unit == -2)
@@ -447,6 +450,7 @@ init_local(struct hast_resource *res)
 		primary_exit(EX_NOINPUT, "Unable to read activemap");
 	}
 	activemap_copyin(res->hr_amp, buf, mapsize);
+	free(buf);
 	if (res->hr_resuid != 0)
 		return;
 	/*

Modified: projects/ppc64/sbin/hastd/secondary.c
==============================================================================
--- projects/ppc64/sbin/hastd/secondary.c	Wed Jun 16 00:41:21 2010	(r209226)
+++ projects/ppc64/sbin/hastd/secondary.c	Wed Jun 16 02:50:16 2010	(r209227)
@@ -295,6 +295,7 @@ init_remote(struct hast_resource *res, s
 		nv_free(nvout);
 		exit(EX_TEMPFAIL);
 	}
+	nv_free(nvout);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list