From d6297149dd0c8f4e7071692de38d87289b27639c Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 12 May 2000 13:12:56 +0000 Subject: [PATCH] [project @ 2000-05-12 13:12:56 by simonmar] Update for changes in the profile output. --- ghc/docs/users_guide/profiling.sgml | 69 +++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/ghc/docs/users_guide/profiling.sgml b/ghc/docs/users_guide/profiling.sgml index 30175ae..0069d7a 100644 --- a/ghc/docs/users_guide/profiling.sgml +++ b/ghc/docs/users_guide/profiling.sgml @@ -81,7 +81,7 @@ $ will contain something like this: - Tue Apr 18 12:52 2000 Time and Allocation Profiling Report (Final) + Fri May 12 14:06 2000 Time and Allocation Profiling Report (Final) Main +RTS -p -RTS @@ -93,15 +93,16 @@ COST CENTRE MODULE %time %alloc nfib Main 100.0 100.0 -COST CENTRE MODULE scc %time %alloc inner cafs + individual inherited +COST CENTRE MODULE scc %time %alloc %time %alloc -MAIN MAIN 0 0.0 0.0 0 1 - main Main 0 0.0 0.0 0 1 - CAF PrelHandle 3 0.0 0.0 0 3 - CAF PrelAddr 1 0.0 0.0 0 0 - CAF Main 6 0.0 0.0 1 0 - main Main 1 0.0 0.0 1 1 - nfib Main 242785 100.0 100.0 242784 4 +MAIN MAIN 0 0.0 0.0 100.0 100.0 + main Main 0 0.0 0.0 0.0 0.0 + CAF PrelHandle 3 0.0 0.0 0.0 0.0 + CAF PrelAddr 1 0.0 0.0 0.0 0.0 + CAF Main 6 0.0 0.0 100.0 100.0 + main Main 1 0.0 0.0 100.0 100.0 + nfib Main 242785 100.0 100.0 100.0 100.0 @@ -125,6 +126,12 @@ MAIN MAIN 0 0.0 0.0 0 1 the costly call to nfib came from main. + The time and allocation incurred by a given part of the + program is displayed in two ways: “individual”, which + are the costs incurred by the code covered by this cost centre + stack alone, and “inherited”, which includes the costs + incurred by all the children of this node. + The usefulness of cost-centre stacks is better demonstrated by modifying the example slightly: @@ -139,18 +146,18 @@ nfib n = if n < 2 then 1 else nfib (n-1) + nfib (n-2) the new profiling results: -COST CENTRE MODULE scc %time %alloc inner cafs - -MAIN MAIN 0 0.0 0.0 0 1 - main Main 0 0.0 0.0 0 1 - CAF PrelHandle 3 0.0 0.0 0 3 - CAF PrelAddr 1 0.0 0.0 0 0 - CAF Main 9 0.0 0.0 1 1 - main Main 1 0.0 0.0 2 2 - g Main 1 0.0 0.0 1 3 - nfib Main 465 0.0 0.2 464 0 - f Main 1 0.0 0.0 1 1 - nfib Main 242785 100.0 99.8 242784 1 +COST CENTRE MODULE scc %time %alloc %time %alloc + +MAIN MAIN 0 0.0 0.0 100.0 100.0 + main Main 0 0.0 0.0 0.0 0.0 + CAF PrelHandle 3 0.0 0.0 0.0 0.0 + CAF PrelAddr 1 0.0 0.0 0.0 0.0 + CAF Main 9 0.0 0.0 100.0 100.0 + main Main 1 0.0 0.0 100.0 100.0 + g Main 1 0.0 0.0 0.0 0.2 + nfib Main 465 0.0 0.2 0.0 0.2 + f Main 1 0.0 0.0 100.0 99.8 + nfib Main 242785 100.0 99.8 100.0 99.8 Now although we had two calls to nfib @@ -161,7 +168,7 @@ MAIN MAIN 0 0.0 0.0 0 1 - scc + entries The number of times this particular point in the call graph was entered. @@ -169,7 +176,7 @@ MAIN MAIN 0 0.0 0.0 0 1 - %time + individual %time The percentage of the total run time of the program spent at this point in the call graph. @@ -177,7 +184,7 @@ MAIN MAIN 0 0.0 0.0 0 1 - %alloc + individual %alloc The percentage of the total memory allocations (excluding profiling overheads) of the program made by this @@ -186,19 +193,19 @@ MAIN MAIN 0 0.0 0.0 0 1 - inner + inherited %time - The number of times an inner call-graph context was - entered from here (including recursive calls). + The percentage of the total run time of the program + spent below this point in the call graph. - cafs + inherited %alloc - The number of times a CAF context was entered from - here. CAFs are described in . + The percentage of the total memory allocations + (excluding profiling overheads) of the program made by this + call and all of its sub-calls. -- 1.7.10.4