[MLton-devel] cvs commit: mlprof -graph set expressions

Stephen Weeks sweeks@users.sourceforge.net
Mon, 27 Jan 2003 22:48:57 -0800


sweeks      03/01/27 22:48:57

  Modified:    doc/user-guide profiling.tex
               man      mlprof.1
               mlprof   main.sml mlprof-stubs.cm mlprof.cm
  Log:
  Added a little sublanguage for specifying sets of nodes to be
  displayed in the dot call graph.  mlprof's -graph switch is used to
  specify the set.  The language has regular expressions for specifying
  node names, and the usual set operations (union, intersection,
  complement), as well as two operations "from" and "to" for specify the
  set of nodes on paths from and to a node, respectively.
  
  See the user guide for details.
  
  Made -thresh take a real argument instead of an integer.

Revision  Changes    Path
1.19      +77 -16    mlton/doc/user-guide/profiling.tex

Index: profiling.tex
===================================================================
RCS file: /cvsroot/mlton/mlton/doc/user-guide/profiling.tex,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- profiling.tex	18 Jan 2003 17:56:03 -0000	1.18
+++ profiling.tex	28 Jan 2003 06:48:55 -0000	1.19
@@ -108,23 +108,84 @@
 like {\tt main} are handled: they are printed with surrounding
 brackets.  C functions are displayed similarly.
 
-For easier visualization of data, {\tt mlprof} also creates a call
-graph of the program, in {\tt .dot} format, containing the table data.
-You can create a postscript graph from the dot file using the
+The performance impact of {\tt -profile-stack true} can be noticeable
+since there is some extra bookkeeping at every nontail call.
+
+\subsection{Call graphs}
+
+For easier visualization of data, {\tt mlprof} creates a call graph of
+the program in dot format.  The graph nodes contain the function name
+(and source position with {\tt -show-line true}), as well as the
+percentage of ticks.  You can create a postscript graph from the dot
+file using the
 \htmladdnormallink{{\tt graphviz}}
 		  {http://www.research.att.com/sw/tools/graphviz/}
-software package.  If you want to see the entire call-graph for a
-program, you can use {\tt mlprof -graph all a.out}. Technically
-speaking, the graph is a call-stack graph rather than a call graph
-because it describes the set of possible call stacks.  Thedifference
-is in how tail calls are displayed.  For example if {\tt f} nontail
-calls {\tt g} and {\tt g} tail calls {\tt h}, then the call-stack
-graph has edges from {\tt f} to {\tt g} and {\tt f} to {\tt h}, while
-the call-graph would have edges from {\tt f} to {\tt g} and {\tt g} to
-{\tt h}.
+software package.
 
-The performance impact of {\tt -profile-stack true} can be noticeable
-since there is some extra bookkeeping at every nontail call.
+Because call graphs can get big, you may want to control what nodes
+appear in the graph.  For this, you can use the {\tt -graph} option to
+specify the nodes that you would like to see.  The argument to {\tt
+-graph} is an expression that describes a set of nodes, taken from the
+following grammar.
+
+\begin{latexonly}
+\begin{center}
+\begin{tabular}{lcl}
+{\it e} & ::= & {\tt all} \\
+& $\alt$ & {\tt "{\it s}"} \\
+& $\alt$ & {\tt (and {\it e} ...)} \\
+& $\alt$ & {\tt (from {\it e})} \\
+& $\alt$ & {\tt (not {\it e})} \\
+& $\alt$ & {\tt (or {\it e} ...)} \\
+& $\alt$ & {\tt (to {\it e})} \\
+& $\alt$ & {\tt (thresh {\it x})} \\
+\end{tabular}
+\end{center}
+\end{latexonly}
+\begin{htmlonly}
+\begin{center}
+\begin{tabular}{lcl}
+{\it e} & ::= & {\tt all} \\
+& | & {\tt "{\it s}"} \\
+& | & {\tt (and {\it e} ...)} \\
+& | & {\tt (from {\it e})} \\
+& | & {\tt (not {\it e})} \\
+& | & {\tt (or {\it e} ...)} \\
+& | & {\tt (to {\it e})} \\
+& | & {\tt (thresh {\it x})} \\
+\end{tabular}
+\end{center}
+\end{htmlonly}
+
+In the grammar, {\tt all} denotes the set of all nodes, {\it s} is a
+regular expression denoting the set of nodes whose function name (and
+source position) matches {\it s}.  The {\tt and}, {\tt not}, and {\tt
+or} expressionds denote intersection, complement, and union,
+respectively.  The {\tt from} ({\tt to}) expression denotes the set of
+nodes that have paths from (to) the set of nodes denoted by its
+argument.  Finally, {\tt thresh} denotes the set of nodes whose
+percentage of ticks is above the real number {\it x}.
+
+For example, if you want to see the entire call-graph for a program,
+you can use {\tt -graph all}.  If you want to see all nodes reachable
+from function {\tt foo} in your program, you would use {\tt -graph
+'(from "foo")'}.  Or, if you want to see all the functions defined in
+subdirectory {\tt bar} of your project that recieved any ticks, you
+would use {\tt -show-line true -graph '(and ".*/bar/.*" (thresh
+0.0))'}.
+
+When compiling with {\tt -profile-stack false}, the default is {\tt
+-graph '(to (thresh {\it x}))'} where {\it x} is the threshold.
+When compiling with {\tt -profile-stack true}, the default is {\tt
+-graph '(thresh {\it x})'} where {\it x} is the threshold.
+
+As a side note, technically speaking, the graph is a call-stack graph
+rather than a call graph because it describes the set of possible call
+stacks.  The difference is in how tail calls are displayed.  For
+example if {\tt f} nontail calls {\tt g} and {\tt g} tail calls {\tt
+h}, then the call-stack graph has edges from {\tt f} to {\tt g} and
+{\tt f} to {\tt h}, while the call-graph has edges from {\tt f} to
+{\tt g} and {\tt g} to {\tt h}.
 
 \subsection{Using {\tt MLton.Profile}}
 
