Browse Source

Plan 9 from Bell Labs 2006-03-01

David du Colombier 18 years ago
parent
commit
c2e75e616a

+ 5 - 5
dist/replica/_plan9.db

@@ -7380,7 +7380,7 @@ sys/man/1/thesaurus - 664 sys sys 1068121775 222
 sys/man/1/time - 664 sys sys 944959673 380
 sys/man/1/touch - 664 sys sys 1018369246 461
 sys/man/1/tr - 664 sys sys 944959675 1730
-sys/man/1/trace - 664 sys sys 1121082621 1776
+sys/man/1/trace - 664 sys sys 1141147048 1497
 sys/man/1/troff - 664 sys sys 944959675 3102
 sys/man/1/troff2html - 664 sys sys 1113743328 1924
 sys/man/1/tweak - 664 sys sys 957920008 4762
@@ -13045,12 +13045,12 @@ sys/src/cmd/ql/asmout.c - 664 sys sys 1137459145 35737
 sys/src/cmd/ql/cnam.c - 664 sys sys 1089299167 335
 sys/src/cmd/ql/compat.c - 664 sys sys 944961082 445
 sys/src/cmd/ql/cputime.c - 664 sys sys 944961081 336
-sys/src/cmd/ql/l.h - 664 sys sys 1089299168 5935
-sys/src/cmd/ql/list.c - 664 sys sys 1089299166 5663
+sys/src/cmd/ql/l.h - 664 sys sys 1141144912 5936
+sys/src/cmd/ql/list.c - 664 sys sys 1141144912 5663
 sys/src/cmd/ql/mkcname - 664 sys sys 944961082 143
 sys/src/cmd/ql/mkfile - 664 sys sys 1089299166 304
 sys/src/cmd/ql/noop.c - 664 sys sys 1089299167 8982
-sys/src/cmd/ql/obj.c - 664 sys sys 1134346080 25287
+sys/src/cmd/ql/obj.c - 664 sys sys 1141144914 25389
 sys/src/cmd/ql/optab.c - 664 sys sys 1089299167 13392
 sys/src/cmd/ql/pass.c - 664 sys sys 1132450403 11861
 sys/src/cmd/ql/sched.c - 664 sys sys 1089299166 12776
@@ -13302,7 +13302,7 @@ sys/src/cmd/syscall/mkfile - 664 sys sys 1037122264 549
 sys/src/cmd/syscall/syscall.c - 664 sys sys 1135487934 3951
 sys/src/cmd/tail.c - 664 sys sys 1123123922 6034
 sys/src/cmd/tapefs - 20000000775 sys sys 944962012 0
-sys/src/cmd/tapefs/32vfs.c - 664 sys sys 1140965787 3922
+sys/src/cmd/tapefs/32vfs.c - 664 sys sys 1141144939 3899
 sys/src/cmd/tapefs/cpiofs.c - 664 sys sys 1140814623 2491
 sys/src/cmd/tapefs/fs.c - 664 sys sys 1141003366 9887
 sys/src/cmd/tapefs/mkfile - 664 sys sys 1097914131 254

+ 5 - 5
dist/replica/plan9.db

@@ -7380,7 +7380,7 @@ sys/man/1/thesaurus - 664 sys sys 1068121775 222
 sys/man/1/time - 664 sys sys 944959673 380
 sys/man/1/touch - 664 sys sys 1018369246 461
 sys/man/1/tr - 664 sys sys 944959675 1730
-sys/man/1/trace - 664 sys sys 1121082621 1776
+sys/man/1/trace - 664 sys sys 1141147048 1497
 sys/man/1/troff - 664 sys sys 944959675 3102
 sys/man/1/troff2html - 664 sys sys 1113743328 1924
 sys/man/1/tweak - 664 sys sys 957920008 4762
