Re: Resurrecting ticky code

2014-11-06 Thread Mateusz Lenik
On Tue, Nov 04, 2014 at 09:52:23AM +, Simon Peyton Jones wrote:
 We don’t have vectored returns any more, so you can drop that one.

Thanks!

 
 For magic eight there are some native-wordsize constants defined already.
 E.g. see how PrelRules.wordSizeInBits is computed.

As far as I understood that constant in ticky code was associated with number
of bins in the histogram, so I need to find a way to define it both in C and in
Haskell (preferably once). Actually there are nine bins, but eight is the index
of the last one.

Best,
Mateusz

 
 Thanks to Jan for helping
 
 SImon
 
 |  -Original Message-
 |  From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of
 |  Mateusz Lenik
 |  Sent: 03 November 2014 17:19
 |  To: ghc-devs@haskell.org
 |  Subject: Resurrecting ticky code
 |  
 |  Hi *,
 |  
 |  Recently I started working on resurrecting ticky code[1] and got to
 |  the point where I can compile and run bumpHistogram as well as
 |  accompanying code in RTS.
 |  
 |  Work in progress version can be found at [2], but there are few things
 |  remaining to get it working:
 |  
 |  * missing calls to tickyReturnNewCon, tickyUnboxedTupleReturn and
 |tickyVectoredReturn need to be added. Unfortunately I'm not familiar
 |  with the
 |code enough to find the right place to insert them.
 |  
 |  * magic eight needs to be replaced by a constant both Haskell and C
 |  files.
 |Preprocessor macro seems to be the simplest choice here, however I
 |  don't find
 |it the cleanest way to do it.
 |  
 |  I would be very grateful if someone could take a look and point me
 |  into the right direction.
 |  
 |  
 |  Best,
 |  Mateusz
 |  
 |  1: https://ghc.haskell.org/trac/ghc/ticket/8308
 |  2: https://github.com/mlen/ghc/compare/ticky
 |  
 |  --
 |  Mateusz Lenik
 |  GPG: B865 E86A D36C 11A5 C1F8  C1D9 AAD4 CEC9 6B94 92C4

-- 
Mateusz Lenik
GPG: B865 E86A D36C 11A5 C1F8  C1D9 AAD4 CEC9 6B94 92C4


pgpjtex_1fJp0.pgp
Description: PGP signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Resurrecting ticky code

2014-11-06 Thread Jan Stolarek
Mateusz,

I had a moment to take a look at your patch. Here are some hints:

 * missing calls to tickyReturnNewCon, tickyUnboxedTupleReturn and
   tickyVectoredReturn need to be added. Unfortunately I'm not familiar with
 the code enough to find the right place to insert them.
I think that you should look at StgCmmExpr and try to figure out places that we 
might be 
interested in for ticky measurements. For example, I'm looking at cgIdApp and I 
see we're doing 
ticky profiling for SlowCall and DirectEntry but we're not doing it for 
ReturnIt, EnterIt and 
JumpToIt*. I suggest adding ticky profiling there. I think it's possible to 
figure out more 
places where it makes sense to have ticky counters.

 * magic eight needs to be replaced by a constant both Haskell and C files.
   Preprocessor macro seems to be the simplest choice here, however I don't
 find it the cleanest way to do it.
I don't know how to define such a constant - I would have to spent some time to 
try to figure it 
out. Perhaps you can go to #ghc IRC channel and ask there? Usually there are 
some people that 
work on the RTS and might be familiar with how this is done (Edward for 
example).

Oh, and if you're working on a patch please assign yourself as the owner of 
#8308 so that no one 
else starts working on this. If you have a patch for review please submit it 
using Phabricator 
[1].

Janek

[1] https://ghc.haskell.org/trac/ghc/wiki/Phabricator
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


RE: Resurrecting ticky code

2014-11-04 Thread Simon Peyton Jones
We don’t have vectored returns any more, so you can drop that one.

For magic eight there are some native-wordsize constants defined already.
E.g. see how PrelRules.wordSizeInBits is computed.

Thanks to Jan for helping

SImon

|  -Original Message-
|  From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of
|  Mateusz Lenik
|  Sent: 03 November 2014 17:19
|  To: ghc-devs@haskell.org
|  Subject: Resurrecting ticky code
|  
|  Hi *,
|  
|  Recently I started working on resurrecting ticky code[1] and got to
|  the point where I can compile and run bumpHistogram as well as
|  accompanying code in RTS.
|  
|  Work in progress version can be found at [2], but there are few things
|  remaining to get it working:
|  
|  * missing calls to tickyReturnNewCon, tickyUnboxedTupleReturn and
|tickyVectoredReturn need to be added. Unfortunately I'm not familiar
|  with the
|code enough to find the right place to insert them.
|  
|  * magic eight needs to be replaced by a constant both Haskell and C
|  files.
|Preprocessor macro seems to be the simplest choice here, however I
|  don't find
|it the cleanest way to do it.
|  
|  I would be very grateful if someone could take a look and point me
|  into the right direction.
|  
|  
|  Best,
|  Mateusz
|  
|  1: https://ghc.haskell.org/trac/ghc/ticket/8308
|  2: https://github.com/mlen/ghc/compare/ticky
|  
|  --
|  Mateusz Lenik
|  GPG: B865 E86A D36C 11A5 C1F8  C1D9 AAD4 CEC9 6B94 92C4
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: Resurrecting ticky code

2014-11-03 Thread Jan Stolarek
Hi,

I originally reported #8308 so I suppose I could help :-) But I need to find 
some time to take a 
look at your code - the ticket was reported over a year ago and I admit I don't 
remember much. 
I'll take a look at your patch soon (hopefully this week).

Janek

Dnia poniedziałek, 3 listopada 2014, Mateusz Lenik napisał:
 Hi *,

 Recently I started working on resurrecting ticky code[1] and got to the
 point where I can compile and run bumpHistogram as well as accompanying
 code in RTS.

 Work in progress version can be found at [2], but there are few things
 remaining to get it working:

 * missing calls to tickyReturnNewCon, tickyUnboxedTupleReturn and
   tickyVectoredReturn need to be added. Unfortunately I'm not familiar with
 the code enough to find the right place to insert them.

 * magic eight needs to be replaced by a constant both Haskell and C files.
   Preprocessor macro seems to be the simplest choice here, however I don't
 find it the cleanest way to do it.

 I would be very grateful if someone could take a look and point me into the
 right direction.


 Best,
 Mateusz

 1: https://ghc.haskell.org/trac/ghc/ticket/8308
 2: https://github.com/mlen/ghc/compare/ticky


___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs