| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
The primitive array types, such as 'ByteArray#', have kind #, but are represented by pointers. They are boxed, but unpointed types (i.e., they cannot be 'undefined').
The two categories of array types —[Mutable]Array# and [Mutable]ByteArray#— are containers for unboxed (and unpointed) as well as for boxed and pointed types. So far, we lacked support for containers for boxed, unpointed types (i.e., containers for the primitive arrays themselves). This is what the new primtypes provide.
Containers for boxed, unpointed types are crucial for the efficient implementation of scattered nested arrays, which are central to the new DPH backend library dph-lifted-vseg. Without such containers, we cannot eliminate all unboxing from the inner loops of traversals processing scattered nested arrays.
|
|
|
|
|
| |
At present the number of capabilities can only be *increased*, not
decreased. The latter presents a few more challenges!
|
| |
|
|
|
|
| |
Spotted by gdb's malloc debugger while I was looking for something else.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We add a new RTS flag -T for collecting statistics but not giving any
new inputs. There is one new struct in rts/storage/GC.h: GCStats. We
add two new global counters current_residency and current_slop, which
are useful for in-program GC statistics.
See GHC.Stats in base for a Haskell interface to this functionality.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
to using MD5 hashes to identify TypeReps in the Typeable library.
|
|
|
|
|
|
|
|
|
|
|
| |
Based on a patch from David Terei.
Some parts are a little ugly (e.g. defining things that only ASSERTs
use only when DEBUG is defined), so we might want to tweak things a
little.
I've also turned off -Werror for didn't-inline warnings, as we now
get a few such warnings.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When you use 'strip --strip-unneeded' on a ELF format .o or .a file, if
the object file has no global/exported symbols then 'strip' ends up
removing the symbol table entirely. Previously the GHCi linker assumed
there would always be exactly one symbol table and exactly one string
table. In fact, in ELF object files there is no such limitation, instead
each section points to the other sections it needs, in particular
relocation sections have a link to the symbol table section they use and
symbol table sections have a link to the corresponding string table.
So instead of assuming there will always be a global symbol and string
table, all we have to do is validate and follow these links. Then, when
we encounter an empty object file that has no symbols then we handle it
correctly, because since it's empty we never process any relocations and
so never have to follow any links to non-existant symbol tables.
Also, in the case where an object is fully stripped, we can now detect
this more reliably and emit a more helpful error message, e.g:
libHSghc-7.1.20110509.a(DsMeta.o): relocation section #2 has no symbol table
This object file has probably been fully striped. Such files cannot be linked.
|
|
|
|
| |
of 'invalid ELF header'.
|
|
|
|
|
| |
versions of Fedora. The INPUT command is use by libncursesw.so in
Fedora.
|
| |
|
| |
|
|
|
|
| |
Based on the darcs patch from Greg Wright in #4828.
|
|
|
|
| |
Part of the patch from #5062, from Greg Wright.
|
|
|
|
|
|
|
|
|
| |
On OS X at least, the filename size is the size of the filename
field. The actual filename may be shorter.
Also a number of code style improvements and debug prints.
This is part of the patch from #5062, from Greg Wright.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a corrected fix for ticket #4867, "ghci displays negative floats
incorrectly". The previous patch sometimes gave incorrect offset to values
in the __const section of the __TEXT segment. The new patch arranges a zero
fixup for non-external, not-global offset table signed relocations. This
is apparently what is required, though documentation on this point is scarce.
With this change Doubles are negated properly, because the sign bit mask
is loaded from the correct offset. This was tested both on HEAD and the 7.0
branch.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the erroneous relocations that caused
the bug in ticket #4867. External addresses and global
offset table entries were relocated correctly, but all other
relocations were incorrectly calculated. This caused, for
example, bad references to constants stored in the __const
section of the __TEXT segment.
This bug only affected OS X on 64-bit platforms.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The allocation stats (+RTS -s etc.) used to count the slop at the end
of each nursery block (except the last) as allocated space, now we
count the allocated words accurately. This should make allocation
figures more predictable, too.
This has the side effect of reducing the apparent allocations by a
small amount (~1%), so remember to take this into account when looking
at nofib results.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Don't use mmap on powerpc-apple-darwin as mmap doesn't support
reallocating but we need to allocate jump islands just after each
object images. Otherwise relative branches to jump islands can fail
due to 24-bits displacement overflow.
|
|
|
|
| |
This routine should be aware of Mach-O misalignment of malloc'ed memory regions.
|
|
|
|
| |
Use fseek(3) instead of rewind(3) to move the file position indicator back to the initial position. Otherwise we can't use this function in loadArchive().
|
|
|
|
| |
I found this function causes a segfault when ocAllocateSymbolExtras() has allocated a separate memory region for jump islands.
|
| |
|
| |
|
| |
|
|
|
|
| |
If the GHCi .o lib doesn't exist, load the .a instead
|
| |
|
| |
|
|
|
|
| |
Also changed exitcode of -1 to 1 in hpc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes two bugs in the Mach-O linker and adds debugging statements
to the same. The bugs:
1. The test for symbol->n_value == 0 is removed and replaced by a test of the
flag field. Checking the n_value field was just wrong; the value of a
symbol should only be examined when allocating space for a common block,
in which case the n_value field gives the size of the block. This bug
led to an infrequently occuring linker crash.
I believe the behavior of the linker now agrees with the intent of the
sketchy Apple documentation.
2. Jump islands were being filled with garbage instead of the the location
of the referenced symbol. This caused relocations of type X86_64_RELOC_GOT and
X86_64_RELOC_GOT_LOAD to eventually lead to crashes. The fix is simply to
look up the symbol.
Enough debug statements have been added to follow the operation of the Mach-O
linker while it loads modules. They are not yet as informative and well
organized as for ELF. Improving the debug statements will require some
reorganization of the code -- the Mach-O linker seems basically sound, but
is crying out for some refactoring and commenting.
|
|
|
|
|
| |
struct _ObjectCode should be able to retain the name of archive members.
Though currently the only use of those names are for debugging outputs.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|