@@ -187,11 +248,11 @@
 
 With {\tt -profile time}, use of the following in your program will
 cause a run-time error, since they would interfere with the profiler
-signal handler.
+signal handler.\\
 \begin{tabular}{l}
 \tt MLton.Itimer.set (MLton.Itimer.Prof, ...)\}\\
 \tt MLton.Signal.setHandler (MLton.Signal.prof, ...)
-\end{tabular}
+\end{tabular}\\
 Also, because of the random sampling used to implement {\tt -profile
 time}, it is best to have a long running program (at least tens of
 seconds) in order to get reasonable time data.



1.9       +6 -5      mlton/man/mlprof.1

Index: mlprof.1
===================================================================
RCS file: /cvsroot/mlton/mlton/man/mlprof.1,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mlprof.1	18 Jan 2003 17:56:04 -0000	1.8
+++ mlprof.1	28 Jan 2003 06:48:56 -0000	1.9
@@ -26,8 +26,9 @@
 
 .SH OPTIONS
 .TP
-\fB-graph \fI{\fBabove\fP|\fBall\fP}\fP
-Show either nodes above threshold or all nodes in the call graph.
+\fB-graph \fI{\fBexp\fP}\fP
+Show nodes in the call graph specified by \fBexp\fP.  For details on
+the allowed expressions, see the \fBMLton User Guide\fP.
 .TP
 \fB-raw \fI{\fBfalse\fP|\fBtrue\fP}\fP
 Show the raw counts in addition to the percentages.
@@ -35,8 +36,8 @@
 \fB-show-line \fI{\fBfalse\fP|\fBtrue\fP}\fP
 Show the file and line for each function.
 .TP
-\fB-thresh \fI{\fB0\fP|\fB1\fP|...|\fB100\fP}\fP
-Only print information about functions whose percentage is above the
-specified integer.
+\fB-thresh \fI{\fBx\fP}\fP
+Only print information about functions whose percentage is above
+\fBx\fP, where 0 <= \fBx\fP <= 100.0.
 .SH "SEE ALSO"
 .BR mlton (1)



1.32      +311 -102  mlton/mlprof/main.sml

Index: main.sml
===================================================================
RCS file: /cvsroot/mlton/mlton/mlprof/main.sml,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- main.sml	23 Jan 2003 03:17:01 -0000	1.31
+++ main.sml	28 Jan 2003 06:48:56 -0000	1.32
@@ -15,15 +15,9 @@
 
 val sourcesIndexGC: int = 1
 
-structure GraphShow =
-   struct
-      datatype t = Above | All
-   end
-
-val graphShow = ref GraphShow.Above
 val raw = ref false
 val showLine = ref false
-val thresh: int ref = ref 0
+val thresh: real ref = ref 0.0
 
 val die = Process.fail
 
@@ -61,22 +55,34 @@
 	       [(s, Dot.Center)]
    end
 
+structure Graph = DirectedGraph
+local
+   open Graph
+in
+   structure Node = Node
+end
+
 structure AFile =
    struct
