Re: Write barrier for stack updates?

2018-07-18 Thread Ömer Sinan Ağacan
Ah, this makes so much sense, thanks. I was looking at call sites of recordMutable, recordMutableCap etc. and forgot about recordClosureMutated which is apparently what dirty_STACK calls. Thanks, Ömer Simon Marlow , 18 Tem 2018 Çar, 10:52 tarihinde şunu yazdı: > > Hi Ömer, > > The write barrier

Re: Write barrier for stack updates?

2018-07-18 Thread Simon Marlow
Hi Ömer, The write barrier is the function `dirty_STACK()` here: https://phabricator.haskell.org/diffusion/GHC/browse/master/rts%2Fsm%2FStorage.c$1133-1140 If you grep for `dirty_STACK` you'll see it being called everywhere we mutate a STACK, in particular in the scheduler just before running a

Write barrier for stack updates?

2018-07-17 Thread Ömer Sinan Ağacan
Hi Simon, I'm a bit confused about stack updates in generated code and write barriers. Because stacks are mutable (we push new stuff or maybe even update existing frames?) it seems to me that we need one these two, similar to other mutable objects: - Always keep all stacks in mut_lists - Add