--- gforth/profile.fs 2004/08/23 14:03:52 1.2 +++ gforth/profile.fs 2004/09/03 14:04:47 1.3 @@ -28,13 +28,30 @@ true constant count-calls? \ do some profiling of colon definitions etc. +\ for true COUNT-CALLS?: + +\ What data do I need for evaluating the effectiveness of (partial) inlining? + +\ static and dynamic counts of everything: + +\ original BB length (histogram and average) +\ BB length with partial inlining (histogram and average) +\ since we cannot partially inline library calls, we use a parameter +\ that represents the amount of partial inlining we can expect there. +\ number of tail calls (original and after partial inlining) +\ number of calls (original and after partial inlining) +\ reason for BB end: call, return, execute, branch + +\ how many static calls are there to a word? How many of the dynamic +\ calls call just a single word? + struct cell% field profile-next cell% 2* field profile-count cell% 2* field profile-sourcepos cell% field profile-char \ character position in line count-calls? [if] - cell% field profile-colondef? \ is this a colon definition + cell% field profile-colondef? \ is this a colon definition start cell% field profile-calls \ static calls to the colon def cell% field profile-straight-line \ may contain calls, but no other CF cell% field profile-calls-from \ static calls in the colon def @@ -155,8 +172,8 @@ Defer before-word-profile ( -- ) r> ! ; \ change hook behaviour hook-profiling-into then-like -\ hook-profiling-into if-like -\ hook-profiling-into ahead-like +\ hook-profiling-into if-like \ subsumed by other-control-flow +\ hook-profiling-into ahead-like \ subsumed by other-control-flow hook-profiling-into other-control-flow hook-profiling-into begin-like hook-profiling-into again-like