diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-03-02 10:53:34 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-03-02 11:44:17 +0000 |
commit | 085c7fe5d4ea6e7b59f944d46ecfeba3755a315b (patch) | |
tree | 3de7e3e6306dbf9a8869862266a35a2d0d75d11f /rts/RtsMain.c | |
parent | 27d7d930ff8741f980245da1b895ceaa5294e257 (diff) | |
download | haskell-085c7fe5d4ea6e7b59f944d46ecfeba3755a315b.tar.gz |
Drop the per-task timing stats, give a summary only (#5897)
We were keeping around the Task struct (216 bytes) for every worker we
ever created, even though we only keep a maximum of 6 workers per
Capability. These Task structs accumulate and cause a space leak in
programs that do lots of safe FFI calls; this patch frees the Task
struct as soon as a worker exits.
One reason we were keeping the Task structs around is because we print
out per-Task timing stats in +RTS -s, but that isn't terribly useful.
What is sometimes useful is knowing how *many* Tasks there were. So
now I'm printing a single-line summary, this is for the program in
TASKS: 2001 (1 bound, 31 peak workers (2000 total), using -N1)
So although we created 2k tasks overall, there were only 31 workers
active at any one time (which is exactly what we expect: the program
makes 30 safe FFI calls concurrently).
This also gives an indication of how many capabilities were being
used, which is handy if you use +RTS -N without an explicit number.
Diffstat (limited to 'rts/RtsMain.c')
-rw-r--r-- | rts/RtsMain.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rts/RtsMain.c b/rts/RtsMain.c index 2084435f16..e89445db25 100644 --- a/rts/RtsMain.c +++ b/rts/RtsMain.c @@ -62,8 +62,7 @@ static void real_main(void) Capability *cap = rts_lock(); rts_evalLazyIO(&cap,progmain_closure, NULL); status = rts_getSchedStatus(cap); - taskTimeStamp(myTask()); - rts_unlock(cap); + rts_unlock(cap); } /* check the status of the entire Haskell computation */ |