1. 27 Jun, 2007 4 commits
  2. 26 Jun, 2007 1 commit
  3. 16 Jun, 2007 1 commit
  4. 15 Jun, 2007 1 commit
  5. 13 Jun, 2007 1 commit
    • Simon Marlow's avatar
      FIX #1418 (partially) · 23e5985c
      Simon Marlow authored
      When the con_desc field of an info table was made into a relative
      reference, this had the side effect of making the profiling fields
      (closure_desc and closure_type) also relative, but only when compiling
      via C, and the heap profiler was still treating them as absolute,
      leading to crashes when profiling with -hd or -hy.
      
      This patch fixes up the story to be consistent: these fields really
      should be relative (otherwise we couldn't make shared versions of the
      profiling libraries), so I've made them relative and fixed up the RTS
      to know about this.
      23e5985c
  6. 05 Jun, 2007 1 commit
  7. 12 Jun, 2007 1 commit
    • andy@galois.com's avatar
      Adding new ffi calls into the Hpc rts subsystem · df58c2a5
      andy@galois.com authored
      foreign import ccall unsafe hs_hpc_write :: CString -> IO ()
      foreign import ccall unsafe hs_hpc_read  :: CString -> IO ()
      
      These write a Hpc description of the state of the world to a file, 
      or read a description into the current Hpc tickbox subsystem.
      df58c2a5
  8. 18 May, 2007 1 commit
  9. 16 May, 2007 1 commit
  10. 15 May, 2007 1 commit
    • Simon Marlow's avatar
      GHCi debugger: new flag -fbreak-on-exception · 17f848e1
      Simon Marlow authored
      When -fbreak-on-exception is set, an exception will cause GHCi to
      suspend the current computation and return to the prompt, where the
      history of the current evaluation can be inspected (if we are in
      :trace).  This isn't on by default, because the behaviour could be
      confusing: for example, ^C will cause a breakpoint.  It can be very
      useful for finding the cause of a "head []" or a "fromJust Nothing",
      though.
      17f848e1
  11. 10 May, 2007 1 commit
  12. 30 Apr, 2007 1 commit
    • andy@galois.com's avatar
      Changing internal data structures used by Hpc · 55a5d8d9
      andy@galois.com authored
       - .tix files are now a list of MixModule, which contain a hash of the contents of the .mix file.
       - .mix files now have (the same) hash number.
      
      This changes allow different binaries that use the same module compiled in the same way
      to share coverage information.
      55a5d8d9
  13. 27 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Basic heap profile support without -prof · cbeb99ef
      Simon Marlow authored
      Now that constructor info tables contain the name of the constructor,
      we can generate useful heap profiles without requiring the whole
      program and libraries to be compiled with -prof.  So now, "+RTS -hT"
      generates a heap profile for any program, dividing the profile by
      constructor.  It wouldn't be hard to add support for grouping
      constructors by module, or to restrict the profile to certain
      constructors/modules/packages.
      
      This means that for the first time we can get heap profiles for GHCi,
      which was previously impossible because the byte-code
      interpreter and linker don't work with -prof.
      cbeb99ef
  14. 24 Apr, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Make ticky work, at least partly, on 64-bit machines · a01188d1
      simonpj@microsoft.com authored
      The ticky StgEntCounter structure was trying to be clever by using a
      fixed-width 32-bit field for the registeredp value.  But the code generators
      are not up to handling structures packed tightly like this (on a 64-bit
      architecture); result seg-fault on 64-bit.
      
      Really there should be some complaint from the code generators, not simply
      a seg fault.
      
      Anyway I switched to using native words for StgEntCounter fields, and
      now at least it works.
      a01188d1
  15. 17 Apr, 2007 3 commits
    • Simon Marlow's avatar
      Re-working of the breakpoint support · cdce6477
      Simon Marlow authored
      This is the result of Bernie Pope's internship work at MSR Cambridge,
      with some subsequent improvements by me.  The main plan was to
      
       (a) Reduce the overhead for breakpoints, so we could enable 
           the feature by default without incurrent a significant penalty
       (b) Scatter more breakpoint sites throughout the code
      
      Currently we can set a breakpoint on almost any subexpression, and the
      overhead is around 1.5x slower than normal GHCi.  I hope to be able to
      get this down further and/or allow breakpoints to be turned off.
      
      This patch also fixes up :print following the recent changes to
      constructor info tables.  (most of the :print tests now pass)
      
      We now support single-stepping, which just enables all breakpoints.
      
        :step <expr>     executes <expr> with single-stepping turned on
        :step            single-steps from the current breakpoint
      
      The mechanism is quite different to the previous implementation.  We
      share code with the HPC (haskell program coverage) implementation now.
      The coverage pass annotates source code with "tick" locations which
      are tracked by the coverage tool.  In GHCi, each "tick" becomes a
      potential breakpoint location.
      
      Previously breakpoints were compiled into code that magically invoked
      a nested instance of GHCi.  Now, a breakpoint causes the current
      thread to block and control is returned to GHCi.
      
      See the wiki page for more details and the current ToDo list:
      
        http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
      cdce6477
    • Simon Marlow's avatar
    • Simon Marlow's avatar
      con_desc should be an OFFSET_FIELD · 6e9450db
      Simon Marlow authored
      6e9450db
  16. 16 Apr, 2007 1 commit
    • Simon Marlow's avatar
      MERGE: Fix a few uses of the wrong return convention for the scheduler · 94363dd5
      Simon Marlow authored
      We changed the convention a while ago so that BaseReg is returned to
      the scheduler in R1, because BaseReg may change during the run of a
      thread, e.g. during a foreign call.  A few places got missed,
      mostly for very rare events.
      
      Should fix concprog001, although I'm not able to reliably reproduce
      the failure.
      94363dd5
  17. 04 Apr, 2007 2 commits
  18. 03 Apr, 2007 1 commit
  19. 26 Mar, 2007 2 commits
  20. 22 Mar, 2007 1 commit
  21. 17 Mar, 2007 1 commit
    • red5_2@hotmail.com's avatar
      ia64 tailcall fix · 123ed121
      red5_2@hotmail.com authored
      Tail-calls now branch to the end of the function after the call.  This 
      stops gcc from trying to move instructions into the space immediately 
      after the call, which confuses the mangler.
      123ed121
  22. 07 Mar, 2007 1 commit
  23. 28 Feb, 2007 1 commit
  24. 27 Feb, 2007 1 commit
  25. 20 Feb, 2007 1 commit
    • bjpop@csse.unimelb.edu.au's avatar
      Constructor names in info tables · 7d6dffe5
      bjpop@csse.unimelb.edu.au authored
      This patch adds data constructor names into their info tables. 
      This is useful in the ghci debugger. It replaces the old scheme which
      was based on tracking data con names in the linker. 
      7d6dffe5
  26. 22 Feb, 2007 1 commit
  27. 14 Feb, 2007 1 commit
    • Simon Marlow's avatar
      fix closure_sizeW_() for AP closures · dcecd7a5
      Simon Marlow authored
      Since thunks grew an extra padding word in GHC 6.6, closure_sizeW()
      has been wrong for AP closures because it assumed compatible layout
      between PAPs and APs.  One symptom is that the compacting GC would
      crash if it encountered an AP.  APs conly crop up in GHCi or
      when using asynchronous exceptions.
      
      Fixes #1010
      dcecd7a5
  28. 13 Feb, 2007 1 commit
  29. 07 Feb, 2007 1 commit
    • chevalier@alum.wellesley.edu's avatar
      Lightweight ticky-ticky profiling · 5ddee764
      chevalier@alum.wellesley.edu authored
      The following changes restore ticky-ticky profiling to functionality
      from its formerly bit-rotted state. Sort of. (It got bit-rotted as part
      of the switch to the C-- back-end.)
      
      The way that ticky-ticky is supposed to work is documented in Section 5.7
      of the GHC manual (though the manual doesn't mention that it hasn't worked
      since sometime around 6.0, alas). Changes from this are as follows (which
      I'll document on the wiki):
      
      * In the past, you had to build all of the libraries with way=t in order to
      use ticky-ticky, because it entailed a different closure layout. No longer.
      You still need to do make way=t in rts/ in order to build the ticky RTS,
      but you should now be able to mix ticky and non-ticky modules.
      
      * Some of the counters that worked in the past aren't implemented yet.
      I was originally just trying to get entry counts to work, so those should
      be correct. The list of counters was never documented in the first place,
      so I hope it's not too much of a disaster that some don't appear anymore.
      Someday, someone (perhaps me) should document all the counters and what 
      they do. For now, all of the counters are either accurate (or at least as
      accurate as they always were), zero, or missing from the ticky profiling
      report altogether.
      
      This hasn't been particularly well-tested, but these changes shouldn't
      affect anything except when compiling with -fticky-ticky (famous last
      words...)
      
      Implementation details:
      
      I got rid of StgTicky.h, which in the past had the macros and declarations 
      for all of the ticky counters. Now, those macros are defined in Cmm.h.
      StgTicky.h was still there for inclusion in C code. Now, any remaining C
      code simply cannot call the ticky macros -- or rather, they do call those
      macros, but from the perspective of C code, they're defined as no-ops. 
      (This shouldn't be too big a problem.)
      
      I added a new file TickyCounter.h that has all the declarations for ticky
      counters, as well as dummy macros for use in C code. Someday, these 
      declarations should really be automatically generated, since they need
      to be kept consistent with the macros defined in Cmm.h.
      
      Other changes include getting rid of the header that was getting added to
      closures before, and getting rid of various code having to do with eager
      blackholing and permanent indirections (the changes under compiler/ 
      and rts/Updates.*).
      5ddee764
  30. 21 Dec, 2006 1 commit
  31. 01 Feb, 2007 1 commit
    • Simon Marlow's avatar
      Partial fix for #926 · e4fdc426
      Simon Marlow authored
      It seems that when a program exits with open DLLs on Windows, the
      system attempts to shut down the DLLs, but it also terminates (some
      of?) the running threads.  The RTS isn't prepared for threads to die
      unexpectedly, so it sits around waiting for its workers to finish.
      This bites in two places: ShutdownIOManager() in the the unthreaded
      RTS, and shutdownCapability() in the threaded RTS.  So far I've
      modified the latter to notice when worker threads have died
      unexpectedly and continue shutting down.  It seems a bit trickier to
      fix the unthreaded RTS, so for now the workaround for #926 is to use
      the threaded RTS.
      e4fdc426
  32. 26 Jan, 2007 1 commit
    • Simon Marlow's avatar
      Save the Win32 error code where necessary · 911b42b2
      Simon Marlow authored
      Similarly to the way we save errno across context switches and
      suspendThread/resumeThread, we must save and restore the Win32 error
      code via GetLastError()/SetLastError().  Fixes #896.
      
      911b42b2
  33. 09 Jan, 2007 1 commit