Re: linker_unload validate related issue (how to duplicate that?).

2014-08-07 Thread Karel Gardas
Hi Edward, thanks for dealing with this. I've found a little bit different reason. validate runs with ghc installed in bindisttest/install dir/ and the tests invokes ghc-pkg to get gmp library path. The dir above is then returned quoted: ./install dir/. What I did in my

Improving the Int/Word story inside GHC

2014-08-07 Thread Johan Tibell
Inside GHC we mostly use Int instead of Word, even when we want to represent non-negative values, such as sizes of things or indices into things. This is now causing some grief in https://ghc.haskell.org/trac/ghc/ticket/9416, where an allocation boundary case test fails with a segfault because a n

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Edward Z . Yang
If it's strictly just in the codegen (and not affecting user code), seems fine to me. Edward Excerpts from Johan Tibell's message of 2014-08-07 12:10:37 +0100: Inside GHC we mostly use Int instead of Word, even when we want to represent non-negative values, such as sizes of things or indices

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Johan Tibell
Simon M, is the intention of ByteOff and WordOff that they should be able to represent negative quantities as well? If so we might need to split it into ByteOff (still an Int) and ByteIndex (a Word) to have a type for indexing into arrays. On Thu, Aug 7, 2014 at 1:16 PM, Edward Z. Yang

RE: Improving the Int/Word story inside GHC