@@ -13045,12 +13045,12 @@ sys/src/cmd/ql/asmout.c - 664 sys sys 1137459145 35737
 sys/src/cmd/ql/cnam.c - 664 sys sys 1089299167 335
 sys/src/cmd/ql/compat.c - 664 sys sys 944961082 445
 sys/src/cmd/ql/cputime.c - 664 sys sys 944961081 336
-sys/src/cmd/ql/l.h - 664 sys sys 1089299168 5935
-sys/src/cmd/ql/list.c - 664 sys sys 1089299166 5663
+sys/src/cmd/ql/l.h - 664 sys sys 1141144912 5936
+sys/src/cmd/ql/list.c - 664 sys sys 1141144912 5663
 sys/src/cmd/ql/mkcname - 664 sys sys 944961082 143
 sys/src/cmd/ql/mkfile - 664 sys sys 1089299166 304
 sys/src/cmd/ql/noop.c - 664 sys sys 1089299167 8982
-sys/src/cmd/ql/obj.c - 664 sys sys 1134346080 25287
+sys/src/cmd/ql/obj.c - 664 sys sys 1141144914 25389
 sys/src/cmd/ql/optab.c - 664 sys sys 1089299167 13392
 sys/src/cmd/ql/pass.c - 664 sys sys 1132450403 11861
 sys/src/cmd/ql/sched.c - 664 sys sys 1089299166 12776
@@ -13302,7 +13302,7 @@ sys/src/cmd/syscall/mkfile - 664 sys sys 1037122264 549
 sys/src/cmd/syscall/syscall.c - 664 sys sys 1135487934 3951
 sys/src/cmd/tail.c - 664 sys sys 1123123922 6034
 sys/src/cmd/tapefs - 20000000775 sys sys 944962012 0
-sys/src/cmd/tapefs/32vfs.c - 664 sys sys 1140965787 3922
+sys/src/cmd/tapefs/32vfs.c - 664 sys sys 1141144939 3899
 sys/src/cmd/tapefs/cpiofs.c - 664 sys sys 1140814623 2491
 sys/src/cmd/tapefs/fs.c - 664 sys sys 1141003366 9887
 sys/src/cmd/tapefs/mkfile - 664 sys sys 1097914131 254

+ 5 - 0
dist/replica/plan9.log

@@ -27886,3 +27886,8 @@
 1141009304 0 c sys/src/cmd/tar.c - 664 sys sys 1141007861 24018
 1141011104 0 a sys/man/8/disksim - 664 sys sys 1141009713 1452
 1141012904 0 c 386/bin/tar - 775 sys sys 1141012626 93114
+1141146019 0 c sys/src/cmd/ql/l.h - 664 sys sys 1141144912 5936
+1141146019 1 c sys/src/cmd/ql/list.c - 664 sys sys 1141144912 5663
+1141146019 2 c sys/src/cmd/ql/obj.c - 664 sys sys 1141144914 25389
+1141146019 3 c sys/src/cmd/tapefs/32vfs.c - 664 sys sys 1141144939 3899
+1141147820 0 c sys/man/1/trace - 664 sys sys 1141147048 1497

+ 47 - 40
sys/man/1/trace

@@ -4,65 +4,72 @@ trace \- show (real-time) process behavior
 .SH SYNOPSIS
 .B trace
 [
-.B \-d
-.I profdev
+.B -d
+.I file
 ]
 [
-.B \-v
+.B -v
 ]
 [
-.B \-w
+.B -w
+]
+[
+.I pid
+\&...
 ]
-[pid ... ]
 .SH DESCRIPTION
 .I Trace
 displays the behavior of processes running on the machine.  In its
 window it shows a time line for each traced process.  Running
