Why we need CCS entries in apply functions (rts/Apply.cmm and rts/StgStdThunks.cmm)

Ömer Sinan Ağacan omeragacan at gmail.com
Tue Jul 1 18:27:08 UTC 2014


Hi all,

Code for entering cost-centres before executing the function/thunk
body is generated in `compiler/codeGen/StgCmmBind.hs`, by `thunkCode`
and `closureCodeBody` functions. But we also have some
`enterCostCentreThunk` and `enterCostCentreFun` calls in
`rts/Apply.cmm` and `rts/StgStdThunks.cmm`. I'm wondering why are
those necessary. Thunk/function bodies already have CCS entries
generated by functions in StgCmmBind so I'm having trouble seeing the
need for this additional entries.

Can anyone explain those to me?

Thanks,

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


More information about the ghc-devs mailing list