Verified Commit adac3d22 authored by Camil Staps's avatar Camil Staps 🚀

Add profiler_calls field (to correct for overhead in the future)

parent 0a96d6af
......@@ -35,6 +35,7 @@ import qualified Text.HTML
, children :: ![Stack]
, cumulative_ticks :: !Int // Filled in by this application
, cumulative_words :: !Int // Filled in by this application
, profiler_calls :: !Int // Filled in by this application
}
:: Options =
......@@ -161,6 +162,8 @@ where
| not ok = (unexpected_eof,f)
# (ok,words,f) = read_var_width_int f
| not ok = (unexpected_eof,f)
# (ok,tail_and_return_calls,f) = read_var_width_int f
| not ok = (unexpected_eof,f)
# (ok,scalls,f) = read_var_width_int f
| not ok = (unexpected_eof,f)
# (ok,lcalls,f) = read_var_width_int f
......@@ -181,6 +184,7 @@ where
, children = fromOk children
, cumulative_ticks = -1
, cumulative_words = -1
, profiler_calls = tail_and_return_calls+scalls+lcalls+ccalls
}
= (Ok profile,f)
where
......@@ -268,6 +272,7 @@ lift_garbage_collector cost_centre_id s
, children = []
, cumulative_ticks = ticks
, cumulative_words = 0
, profiler_calls = 2*calls
}
where
walk :: !Stack !Int !Int -> (!Stack, !(!Int,!Int))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment