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 ...@@ -35,6 +35,7 @@ import qualified Text.HTML
, children :: ![Stack] , children :: ![Stack]
, cumulative_ticks :: !Int // Filled in by this application , cumulative_ticks :: !Int // Filled in by this application
, cumulative_words :: !Int // Filled in by this application , cumulative_words :: !Int // Filled in by this application
, profiler_calls :: !Int // Filled in by this application
} }
:: Options = :: Options =
...@@ -161,6 +162,8 @@ where ...@@ -161,6 +162,8 @@ where
| not ok = (unexpected_eof,f) | not ok = (unexpected_eof,f)
# (ok,words,f) = read_var_width_int f # (ok,words,f) = read_var_width_int f
| not ok = (unexpected_eof,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 # (ok,scalls,f) = read_var_width_int f
| not ok = (unexpected_eof,f) | not ok = (unexpected_eof,f)
# (ok,lcalls,f) = read_var_width_int f # (ok,lcalls,f) = read_var_width_int f
...@@ -181,6 +184,7 @@ where ...@@ -181,6 +184,7 @@ where
, children = fromOk children , children = fromOk children
, cumulative_ticks = -1 , cumulative_ticks = -1
, cumulative_words = -1 , cumulative_words = -1
, profiler_calls = tail_and_return_calls+scalls+lcalls+ccalls
} }
= (Ok profile,f) = (Ok profile,f)
where where
...@@ -268,6 +272,7 @@ lift_garbage_collector cost_centre_id s ...@@ -268,6 +272,7 @@ lift_garbage_collector cost_centre_id s
, children = [] , children = []
, cumulative_ticks = ticks , cumulative_ticks = ticks
, cumulative_words = 0 , cumulative_words = 0
, profiler_calls = 2*calls
} }
where where
walk :: !Stack !Int !Int -> (!Stack, !(!Int,!Int)) 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