-processes are shown as colored blocks.  When a process is scheduled as
-a real-time process, black up arrows indicate process releases, black
-down arrows indicate process deadlines, red down arrows indicate the
-process ran over its allotted scheduled time, and green down arrows to
-indicates a process yielded the processor before its deadline.
-Non-real-time processes do not have such release times and deadlines
-and no real-time information is shown for such processes.
-.PP
-Trace reads /proc/trace to retrieve trace events from the kernel
-scheduler.  Trace events are binary data structures, which are
-generated by the kernel scheduler whenever a noteworthy event occurs.
-The
-.B \-d
-flag can be used to specify another trace file.
-.PP
-The
-.B \-v
-flag prints out the events as they are received from the event file.
+processes appear as colored blocks, with arrows marking important
+events in real-time processes
+(see
+.IR proc (3)).
+Black up arrows mark process releases,
+black down arrows mark process deadlines,
+green down arrows mark times when a process yielded the processor
+before its deadline,
+red down arrows mark times when the process overran its allotted time.
 .PP
-The \-w
-flag makes
-.B trace
-open a new window for its display.
+.I Trace
+reads
+.B /proc/trace
+to retrieve trace events from the kernel
+scheduler.  Trace events are binary data structures generated by
+the kernel scheduler.
+It is assumed that the reader of
+.B /proc/trace
+and the kernel providing it have the same byte order.
 .PP
-To enable process tracing echo the string "traceon" into 
-/proc/<pid>/ctl.  To disable tracing of a process echo "traceoff"
-in the control file.  Trace enables tracing on all processes as specified
-by their
-.B pids 
+The options are:
+.TP
+.B -d
+specify an alternate trace event file
+.TP
+.B -v
+print events as they are read from the trace event file
+.TP
+.B -w
+run in a new window rather than using the current one
+.PD
 .PP
-The following one-character commands are recognized by
-.BR trace :
+.I Trace
+recognizes these keystroke commands while it is running:
 .TP
 .B +
-Zoom in by a factor of two,
+zoom in by a factor of two
 .TP
 .B -
-Zoom out by a factor of two,
+zoom out by a factor of two
 .TP
 .B p
-Pause or resume,
+pause or resume
 .TP
 .B q
-Quit.
-.SH "SEE ALSO
+quit
+.PD
+.PP
+.SH SEE ALSO
 .IR proc (3)
 .SH FILES
 .TF /sys/include/trace.h
@@ -72,6 +79,6 @@ trace event file
 .TP
 .B /sys/include/trace.h
 trace event data structures
-.TD
+.PD
 .SH SOURCE
 .B /sys/src/cmd/trace

+ 1 - 1
sys/src/cmd/ql/l.h

@@ -88,7 +88,7 @@ struct
 {
 	Optab*	start;
 	Optab*	stop;
-} oprange[AEND];
+} oprange[ALAST];
 
 enum
 {

+ 1 - 1
sys/src/cmd/ql/list.c

@@ -64,7 +64,7 @@ Aconv(Fmt *fp)
 
 	a = va_arg(fp->args, int);
 	s = "???";
-	if(a >= AXXX && a <= AEND)
+	if(a >= AXXX && a < ALAST)
 		s = anames[a];
 	return fmtstrcpy(fp, s);
 }

+ 10 - 3
sys/src/cmd/ql/obj.c

@@ -1102,16 +1102,23 @@ void
 gethunk(void)
 {
 	char *h;
+	long nh;
 
-	h = mysbrk((int)NHUNK);
+	nh = NHUNK;
+	if(tothunk >= 5L*NHUNK) {
+		nh = 5L*NHUNK;
+		if(tothunk >= 25L*NHUNK)
+			nh = 25L*NHUNK;
+	}
+	h = mysbrk(nh);
 	if(h == (char *)-1) {
 		diag("out of memory");
 		errorexit();
 	}
 
 	hunk = h;
-	nhunk = NHUNK;
-	tothunk += NHUNK;
+	nhunk = nh;
+	tothunk += nh;
 }
 
 void

+ 0 - 1
sys/src/cmd/tapefs/32vfs.c

@@ -52,7 +52,6 @@ void
 populate(char *name)
 {
 	Fileinf f;
-	uchar buf[MAXBLSIZE];
 
 	BLSIZE = 512;	/* 32v */
 	if(blocksize){