2014-08-07 Thread Simon Peyton Jones
I’m all for it! I believe that ByteOff/WordOff are always 0 or positive. At least, they were when I introduced them! SImon From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Johan Tibell Sent: 07 August 2014 12:21 To: Simon Marlow Cc: ghc-devs@haskell.org Subject: Re:

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Johan Tibell
I'm hacking on this now. I'm not 100% sure that ByteOff isn't used for negative values though, see for example mkTaggedObjectLoad :: DynFlags - LocalReg - LocalReg - ByteOff - DynTag - CmmAGraph -- (loadTaggedObjectField reg base off tag) generates assignment -- reg = bitsK[ base + off -

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Edward Z . Yang
Yes, in particular if the offset is zero. Morally, however, we're just doing this to clear the tag bit. Edward Excerpts from Johan Tibell's message of 2014-08-07 14:45:43 +0100: I'm hacking on this now. I'm not 100% sure that ByteOff isn't used for negative values though, see for example

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Johan Tibell
I guess this example, from mk_switch in StgCmmUtils, is the same return (mkSwitch (cmmOffset dflags tag_expr (- real_lo_tag)) arms) ? (This is clearly a negative offset and I don't know the implications of the Cmm code we output if we switch to ByteOff = Word) On Thu, Aug 7, 2014 at 3:49

New docs about tracking down regressions in GHC

2014-08-07 Thread Edward Z . Yang
I recently spent some time debugging a performance regression in Haddock, and came up with some useful tips and tricks for tracking these things down in GHC. I wrote them up here: https://ghc.haskell.org/trac/ghc/wiki/Debugging/ProfilingGhc Please take a look. Thanks, Edward

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Johan Tibell
I've uploaded https://phabricator.haskell.org/D125 to give an idea of what such a change might look like. I'm not quite done with the change (it's quite a chore) but the commit gives and idea of what such a change might look like. I'm still not convinced that making ByteOff a Word is the right

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Simon Marlow
Hmm, surely these are used for negative offsets a lot? All Hp-relative indices are negative (but virtual Hp offsets are positive), and Sp-relative indices can be both negative and positive. On 07/08/2014 12:49, Simon Peyton Jones wrote: I’m all for it! I believe that ByteOff/WordOff are

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Simon Marlow
On 07/08/2014 12:10, Johan Tibell wrote: Inside GHC we mostly use Int instead of Word, even when we want to represent non-negative values, such as sizes of things or indices into things. This is now causing some grief in https://ghc.haskell.org/trac/ghc/ticket/9416, where an allocation boundary

Re: Perf regression: ghc --make: add nicer names to RTS threads (threaded IO manager, make workers) (f686682)

2014-08-07 Thread Simon Marlow
On 06/08/2014 21:40, Sergei Trofimovich wrote: I think I know what happens. According to perf the benchmark spends 34%+ of time in garbage collection ('perf record -- $args'/'perf report'): 27,91% test test [.] evacuate 9,29% test test [.] s9Lz_info

Re: Overlapping and incoherent instances

2014-08-07 Thread Stephen Paul Weber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I suppose that -XOverlappingInstances could mean silently honour OVERLAPPABLE/OVERLAPPING pragmas, while lacking it would mean honour OVERLAPPABLE/OVERLAPPING pragmas, but emit noisy warnings or even don't honour them and warn. But that is

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Johan Tibell
On Thu, Aug 7, 2014 at 4:36 PM, Simon Marlow marlo...@gmail.com wrote: I think doing the comparison with Integer is the right fix. Relying on Word being big enough for these things is technically wrong because we might be cross-compiling from a smaller word size. That sounds like an easier

biographical profiling is broken?

2014-08-07 Thread Ömer Sinan Ağacan
Hi all, I'm trying to use LDV profiling features of GHC but I'm failing. Here's what I try: (I'm using GHC 7.8.2) * I'm compiling my app with `-prof` and I'm also using `-fprof-auto` just to be sure. * I'm running my app using `+RTS -hbdrag,void` as described in the docs.

arc diff linter looping / stuck

2014-08-07 Thread Richard Eisenberg
Hi all, I've prepared a bunch of commits to fix several tickets. After pushing these commits to branch wip/rae (to save my place and to get validate running on Travis), I then `git checkout`ed back to a point where `git diff origin/master` gave me a patch for precisely one bug (instead of the

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Simon Marlow
On 07/08/14 15:45, Simon Peyton Jones wrote: When I introduced them in the first place they were used for positive offsets within StackAreas and heap objects. Both are organised with the zeroth byte of the stack area or heap object being at the lowest address. It's true that a positive

Re: Improving the Int/Word story inside GHC

2014-08-07 Thread Simon Marlow
On 07/08/14 16:01, Johan Tibell wrote: On Thu, Aug 7, 2014 at 4:36 PM, Simon Marlow marlo...@gmail.com wrote: I think doing the comparison with Integer is the right fix. Relying on Word being big enough for these things is technically wrong because we might be cross-compiling from a smaller

RE: Improving the Int/Word story inside GHC

2014-08-07 Thread Simon Peyton Jones
| One thought is that the profiling word appears just *before* the start | of a heap object, so that might need a negative offset, but it seems like | a rather special case. | | Hmmm... the profiling word is the second word of the object, after the | info pointer. Oh, OK, I'm mis-remembering

RE: arc diff linter looping / stuck

2014-08-07 Thread Simon Peyton Jones
I'm off on holiday for a week, but you and I have discussed most of these changes, some at length. If you are happy with your implementation, then go ahead and commit, from my pov. I did take a quick look though. For #9200 and TcTyClsDecls, I think you have implemented Possible new strategy

Re: ARM64 Task Force

2014-08-07 Thread Luke Iannini
Hi all, An update on this -- I've made a bit of progress thanks to Karel and Colin's start at ARM64 support https://ghc.haskell.org/trac/ghc/ticket/7942 With a few tweaks*, that let me build a GHC that builds ARM64 binaries and load them onto my iPad Air, which is great! But of course they don't

Re: Building GHC under Wine?

2014-08-07 Thread Mateusz Kowalczyk
On 07/16/2014 12:55 AM, Joachim Breitner wrote: Hi, I feel sorry for Simon always repeatedly stuck with an unbuildable tree, and an idea crossed my mind: Can we build¹ GHC under Wine? If so, is it likely to catch the kind of problems that Simon is getting? If so, maybe it runs fast enough

Moving Haddock *development* out of GHC tree

2014-08-07 Thread Mateusz Kowalczyk
Hello, A slightly long e-mail but I ask that you voice your opinion if you ever changed GHC API. You can skim over the details, simply know that it saves me vast amount of time, allows me to try and find contributors and doesn't impact GHC negatively. It seems like a win-win scenario for GHC and

Re: Building GHC under Wine?

2014-08-07 Thread Mateusz Kowalczyk
On 08/08/2014 07:21 AM, Alexander Kjeldaas wrote: Microsoft has free VMs for testing purposes. It expires after 90 days and the only relevant limitation that i see is that it's not licensed for a live operating environment. That might or might not exclude Travis, but scripting a test that

Re: Building GHC under Wine?

2014-08-07 Thread Alexander Kjeldaas
On Aug 8, 2014 7:27 AM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk wrote: On 08/08/2014 07:21 AM, Alexander Kjeldaas wrote: Microsoft has free VMs for testing purposes. It expires after 90 days and the only relevant limitation that i see is that it's not licensed for a live operating

Re: Building GHC under Wine?

2014-08-07 Thread Luite Stegeman
Yes it's a regular Windows installation, it just comes with an IEUser account preinstalled. I've been using it to test GHCJS on Windows (but not for automatic builds yet, just manual test runs). luite On Fri, Aug 8, 2014 at 7:27 AM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk wrote: On

Re: Building GHC under Wine?

2014-08-07 Thread Alexander Kjeldaas
Microsoft has free VMs for testing purposes. It expires after 90 days and the only relevant limitation that i see is that it's not licensed for a live operating environment. That might or might not exclude Travis, but scripting a test that developers can run personally should be allowed.

Re: ARM64 Task Force

2014-08-07 Thread Karel Gardas
On 08/ 8/14 01:58 AM, Luke Iannini wrote: I'm now studying David's patches to LLVM to learn how to add the ARM64/GHC calling convention to LLVM. Here is also original ARM/GHC calling convention submission. It's always good to have more examples as reference...