summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-08-10 22:24:29 +0100
committerIan Lynagh <ian@well-typed.com>2012-08-10 22:24:29 +0100
commit86ba77014c1a8111ab723fa81b1523003de0d6c8 (patch)
tree753013008c7dafa421ab162a9127dde2e1b8b7c6
parent54fccb5255909c9f64d6b5e20b5e1948dab7f24a (diff)
downloadhaskell-86ba77014c1a8111ab723fa81b1523003de0d6c8.tar.gz
Make startProfTimer and stopProfTimer available via GHC.Profiling
This allows the programmer to profile only part of a program's runtime, for example, ignoring startup and shutdown phases of programs.
-rw-r--r--libraries/base/GHC/Profiling.hs5
-rw-r--r--libraries/base/base.cabal1
2 files changed, 6 insertions, 0 deletions
diff --git a/libraries/base/GHC/Profiling.hs b/libraries/base/GHC/Profiling.hs
new file mode 100644
index 0000000000..23ef4ce66c
--- /dev/null
+++ b/libraries/base/GHC/Profiling.hs
@@ -0,0 +1,5 @@
+
+module GHC.Profiling where
+
+foreign import ccall startProfTimer :: IO ()
+foreign import ccall stopProfTimer :: IO ()
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index b564de4e80..36b8708593 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -92,6 +92,7 @@ Library {
GHC.Num,
GHC.PArr,
GHC.Pack,
+ GHC.Profiling,
GHC.Ptr,
GHC.Read,
GHC.Real,