| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
We never want to raise a StackOverflow exception inside
Control.Exception.block, because the user has no reasonable way of
handling it, and it invalidates some useful guarantees.
|
| |
|
|
|
|
|
|
| |
This means that thunks under evaluation will have been updated with
the exception when we come to inspect them in GHCi. Blackholes are
much less friendly.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We were freeing the hash table storage with exitHashTable() before
calling endProfiling(), which uses hash tables.
|
|
|
|
|
| |
Seems to be a bug introduced by code to free the memory allocated by
the heap profiler.
|
| |
|
|
|
|
|
|
| |
This means we can avoid some StablePtrs, and also catch cases where
the AP_STACK has been evaluated (this can happen with :history, see
the hist001 test).
|
| |
|
|
|
|
|
|
|
|
|
| |
- .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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you compiled a program with -ticky and ran it with:
./foo +RTS -rstderr -RTS
the result would be a segfault. This was because the RTS interprets stderr to
mean "use debugBelch to print out messages," and sets the ticky file pointer
to NULL as a result, but PrintTickyInfo (the function in Ticky.c that prints
out the ticky report) wasn't checking for NULL.
I changed PrintTickyInfo to check whether the ticky file pointer is NULL and
output to stderr if so.
Also removed an unused import from CodeOutput.lhs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Initial support for loading x86_64 Mach-O files
|
|
|
|
|
|
| |
... so that GHCi doesn't complain about duplicate symbols when two C modules define the same static variable.
MERGE TO STABLE.
|
|
|
|
|
|
|
| |
The __i686.get_pc_thunk symbols generated by gcc's PIC code generator are weak definitions that appear in every object file, so we need to deal with them.
MERGE TO STABLE.
|
|
|
|
|
|
|
|
|
|
|
| |
Some fixes to adjustor functions. The 8-byte address returned by the
allocator is adjusted to be aligned to 16-byte boundaries. Fixed a typo
in inserting an immediate address into an instruction.
This fixes the calls to 5-argument and 6-argument functions in ffi009.
Some functions still break. I suspect it's related to passing arguments on
the stack.
|
|
|
|
|
|
| |
Save/restore two more registers in StgCRun(). The extra
registers are used by ffi009.hs, when compiling with gcc 4.1.2.
|
| |
|
|
|
|
|
|
|
|
|
| |
A thread that was blocked on a blackhole but can now be woken up could
possibly be treated as unreachable by the GC, and sent the
NonTermination exception.
This can give rise to spurious <<loop>>s in concurrent programs, so
it's a good one to fix.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gcc 4 is doing more clever optimizations than earlier gccs.
These changes let ghc compile and run on ia64 with gcc 4.0.3.
Register stack frames are enlarged so that all functions use the
same size stack frame.
The code to mangle tail calls has been cleaned up and made more
general.
Additional floating-point and special-purpose registers used by
GCC are saved upon entering the STG runtime.
More general handling of NOP instructions.
Handling of functions with multiple epilogues or no epilogue.
|
| |
|
|
|
|
| |
fixes unreg way in HEAD
|
| |
|
|
|
|
|
|
| |
This primop ensures that the current computation is not being
duplicated, by calling threadPaused(). The idea is to use it inside
unsafePerformIO/unsafeInterleaveIO (see #986).
|
|
|
|
|
|
| |
I guess I forgot to do this the first time around; the upshot is that
there could be some uncaught duplication of work on a multiprocessor
(but unlikely).
|
|
|
|
| |
avoids an assertion failure in newBoundTask()
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This lets the threaded RTS use SIGVTALRM rather than SIGALRM for its
interval timer signal, so the threaded and non-threaded RTS are
compatible. It unfortunately doesn't completely fix #850/#1156, for
that we really have to use a restartable sleep instead of usleep().
Also I cleaned up the timer API a little: instead of returning an
error value that ultimately gets ignored, we now report errors from
system calls and exit.
|
|
|
|
|
| |
We recently discovered that they aren't a win any more, and just cost
code size.
|
|
|
|
| |
This is a simplification & minor optimisation for GHCi
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
See conc059.
|
|
|
|
|
| |
This is the Windows counterpart to "Make the non-threaded-RTS
threadDelay wait at least as long as asked"
|
| |
|
| |
|