# HG changeset patch # User wenzelm # Date 1191525066 -7200 # Node ID 30da58e0a483a778e7ae0cd3d786ded5fd4e3792 # Parent 4e304aac841af214a598a3cbe9d7536cdb09c86a single-threaded profiling; diff -r 4e304aac841a -r 30da58e0a483 src/Pure/ML-Systems/polyml-5.1.ML --- a/src/Pure/ML-Systems/polyml-5.1.ML Thu Oct 04 21:10:41 2007 +0200 +++ b/src/Pure/ML-Systems/polyml-5.1.ML Thu Oct 04 21:11:06 2007 +0200 @@ -10,6 +10,16 @@ val pointer_eq = PolyML.pointerEq; +(* single-threaded profiling *) + +local val profile_orig = profile in + +fun profile 0 f x = f x + | profile n f x = NAMED_CRITICAL "profile" (fn () => profile_orig n f x); + +end; + + (* improved versions of use_text/file *) fun use_text (tune: string -> string) name (print, err) verbose txt =