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

Ömer Sinan Ağacan omeragacan at gmail.com
Sun May 18 14:20:46 UTC 2014


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 missing in generated STG.

>> There is also something like `CCCS` in generated STG but I have no
>> ideas about this.
>
> That's simply "current cost-centre stack". I like to think that the hint
> of silliness was intentional.

Yes, but I'm wondering what does that syntax in STG mean
operationally? For example, here's some part of generated STG:

    let {
      sat_s2OT [Occ=Once] :: GHC.Integer.Type.Integer
      [LclId, Str=DmdType] =
          CCCS GHC.Integer.Type.S#! [0];
    }

What does "CCCS" stand for here? I guess in long term it'd be best for
me to learn Cmm and see the generated code for this syntax to
understand what does it really do.(assuming Cmm has better
documentation that STG :) )

> Sure. Better place for quick queries might be #ghc on FreeNode though -
> my nick is petermw.

Great, my nick is osa1 and I'll be pinging you for short questions.
Thanks again!

---
Ömer Sinan Ağacan
http://osa1.net


More information about the ghc-devs mailing list