Commit Graph

85 Commits

Author SHA1 Message Date
Jost Berthold
f4b6a968b8 make all internal functions static, rename
This prepares for fitting the revised Pack.c of packman into the
parallel GHC runtime system. The module should not export any
functions without need, and prefix all exported ones with "pm".

Exported:

int pmtryPackToBuffer(StgClosure* closure, StgArrWords* mutArr);
StgClosure* pmUnpackGraphWrapper(StgArrWords* packBufferArray, Capability* cap);
2014-08-22 10:57:59 +02:00
Jost Berthold
89306e120a corrected ranges 2014-08-19 19:26:41 +02:00
Jost Berthold
6ad43e0763 added a multithreaded test case
A number of threads serialize the same data, while the test function
accesses the original in different ways (prone to blackholing).
Test runs with 10 threads by default, which is enough to trigger
some blackhole exceptions (the duplicate function will retry).
2014-08-19 11:52:30 +02:00
Jost Berthold
82078f8eba Accidental conflict in cbits/Pack.c (reformatting/amend) 2014-08-19 11:24:09 +02:00
Jost Berthold
c0437f4c6c new PAP packing code
Old code was wasting a lot of space by packing tags for stack values
to indicate their pointer-hood. Instead, the new version packs the
original bitmap and uses it for unpacking.
The bitmap is actually present at the receiver side, but as part of
the function info table - the function arrives later so it cannot be
used from there.

There is code for the large bitmap case, but it is not activated yet.
2014-08-19 11:23:00 +02:00
Jost Berthold
446bf6286e new PAP packing code
Old code was wasting a lot of space by packing tags for stack values
to indicate their pointer-hood. Instead, the new version packs the
original bitmap and uses it for unpacking.
The bitmap is actually present at the receiver side, but as part of
the function info table - the function arrives later so it cannot be
used from there.

There is code for the large bitmap case, but it is not activated yet.
2014-08-19 11:10:27 +02:00
Jost Berthold
b6a63ddaa2 add a note about shrinkMutableByteArray 2014-08-18 10:22:37 +02:00
Jost Berthold
e03c67de2d Rewritten Pack.c, eliminating all global variables
Pack.c should now be thread-safe for unpacking and packing,
as its functions pass around an explicitly allocated state.
changes should eventually go back into the RTS code (but we
need to see the performance first).

The PAP case has not been rewritten yet, it should be revised
to pack the bitmap instead of tagging the packed stack elements.
2014-08-15 15:58:16 +02:00
Jost Berthold
a8eb2df7a4 small clean-up 2014-08-14 13:46:03 +02:00
Jost Berthold
c1be91ca68 whitespace cleanup in Pack.c 2014-08-14 13:39:53 +02:00
Jost Berthold
9dd85aa363 add simple test, clean (non-working) AllTests, edit github URL 2014-08-14 10:41:59 +02:00
Jost Berthold
060660bf61 test suite for exceptions, with exitcode-1.0 2014-07-27 17:45:10 +02:00
Jost Berthold
959ebdca98 Extended test program (NOT WORKING AT THE MOMENT)
An attempt to use the "detailed-0.9" test-suite style of Cabal,
but it fails with a linker error.
2014-07-26 20:48:27 +02:00
Jost Berthold
714ab55854 Some adjustments, towards more robust version
- lock (haskell level)
- cabal file and C code with debug support
- test suite (one program for now)
2014-07-24 20:35:52 +02:00
Jost Berthold
5a7eab42cd use versioned dependencies and -DDEBUG 2014-07-24 12:33:46 +02:00
Jost Berthold
4404821e46 renamed some functions to avoid name clashes with Par.RTS 2014-07-23 22:47:39 +02:00
Jost Berthold
4d4d49d4f2 disable tests (require network library) 2014-07-23 22:46:39 +02:00
Ásbjørn Viderø Jøkladal
be5d4b6913 Created a new test application called Workpool. 2014-06-08 17:01:14 +02:00
Michael Budde
8ff861ee5c Client/server test program 2014-06-05 13:01:55 +02:00
Michael Budde
2236bf1136 Init pack buffer at startup
The GCC `constructor` attribute is used ensure that the function will be
called when the library is loaded at startup.
2014-05-22 19:43:28 +02:00
Michael Budde
b4b3e1195a Style 2014-05-22 19:28:10 +02:00
Michael Budde
7055c64137 Use IF_DEBUG instead of IF_PAR_DEBUG 2014-05-22 18:10:50 +02:00
Michael Budde
734b7be134 Use internal functions in GHC instead of copying the source 2014-05-22 18:10:08 +02:00
Jost Berthold
5c38d6317b Use private functions from GHC runtime 2014-05-22 18:08:42 +02:00
Jost Berthold
2d990576ef Rename functions to prevent collision with Eden implementations 2014-05-22 18:07:42 +02:00
Jost Berthold
eaaab29474 Remove unnecessary stuff from packing buffer structure 2014-05-22 18:03:53 +02:00
Michael Budde
f7e61add3d Replace Haskell API with GHC.Packing module
Taken from https://github.com/jberthold/rts-serialisation
2014-05-21 11:24:18 +02:00
Michael Budde
8e760f9603 Update cabal file 2014-05-21 10:02:22 +02:00
Michael Budde
b370e5b513 Add debug flag 2014-05-20 14:06:23 +02:00
Michael Budde
5cb2858a7b Remove unused primitive dependency 2014-05-20 14:05:19 +02:00
Michael Budde
ae51b45995 Add deserialize and convert to a library 2014-05-20 13:16:49 +02:00
Michael Budde
b2d370023f Reform pack file 2014-05-19 21:46:38 +02:00
Michael Budde
efe634ded1 Import Pack.c from Eden RTS 2014-05-19 13:53:09 +02:00
Michael Budde
bb5ebede50 Import Pack.c from Eden 2014-05-19 10:49:06 +02:00
Michael Budde
9f5a8a83ad Initial commit 2014-05-14 23:00:13 +02:00