-      datatype t = T of {magic: word,
+      datatype t = T of {callGraph: Graph.t,
+			 magic: word,
 			 name: string,
-			 sourceSuccessors: int vector vector,
-			 sources: Source.t vector}
-
-      fun layout (T {magic, name, sourceSuccessors, sources}) =
-	 Layout.record [("name", String.layout name),
-			("magic", Word.layout magic),
-			("sources", Vector.layout Source.layout sources),
-			("sourceSuccessors",
-			 Vector.layout (Vector.layout Int.layout)
-			 sourceSuccessors)]
+			 nodeIndex: Node.t -> int,
+			 sources: {node: Node.t,
+				   source: Source.t} vector}
+
+      fun layout (T {magic, name, sources, ...}) =
+	 Layout.record
+	 [("name", String.layout name),
+	  ("magic", Word.layout magic),
+	  ("sources", Vector.layout (Source.layout o #source) sources)]
 
       fun new {afile: File.t}: t =
+	 if not (File.doesExist afile)
+	    then die (concat [afile, " does not exist"])
+	 else if not (File.canRun afile)
+	    then die (concat ["can not run ", afile])
+	 else
 	 Process.callWithIn
 	 (afile, ["@MLton", "show-prof"],
 	  fn ins =>
@@ -86,28 +92,52 @@
 	     val sourcesLength = valOf (Int.fromString (line ()))
 	     val _ =
 		if 0 = sourcesLength
-		   then die (concat [afile, " not compiled for profiling"])
+		   then die (concat [afile, " was not compiled for profiling"])
 		else ()
+	     val graph = Graph.new ()
+	     val {get = nodeIndex, set = setNodeIndex, ...} =
+		Property.getSetOnce (Node.plist,
+				     Property.initRaise ("index", Node.layout))
 	     val sources =
-		Vector.tabulate (sourcesLength, fn _ =>
-				 Source.fromString
-				 (String.dropSuffix (line (), 1)))
-	     val sourceSuccessors =
 		Vector.tabulate
-		(sourcesLength, fn _ =>
-		 Vector.fromListMap
-		 (String.tokens (line (), Char.isSpace), fn s =>
-		  valOf (Int.fromString s)))
+		(sourcesLength, fn i =>
+		 let
+		    val n = Graph.newNode graph
+		    val _ = setNodeIndex (n, i)
+		 in
+		    {node = n,
+		     source = Source.fromString (String.dropSuffix (line (), 1))}
+		 end)
+	     val _ =
+		Int.for
+		(0, sourcesLength, fn i =>
+		 let
+		    val from = #node (Vector.sub (sources, i))
+		 in
+		    List.foreach
+		    (String.tokens (line (), Char.isSpace), fn s =>
+		     let
+		     val suc = valOf (Int.fromString s)
+		     val _ =
+			Graph.addEdge
+			(graph, {from = from,
+				 to = #node (Vector.sub (sources, suc))})
+		     in
+			()
+		     end)
+		 end)
 	     val _ =
 		case line () of
 		   "" => ()
 		 | _ => Error.bug "mlmon file has extra line"
 	  in
-	     T {magic = magic,
+	     T {callGraph = graph,
+		magic = magic,
 		name = afile,
-		sourceSuccessors = sourceSuccessors,
+		nodeIndex = nodeIndex,
 		sources = sources}
-	  end)
+	  end
+	  handle _ => die (concat [afile, " was not compiled for profiling"]))
    end
 
 structure Kind =
@@ -274,21 +304,195 @@
 	       totalGC = IntInf.+ (g, g')}
    end
 
-structure Graph = DirectedGraph
-local
-   open Graph
-in
-   structure Node = Node
-end
+structure Atomic =
+   struct
+      datatype t =
+	 Name of string * Regexp.Compiled.t
+       | Thresh of real
+
+      val toSexp: t -> Sexp.t =
+	 fn a =>
+	 let
+	    datatype z = datatype Sexp.t
+	 in
+	    case a of
+	       Name (s, _) => String s
+	     | Thresh x => List [Atom "thresh", Atom (Real.toString x)]
+	 end
+   end
+
+structure NodePred =
+   struct
+      datatype t =
+	 All
+       | And of t vector
+       | Atomic of Atomic.t
+       | Not of t
+       | Or of t vector
+       | PathFrom of t
+       | PathTo of t
+
+      val rec toSexp: t -> Sexp.t =
+	 fn p =>
+	 let
+	    datatype z = datatype Sexp.t
+	    fun nAry (name, ps) =
+	       List (Atom name :: Vector.toListMap (ps, toSexp))
+	    fun unary (name, p) =
+	       List [Atom name, toSexp p]
+	 in
+	    case p of
+	       All => Sexp.Atom "all"
+	     | And ps => nAry ("and", ps)
+	     | Atomic a => Atomic.toSexp a
+	     | Not p => unary ("not", p)
+	     | Or ps => nAry ("or", ps)
+	     | PathFrom p => unary ("from", p)
+	     | PathTo p => unary ("to", p)
+	 end
+
+      val layout = Sexp.layout o toSexp
+
+      val fromString: string -> t Result.t =
+	 fn s =>
+	 case Sexp.fromString s of
+	    Sexp.Eof => Result.No "empty"
+	  | Sexp.Error s => Result.No s
+	  | Sexp.Sexp s =>
+	       let
+		  exception Err of string
+		  fun parse (s: Sexp.t): t =
+		     let
+			fun err () = raise Err (Sexp.toString s)
+		     in			   
+			case s of
+			   Sexp.Atom s =>
+			      (case s of
+				  "all" => All
+				| _ => err ())
+			 | Sexp.List ss =>
+			      (case ss of
+				  [] => err ()
+				| s :: ss =>
+				     let
+					fun nAry f =
+					   f (Vector.fromListMap (ss, parse))
+					fun unary f =
+					   case ss of
+					      [s] => f (parse s)
+					    | _ => err ()
+				     in
+					case s of
+					   Sexp.Atom s =>
+					      (case s of
+						  "and" => nAry And
+						| "from" => unary PathFrom
+						| "not" => unary Not
+						| "or" => nAry Or
+						| "thresh" =>
+						     (case ss of
+							 [Sexp.Atom x] =>
+							    (case Real.fromString x of
+								NONE => err ()
+							      | SOME x =>
+								   Atomic (Atomic.Thresh x))
+						       | _ => err ())
+						| "to" => unary PathTo
+						| _ => err ())
+					 | _ => err ()
+				     end)
+			 | Sexp.String s =>
+			      (case Regexp.fromString s of
+				  NONE => err ()
+				| SOME (r, _) =>
+				     Atomic
+				     (Atomic.Name (s, Regexp.compileNFA r)))
+		     end
+	       in
+		  Result.Yes (parse s) handle Err s => Result.No s
+	       end
+
+      fun nodes (p: t, g: Graph.t,
+		 atomic: Node.t * Atomic.t -> bool): Node.t vector =
+	 let
+	    val {get = nodeIndex: Node.t -> int,
+		 set = setNodeIndex, ...} =
+	       Property.getSet (Node.plist,
+				Property.initRaise ("index", Node.layout))
+	    val nodes = Vector.fromList (Graph.nodes g)
+	    val numNodes = Vector.length nodes
+	    val _ = Vector.foreachi (nodes, fn (i, n) => setNodeIndex (n, i))
+	    val transpose =
+	       Promise.lazy
+	       (fn () =>
+		let
+		   val (transpose, {newNode, ...}) = Graph.transpose g
+		   val _ =
+		      Graph.foreachNode
+		      (g, fn n => setNodeIndex (newNode n, nodeIndex n))
+		in
+		   (transpose, newNode)
+		end)
+	    fun vectorToNodes (v: bool vector): Node.t vector =
+	       Vector.keepAllMapi
+	       (v, fn (i, b) =>
+		if b
+		   then SOME (Vector.sub (nodes, i))
+		else NONE)
+	    val all = Promise.lazy (fn () =>
+				    Vector.tabulate (numNodes, fn _ => true))
+	    val none = Promise.lazy (fn () =>
+				     Vector.tabulate (numNodes, fn _ => false))
+	    fun loop (p: t): bool vector =
+	       case p of
+		  All => all ()
+		| And ps =>
+		     Vector.fold (ps, all (), fn (p, v) =>
+				  Vector.map2 (v, loop p, fn (b, b') =>
+					       b andalso b'))
+		| Atomic a => Vector.map (nodes, fn n => atomic (n, a))
+		| Not p => Vector.map (loop p, not)
+		| Or ps =>
+		     Vector.fold (ps, none (), fn (p, v) =>
+				  Vector.map2 (v, loop p, fn (b, b') =>
+					       b orelse b'))
+		| PathFrom p => path (p, (g, fn n => n))
+		| PathTo p => path (p, transpose ())
+	    and path (p: t, (g: Graph.t, getNode)): bool vector =
+	       let
+		  val roots = vectorToNodes (loop p)
+		  val a = Array.array (numNodes, false)
+		  val _ =
+		     Graph.dfsNodes
+		     (g,
+		      Vector.toListMap (roots, getNode),
+		      Graph.DfsParam.startNode (fn n =>
+						Array.update
+						(a, nodeIndex n, true)))
+	       in
+		  Vector.fromArray a
+	       end
+	    val v = loop p
+	 in
+	    vectorToNodes v
+	 end
+   end
+   
+val graphPred: NodePred.t option ref = ref NONE
 
-fun display (AFile.T {name = aname, sources, sourceSuccessors, ...},
+fun display (AFile.T {callGraph, name = aname, sources, ...},
 	     ProfFile.T {counts, kind, total, totalGC, ...}): unit =
    let
-      val {get = nodeOptions: Node.t -> Dot.NodeOption.t list ref, ...} =
-	 Property.get (Node.plist, Property.initFun (fn _ => ref []))
+      val {get = nodeInfo: Node.t -> {keep: bool ref,
+				      mayKeep: (Atomic.t -> bool) ref,
+				      options: Dot.NodeOption.t list ref}, ...} =
+	 Property.get (Node.plist,
+		       Property.initFun (fn _ => {keep = ref false,
+						  mayKeep = ref (fn _ => false),
+						  options = ref []}))
       val graph = Graph.new ()
       val ticksPerSecond = 100.0
-      val thresh = Real.fromInt (!thresh)
+      val thresh = !thresh
       val totalReal = Real.fromIntInf (IntInf.+ (total, totalGC))
       fun per (ticks: IntInf.t): real * string list =
 	 let
@@ -328,43 +532,34 @@
 		per > 0.0
 		andalso (per >= thresh
 			 orelse (not profileStack andalso i = sourcesIndexGC))
-	     val source = Vector.sub (sources, i)
-	     val node =
-		if (case !graphShow of
-		       GraphShow.Above =>
-			  (not profileStack orelse i <> sourcesIndexGC)
-			  andalso per > 0.0
-			  andalso per >= thresh
-		     | GraphShow.All => true)
-		   then
-		      let
-			 val _ =
-			    if debug
-			       then
-				  print (concat ["node for ",
-						 Source.toString source,
-						 "\n"])
-			    else ()
-			 val node = Graph.newNode graph
-			 val no = nodeOptions node
-			 val _ = 
-			    List.push
-			    (no,
-			     Dot.NodeOption.Label
-			     (Source.toDotLabel source
-			      @ (if per > 0.0
-				    then [(concat (List.separate (row, " ")),
-					   Dot.Center)]
-				 else [])))
-			 val _ =
-			    List.push (no, Dot.NodeOption.Shape Dot.Box)
-		      in
-			 SOME node
-		      end
-		else NONE
+	     val {node, source, ...} = Vector.sub (sources, i)
+	     val {mayKeep, options, ...} = nodeInfo node
+	     val _ =
+		mayKeep :=
+		(fn a =>
+		 let
+		    datatype z = datatype Atomic.t
+		 in
+		    case a of
+		       Name (_, rc) =>
+			  (case (Regexp.Compiled.findShort
+				 (rc, Source.toString source, 0)) of
+			      NONE => false
+			    | SOME _ => true)
+		     | Thresh x => per >= x
+		 end)
+	     val _ = 
+		List.push
+		(options,
+		 Dot.NodeOption.Label
+		 (Source.toDotLabel source
+		  @ (if per > 0.0
+			then [(concat (List.separate (row, " ")),
+			       Dot.Center)]
+		     else [])))
+	     val _ = List.push (options, Dot.NodeOption.Shape Dot.Box)
 	  in
-	     {node = node,
-	      sortPer = sortPer,
+	     {sortPer = sortPer,
 	      row = Source.toString source :: row,
 	      showInTable = showInTable}
 	  end)
@@ -395,34 +590,48 @@
 			 row = List.concat [cr, sr, gr],
 			 sortPer = cp}
 		     end)
+      (* Display the subgraph specified by -graph. *)
+      val graphPred =
+	 case !graphPred of
+		 NONE =>
+	       let
+		  datatype z = datatype NodePred.t
+		  datatype z = datatype Atomic.t
+		  val p = Atomic (Thresh thresh)
+	       in
+		  if profileStack
+		     then p
+		  else PathTo p
+	       end
+	  | SOME p => p
+      val keepNodes =
+	 NodePred.nodes
+	 (graphPred, callGraph, fn (n, a) => (! (#mayKeep (nodeInfo n))) a)
+      val _ = Vector.foreach (keepNodes, fn n =>
+			      #keep (nodeInfo n) := true)
+      val (subgraph, {newNode, ...}) =
+	 Graph.subgraph (callGraph, ! o #keep o nodeInfo)
+      val {get = oldNode, set = setOldNode, ...} =
+	 Property.getSetOnce (Node.plist,
+			      Property.initRaise ("old node", Node.layout))
       val _ =
-	 Vector.mapi
-	 (counts,
-	  fn (i, {node, ...}) =>
-	  case node of
-	     NONE => ()
-	   | SOME from =>
-		Vector.foreach
-		(Vector.sub (sourceSuccessors, i), fn j =>
-		 let
-		    val {node, ...} = Vector.sub (counts, j)
-		 in
-		    case node of
-		       NONE => ()
-		     | SOME to =>
-			  (Graph.addEdge (graph, {from = from, to = to})
-			   ; ())
-		 end))
+	 Graph.foreachNode
+	 (callGraph, fn n =>
+	  if !(#keep (nodeInfo n))
+	     then setOldNode (newNode n, n)
+	  else ())
       val _ = 
 	 File.withOut
 	 (concat [aname, ".dot"], fn out =>
 	  Layout.output
-	  (Graph.layoutDot (graph,
+	  (Graph.layoutDot (subgraph,
 			    fn _ => {edgeOptions = fn _ => [],
-				     nodeOptions = ! o nodeOptions,
+				     nodeOptions =
+				     fn n => ! (#options (nodeInfo (oldNode n))),
 				     options = [],
 				     title = "call-stack graph"}),
 	   out))
+      (* Display the table. *)
       val tableRows =
 	 QuickSort.sortVector
 	 (Vector.keepAll (counts, #showInTable),
@@ -477,20 +686,20 @@
       open Popt
    in
       List.map
-      ([(Normal, "graph", " {above|all}", " show graph nodes",
+      ([(Normal, "graph", " <pred>", " show graph nodes",
 	 SpaceString (fn s =>
-		      case s of
-			 "above" => graphShow := GraphShow.Above
-		       | "all" => graphShow := GraphShow.All
-		       | _ => usage "invalid -graph arg")),
+		      case NodePred.fromString s of
+			 Result.No s =>
+			    usage (concat ["invalid -graph arg: ", s])
+		       | Result.Yes p => graphPred := SOME p)),
 	(Normal, "raw", " {false|true}", "show raw counts",
 	 boolRef raw),
 	(Normal, "show-line", " {false|true}", " show line numbers",
 	 boolRef showLine),
 	(Normal, "thresh", " {0|1|...|100}", "only show counts above threshold",
-	 Int (fn i => if i < 0 orelse i > 100
+	 Real (fn x => if x < 0.0 orelse x > 100.0
 			 then usage "invalid -thresh"
-		      else thresh := i))],
+		      else thresh := x))],
        fn (style, name, arg, desc, opt) =>
        {arg = arg, desc = desc, name = name, opt = opt, style = style})
    end



1.7       +27 -18    mlton/mlprof/mlprof-stubs.cm

Index: mlprof-stubs.cm
===================================================================
RCS file: /cvsroot/mlton/mlton/mlprof/mlprof-stubs.cm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mlprof-stubs.cm	7 Jan 2003 16:23:53 -0000	1.6
+++ mlprof-stubs.cm	28 Jan 2003 06:48:56 -0000	1.7
@@ -56,14 +56,26 @@
 ../lib/mlton/basic/substring.sml
 ../lib/mlton/basic/outstream.sig
 ../lib/mlton/basic/outstream.sml
-../lib/mlton/basic/string-map.sig
+../lib/mlton/basic/promise.sig
+../lib/mlton/basic/promise.sml
+../lib/mlton/basic/instream0.sml
 ../lib/mlton/basic/relation.sig
 ../lib/mlton/basic/relation.sml
+../lib/mlton/basic/ring.sig
+../lib/mlton/basic/ring-with-identity.sig
+../lib/mlton/basic/stream.sig
+../lib/mlton/basic/stream.sml
+../lib/mlton/basic/euclidean-ring.sig
+../lib/mlton/basic/integer.sig
+../lib/mlton/basic/ring.fun
+../lib/mlton/basic/ordered-ring.sig
+../lib/mlton/basic/ordered-ring.fun
+../lib/mlton/basic/power.sml
+../lib/mlton/basic/string-map.sig
 ../lib/mlton/basic/order0.sig
 ../lib/mlton/basic/order.sig
 ../lib/mlton/basic/time.sig
 ../lib/mlton/basic/time.sml
-../lib/mlton/basic/instream0.sml
 ../lib/mlton/basic/computation.sig
 ../lib/mlton/basic/intermediate-computation.sig
 ../lib/mlton/basic/intermediate-computation.sml
@@ -79,18 +91,6 @@
 ../lib/mlton/basic/unit.sml
 ../lib/mlton/basic/trace.sig
 ../lib/mlton/basic/trace.sml
-../lib/mlton/basic/ring.sig
-../lib/mlton/basic/ring-with-identity.sig
-../lib/mlton/basic/promise.sig
-../lib/mlton/basic/promise.sml
-../lib/mlton/basic/stream.sig
-../lib/mlton/basic/stream.sml
-../lib/mlton/basic/euclidean-ring.sig
-../lib/mlton/basic/integer.sig
-../lib/mlton/basic/ring.fun
-../lib/mlton/basic/ordered-ring.sig
-../lib/mlton/basic/ordered-ring.fun
-../lib/mlton/basic/power.sml
 ../lib/mlton/basic/ring-with-identity.fun
 ../lib/mlton/basic/bool.sig
 ../lib/mlton/basic/bool.sml
@@ -108,13 +108,13 @@
 ../lib/mlton/basic/vector.sig
 ../lib/mlton/basic/vector.fun
 ../lib/mlton/basic/vector.sml
-../lib/mlton/basic/char.sig
-../lib/mlton/basic/char.sml
 ../lib/mlton/basic/array.sig
 ../lib/mlton/basic/random.sig
 ../lib/mlton/basic/random.sml
 ../lib/mlton/basic/array.fun
 ../lib/mlton/basic/array.sml
+../lib/mlton/basic/char.sig
+../lib/mlton/basic/char.sml
 ../lib/mlton/basic/hash-set.sig
 ../lib/mlton/basic/hash-set.sml
 ../lib/mlton/basic/binary-search.sig
@@ -132,16 +132,23 @@
 ../lib/mlton/basic/dot-color.sml
 ../lib/mlton/basic/dot.sig
 ../lib/mlton/basic/dot.sml
+../lib/mlton/basic/counter.sig
+../lib/mlton/basic/counter.sml
 ../lib/mlton/basic/instream.sig
 ../lib/mlton/basic/instream.sml
 ../lib/mlton/basic/file.sig
 ../lib/mlton/basic/file.sml
-../lib/mlton/basic/counter.sig
-../lib/mlton/basic/counter.sml
 ../lib/mlton/basic/tree.sig
 ../lib/mlton/basic/tree.sml
 ../lib/mlton/basic/directed-graph.sig
 ../lib/mlton/basic/directed-graph.sml
+../lib/mlton/basic/array2.sig
+../lib/mlton/basic/array2.sml
+../lib/mlton/basic/env.sig
+../lib/mlton/basic/env.fun
+../lib/mlton/basic/mono-vector.fun
+../lib/mlton/basic/regexp.sig
+../lib/mlton/basic/regexp.sml
 ../lib/mlton/basic/result.sig
 ../lib/mlton/basic/result.sml
 ../lib/mlton/basic/file-desc.sig
@@ -157,6 +164,8 @@
 ../lib/mlton/basic/insertion-sort.sig
 ../lib/mlton/basic/insertion-sort.sml
 ../lib/mlton/basic/quick-sort.sml
+../lib/mlton/basic/sexp.sig
+../lib/mlton/basic/sexp.sml
 ../lib/mlton/basic/justify.sig
 ../lib/mlton/basic/justify.sml
 ../lib/mlton/basic/popt.sig



1.13      +27 -18    mlton/mlprof/mlprof.cm

Index: mlprof.cm
===================================================================
RCS file: /cvsroot/mlton/mlton/mlprof/mlprof.cm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- mlprof.cm	7 Jan 2003 16:23:54 -0000	1.12
+++ mlprof.cm	28 Jan 2003 06:48:56 -0000	1.13
@@ -27,14 +27,26 @@
 ../lib/mlton/basic/substring.sml
 ../lib/mlton/basic/outstream.sig
 ../lib/mlton/basic/outstream.sml
-../lib/mlton/basic/string-map.sig
+../lib/mlton/basic/promise.sig
+../lib/mlton/basic/promise.sml
+../lib/mlton/basic/instream0.sml
 ../lib/mlton/basic/relation.sig
 ../lib/mlton/basic/relation.sml
+../lib/mlton/basic/ring.sig
+../lib/mlton/basic/ring-with-identity.sig
+../lib/mlton/basic/stream.sig
+../lib/mlton/basic/stream.sml
+../lib/mlton/basic/euclidean-ring.sig
+../lib/mlton/basic/integer.sig
+../lib/mlton/basic/ring.fun
+../lib/mlton/basic/ordered-ring.sig
+../lib/mlton/basic/ordered-ring.fun
+../lib/mlton/basic/power.sml
+../lib/mlton/basic/string-map.sig
 ../lib/mlton/basic/order0.sig
 ../lib/mlton/basic/order.sig
 ../lib/mlton/basic/time.sig
 ../lib/mlton/basic/time.sml
-../lib/mlton/basic/instream0.sml
 ../lib/mlton/basic/computation.sig
 ../lib/mlton/basic/intermediate-computation.sig
 ../lib/mlton/basic/intermediate-computation.sml
@@ -50,18 +62,6 @@
 ../lib/mlton/basic/unit.sml
 ../lib/mlton/basic/trace.sig
 ../lib/mlton/basic/trace.sml
-../lib/mlton/basic/ring.sig
-../lib/mlton/basic/ring-with-identity.sig
-../lib/mlton/basic/promise.sig
-../lib/mlton/basic/promise.sml
-../lib/mlton/basic/stream.sig
-../lib/mlton/basic/stream.sml
-../lib/mlton/basic/euclidean-ring.sig
-../lib/mlton/basic/integer.sig
-../lib/mlton/basic/ring.fun
-../lib/mlton/basic/ordered-ring.sig
-../lib/mlton/basic/ordered-ring.fun
-../lib/mlton/basic/power.sml
 ../lib/mlton/basic/ring-with-identity.fun
 ../lib/mlton/basic/bool.sig
 ../lib/mlton/basic/bool.sml
@@ -79,13 +79,13 @@
 ../lib/mlton/basic/vector.sig
 ../lib/mlton/basic/vector.fun
 ../lib/mlton/basic/vector.sml
-../lib/mlton/basic/char.sig
-../lib/mlton/basic/char.sml
 ../lib/mlton/basic/array.sig
 ../lib/mlton/basic/random.sig
 ../lib/mlton/basic/random.sml
 ../lib/mlton/basic/array.fun
 ../lib/mlton/basic/array.sml
+../lib/mlton/basic/char.sig
+../lib/mlton/basic/char.sml
 ../lib/mlton/basic/hash-set.sig
 ../lib/mlton/basic/hash-set.sml
 ../lib/mlton/basic/binary-search.sig
@@ -103,16 +103,23 @@
 ../lib/mlton/basic/dot-color.sml
 ../lib/mlton/basic/dot.sig
 ../lib/mlton/basic/dot.sml
+../lib/mlton/basic/counter.sig
+../lib/mlton/basic/counter.sml
 ../lib/mlton/basic/instream.sig
 ../lib/mlton/basic/instream.sml
 ../lib/mlton/basic/file.sig
 ../lib/mlton/basic/file.sml
-../lib/mlton/basic/counter.sig
-../lib/mlton/basic/counter.sml
 ../lib/mlton/basic/tree.sig
 ../lib/mlton/basic/tree.sml
 ../lib/mlton/basic/directed-graph.sig
 ../lib/mlton/basic/directed-graph.sml
+../lib/mlton/basic/array2.sig
+../lib/mlton/basic/array2.sml
+../lib/mlton/basic/env.sig
+../lib/mlton/basic/env.fun
+../lib/mlton/basic/mono-vector.fun
+../lib/mlton/basic/regexp.sig
+../lib/mlton/basic/regexp.sml
 ../lib/mlton/basic/result.sig
 ../lib/mlton/basic/result.sml
 ../lib/mlton/basic/file-desc.sig
@@ -128,6 +135,8 @@
 ../lib/mlton/basic/insertion-sort.sig
 ../lib/mlton/basic/insertion-sort.sml
 ../lib/mlton/basic/quick-sort.sml
+../lib/mlton/basic/sexp.sig
+../lib/mlton/basic/sexp.sml
 ../lib/mlton/basic/justify.sig
 ../lib/mlton/basic/justify.sml
 ../lib/mlton/basic/popt.sig





-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel