- 02 Dec, 2011 4 commits
-
-
Ian Lynagh authored
-
Ian Lynagh authored
-
Ian Lynagh authored
When they existed, they were getting included in the includes_H_FILES variable (as it uses wildcard to find all header files). But the .depends files for the programs that generate the headers depend on $(includes_H_FILES), so the .depends files looked out-of-date once the headers had been created. This caused unnecessary make reinvocations. So now we put them in dist* directories, where they ought to be anyway.
-
Ian Lynagh authored
With Windows 7 in a vitrual box VM on OS X, some very odd things happen with dates and time stamps when SSHing into cygwin. e.g. here the "Change" time is in the past: $ date; touch foo; stat foo Fri Dec 2 16:58:07 GMTST 2011 File: `foo' Size: 0 Blocks: 0 IO Block: 65536 regular empty file Device: 540aba0bh/1409989131d Inode: 562949953592977 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ ian) Gid: ( 513/ None) Access: 2011-12-02 16:58:07.414457900 +0000 Modify: 2011-12-02 16:58:07.414457900 +0000 Change: 2011-12-02 16:58:03.495141800 +0000 Birth: 2011-12-02 16:57:57.731469900 +0000 And if we copy such a file, then the copy is older (as determined by the "Modify" time) than the original: $ date; touch foo; stat foo; cp foo bar; stat bar Fri Dec 2 16:59:10 GMTST 2011 File: `foo' Size: 0 Blocks: 0 IO Block: 65536 regular empty file Device: 540aba0bh/1409989131d Inode: 1407374883725128 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ ian) Gid: ( 513/ None) Access: 2011-12-02 16:59:10.118457900 +0000 Modify: 2011-12-02 16:59:10.118457900 +0000 Change: 2011-12-02 16:59:06.189477700 +0000 Birth: 2011-12-02 16:57:57.731469900 +0000 File: `bar' Size: 0 Blocks: 0 IO Block: 65536 regular empty file Device: 540aba0bh/1409989131d Inode: 281474976882512 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ ian) Gid: ( 513/ None) Access: 2011-12-02 16:59:06.394555800 +0000 Modify: 2011-12-02 16:59:06.394555800 +0000 Change: 2011-12-02 16:59:06.395532400 +0000 Birth: 2011-12-02 16:58:40.921899600 +0000 This means that make thinks that things are out of date when it shouldn't, so reinvokes itself repeatedly until the MAKE_RESTARTS infinite-recursion test triggers. The touchy program, like most other programs, creates files with both Modify and Change in the past, which is still a little odd, but is consistent, so doesn't break make.
-
- 01 Dec, 2011 5 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
The parallel GC was using setContextSwitches() to stop all the other threads, which sets the context_switch flag on every Capability. That had the side effect of causing every Capability to also switch threads, and since GCs can be much more frequent than context switches, this increased the context switch frequency. When context switches are expensive (because the switch is between two bound threads or a bound and unbound thread), the difference is quite noticeable. The fix is to have a separate flag to indicate that a Capability should stop and return to the scheduler, but not switch threads. I've called this the "interrupt" flag.
-
Simon Marlow authored
-
Simon Marlow authored
Spotted by gdb's malloc debugger while I was looking for something else.
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@mit.edu>
-
- 30 Nov, 2011 9 commits
-
-
Ian Lynagh authored
When getting options from basicTypes/RdrName.lhs, we were seeing text like "-- |\n-- ...\n" in the buffer, and lexer then recognises "-- |\n-- ..." as a complete ITdocCommentNext token, with the end of the buffer not reached. Next time round, when we get more input into the buffer, it started "\n-- * 'Var.Var': see", so the lexer gave us an ITdocSection token. However, getOptions' only knew about ITdocCommentNext, and so it stopped at that point, and didn't see the pragmas further down the file. This caused the build to fail due to -fwarn-tabs not being turned off. But actually, we don't really want the haddock docs at this point, so now we just unset Opt_Haddock in getOptionsFromFile.
-
Ian Lynagh authored
-
Simon Marlow authored
I tried this out on the panic we're currently getting for #3103: ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.3.20111128 for x86_64-unknown-linux): tcIfaceGlobal (local): not found: base:GHC.Word.W#{d 6w} [(32R, Type constructor `base:GHC.Word.Word{tc 32R}'), (r6O, Identifier `base:GHC.Word.$fNumWord{v r6O}'), (r6P, Identifier `base:GHC.Word.$fEqWord{v r6P}'), (r6Q, Identifier `base:GHC.Word.$fNumWord1{v r6Q}'), (r6R, Identifier `base:GHC.Word.$fNumWord2{v r6R}'), (r6S, Data constructor `base:GHC.Word.W#{d r6S}'), (r6U, Identifier `base:GHC.Word.W#{v r6U}'), (r75, Identifier `base:GHC.Word.$fNumWord_$csignum{v r75}'), (r76, Identifier `base:GHC.Word.$fEqWord_$c/={v r76}'), (r77, Identifier `base:GHC.Word.$fEqWord_$c=={v r77}')] { Main.main GHC.defaultErrorHandler GHC.runGhc GhcMonad.>>= GhcMonad.>>=.\ Main.main' Main.doMake GhcMake.load GhcMake.load2 GhcMake.upsweep GhcMake.upsweep.upsweep' GhcMake.reTypecheckLoop GhcMake.typecheckLoop GhcMake.typecheckLoop.\ TcRnMonad.initIfaceCheck TcRnMonad.initTcRnIf IOEnv.runIOEnv IOEnv.thenM IOEnv.thenM.\ TcIface.typecheckIface TcIface.typecheckIface.\ LoadIface.loadDecls LoadIface.loadDecl TcIface.tcIfaceDecl TcIface.tc_iface_decl TcIface.tcIdInfo MonadUtils.foldlM TcIface.tcIdInfo.tcPrag TcIface.tcUnfolding TcIface.tcPragExpr TcIface.tcIfaceExpr TcIface.tcIfaceAlt TcIface.tcIfaceDataCon }
-
Simon Marlow authored
- add getCCSOf# :: a -> State# s -> (# State# s, Addr# #) (returns the CCS attached to the supplied object) - remove traceCcs# (obsoleted by getCCSOf#) - rename getCCCS# to getCurrentCCS#
-
Simon Marlow authored
-
Simon Marlow authored
-
http://darcs.haskell.org/ghcIan Lynagh authored
-
Ian Lynagh authored
-
-
- 29 Nov, 2011 17 commits
-
-
-
Ian Lynagh authored
We now put the before and after filenames into a tree structure, which vastly improves performance when simulating the delete commands.
-
http://darcs.haskell.org//ghcdimitris authored
-
dimitris authored
-
-
Simon Peyton Jones authored
We were generating them from the tcg_tcs field of the TcGblEnv, but that goes badly wrong when there are top-level Template Haskell splices, because the tcg_tcs field grows successively. If we generate record-selector binds for all the TyCons in the accumulated list, we generate them multiple times for TyCons earlier in the program. This what was happening in Trac #5665: data T = T { x :: Int } $(f 4) -- Top level splice ..more code.. Here the record selector bindings for T were being generated twice. Better instead to generate the record-selector bindings in TcTyClsDecls, right where the new TyCons are being declared (as indeed they were some time ago). This pushed me into doing some refactoring: instead of returning the record bindings, tcTyAndClassDecls adds them to the tcg_binds field of the TcGblEnv. I think the result is a bit nicer, and it has the additional merit of working.
-
Simon Marlow authored
Returns a pointer to the current cost-centre stack when profiling, NULL otherwise.
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
This means that both time and heap profiling work for parallel programs. Main internal changes: - CCCS is no longer a global variable; it is now another pseudo-register in the StgRegTable struct. Thus every Capability has its own CCCS. - There is a new built-in CCS called "IDLE", which records ticks for Capabilities in the idle state. If you profile a single-threaded program with +RTS -N2, you'll see about 50% of time in "IDLE". - There is appropriate locking in rts/Profiling.c to protect the shared cost-centre-stack data structures. This patch does enough to get it working, I have cut one big corner: the cost-centre-stack data structure is still shared amongst all Capabilities, which means that multiple Capabilities will race when updating the "allocations" and "entries" fields of a CCS. Not only does this give unpredictable results, but it runs very slowly due to cache line bouncing. It is strongly recommended that you use -fno-prof-count-entries to disable the "entries" count when profiling parallel programs. (I shall add a note to this effect to the docs).
-
Simon Peyton Jones authored
-
Simon Marlow authored
-
Simon Marlow authored
This field was doing nothing. I think it originally appeared in a very old incarnation of the new code generator.
-
Simon Peyton Jones authored
This is a vital wibble to: f7cf3dcd * Be a bit less gung-ho in exprIsConApp_maybe
-
http://darcs.haskell.org/ghcdimitris authored
-
dimitris authored
that evVarPred.cc_id must be equal to ctPred needs no longer be true.
-
http://darcs.haskell.org/ghcwaern authored
-
- 28 Nov, 2011 5 commits
-
-
Ian Lynagh authored
In GHC, this provides an easy way to call a C function via a C wrapper. This is important when the function is really defined by CPP. Requires the new CApiFFI extension. Not documented yet, as it's still an experimental feature at this stage.
-
http://darcs.haskell.org/ghcdimitris authored
-
dimitris authored
Details: isReflCo is no longer reliable for detection of no-rewriting/flattening since we are using cached reflexivity solved goals. Introduced a boolean flag in the flattener for this purpose, instead.
-
dimitris authored
Adding commentary, and fixing a knot-tie related bug. Commentary only.
-
dimitris authored
1) Stopped rewriting and caching solveds in the inerts because profiling showed that a lot of time was spent on rewriting already solved goals. 2) Optimisations in zonkEvBinds for common-case evidence bindings generated from the constraint solver. 3) Now solved goals cache their evidence terms, so that we can more aggressively optimize Refl coercions during constraint solving. This patch also includes a rewrite of rewriteInertEqsFromInertEq which greatly improves its efficiency.
-