Re: Questions about time and space profiling for non-strict langs paper and cost centre impl. of GHC

2014-05-21 Thread Simon Marlow
On 18/05/2014 15:20, Ömer Sinan Ağacan wrote: Thanks again for the answer. Not sure what _call_ is suppose to be. What's the context? In Simon Marlow's slides, stack traces are implemented in terms of call and push operations. I guess `push` in STG syntax is stands for push operation

Re: Questions about time and space profiling for non-strict langs paper and cost centre impl. of GHC

2014-05-18 Thread Ömer Sinan Ağacan
Thanks Peter. Simon Marlow's talk was really interesting. After reading the slides I read related GHC code and realized that cost-centre stack and the stack trace printed using GHC.Stack is same thing. `libraries/base/GHC/Stack.hsc` has this definition: currentCallStack :: IO [String]

Re: Questions about time and space profiling for non-strict langs paper and cost centre impl. of GHC

2014-05-18 Thread Peter Wortmann
Ömer Sinan Ağacan wrote: (off-topic: I'm wondering why an empty tuple is passed to `getCurrentCSS`?) See the comment on getCurrentCCS# in compiler/prelude/primops.txt.pp - it's a token to prevent GHC optimisations from floating the primop up (which obviously might change the call stack). Now

Re: Questions about time and space profiling for non-strict langs paper and cost centre impl. of GHC

2014-05-18 Thread Ömer Sinan Ağacan
Thanks again for the answer. Not sure what _call_ is suppose to be. What's the context? In Simon Marlow's slides, stack traces are implemented in terms of call and push operations. I guess `push` in STG syntax is stands for push operation explained in the slides but as far as I can see call is

Questions about time and space profiling for non-strict langs paper and cost centre impl. of GHC

2014-05-15 Thread Ömer Sinan Ağacan
Hi all, I'm trying to understand the paper Time and space profiling for non-strict, higher-order functional languages[1] and I'm hoping that experienced GHC devs here could help me clarifying some points. Here's my question: In Figure 5, I don't understand why no costs are attributed to `app2`

Re: Questions about time and space profiling for non-strict langs paper and cost centre impl. of GHC

2014-05-15 Thread Peter Wortmann
Ömer Sinan Ağacan wrote: To me it looks like that there should be two costs attributed in application rules. First cost is evaluation of the function part(which should be attributed in `app1` rule) and second is substitution part, which should be attributed in `app2` rule but according to