| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
While debugging #14005 I noticed that unpackCStringUtf8# was allocating a thunk
for each Unicode character that it unpacked. This seems hardly worthwhile given
that the thunk's closure will be at least three words, whereas the Char itself
will be only two and requires only a bit of bit twiddling to construct.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: RyanGlScott, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3750
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr
Subscribers: Phyx, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3734
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we load non absolute pathed .so's this usually implies that we
expect the system to have them in place already, and hence we should not
need to ship them. Without the absolute path to the library, we are
also unable to open and send said library. Thus we'll do library
shipping only for libraries with absolute paths.
When dealing with a host and target of different word size (say host
hast 64bit, target has 32bit), we need to fix the RemotePtr size and the
toWordArray function, as they are part of the iserv ResolvedBCO binary
protocol. This needs to be word size independent. The choice for
RemotePtr to 64bit was made to ensure we can store 64bit pointers when
targeting 64bit. The choice for 32bit word arrays was made wrt.
encoding/decoding on the potentially slower device.
The efficient serialization code has been graciously provided by
@bgamari.
Reviewers: bgamari, simonmar, austin, hvr
Reviewed By: bgamari
Subscribers: Ericson2314, rwbarton, thomie, ryantrinkle
Differential Revision: https://phabricator.haskell.org/D3443
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove the redundant import of `Data.Maybe` from `GHC.Foreign`.
* Fix the note in `GHC.Stack.Types` to give a correct explanation
of the problematic cycle.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3722
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: RyanGlScott, austin, goldfire, bgamari
Reviewed By: RyanGlScott, goldfire, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3715
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously datatype names were not paraenthesized (#13887).
Reviewers: austin, bgamari, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: RyanGlScott, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3717
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After discussion with Kazu Yamamoto we decided to try two things:
- replace current finger tree based priority queue through a radix
tree based one (code is based on IntPSQ from the psqueues package)
- after editing the timer queue: don't wake up the timer manager if
the next scheduled time didn't change
Benchmark results (number of TimerManager-Operations measured over 20
seconds, 5 runs each, higher is better)
```
-- baseline (timermanager action commented out)
28817088
28754681
27230541
27267441
28828815
-- ghc-8.3 with wake opt and new timer queue
18085502
17892831
18005256
18791301
17912456
-- ghc-8.3 with old timer queue
6982155
7003572
6834625
6979634
6664339
```
Here is the benchmark code:
```
{-# LANGUAGE BangPatterns #-}
module Main where
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.State.Strict
import Data.Foldable
import GHC.Event
import System.Random
import Control.Concurrent
import Control.Exception
import Data.IORef
main :: IO ()
main = do
let seed = 12345 :: Int
nthreads = 1 :: Int
benchTime = 20 :: Int -- in seconds
timerManager <- getSystemTimerManager :: IO TimerManager
let
{- worker loop
depending on the random generator it either
* registers a new timeout
* updates existing timeout
* or cancels an existing timeout
Additionally it keeps track of a counter tracking how
often a timermanager was being modified.
-}
loop :: IORef Int -> [TimeoutKey] -> StdGen -> IO a
loop !i !timeouts !rng = do
let (rand0, rng') = next rng
(rand1, rng'') = next rng'
case rand0 `mod` 3 of
0 -> do
timeout <- registerTimeout timerManager (rand1) (return ())
modifyIORef' i (+1)
loop i (timeout:timeouts) rng''
1 | (timeout:_) <- timeouts
-> do
updateTimeout timerManager timeout (rand1)
modifyIORef' i (+1)
loop i timeouts rng''
| otherwise
-> loop i timeouts rng'
2
| (timeout:timeouts') <- timeouts
-> do
unregisterTimeout timerManager timeout
modifyIORef' i (+1)
loop i timeouts' rng'
| otherwise -> loop i timeouts rng'
_ -> loop i timeouts rng'
let
-- run a computation which can produce new
-- random generators on demand
withRng m = evalStateT m (mkStdGen seed)
-- split a new random generator
newRng = do
(rng1, rng2) <- split <$> get
put rng1
return rng2
counters <- withRng $ do
replicateM nthreads $ do
rng <- newRng
ref <- liftIO (newIORef 0)
liftIO $ forkIO (loop ref [] rng)
return ref
threadDelay (1000000 * benchTime)
for_ counters $ \ref -> do
n <- readIORef ref
putStrLn (show n)
```
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: Phyx, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3707
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: RyanGlScott, austin, goldfire, bgamari
Reviewed By: RyanGlScott, goldfire, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3715
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is based on unfinished work in D38 started by Simon Marlow and is
the first step for fixing #13825. (next step use byte-indexing for
stack)
The change boils down to adjusting everything in BCEnv by +1, which
simplifies the code a bit.
I've also looked into a weird stack adjustement that we did in
`getIdValFromApStack` and moved it to `ByteCodeGen` to just keep
everything in one place. I've left a comment about this.
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: ./validate
Reviewers: austin, hvr, bgamari, simonmar
Reviewed By: bgamari, simonmar
Subscribers: simonmar, rwbarton, thomie
GHC Trac Issues: #13825
Differential Revision: https://phabricator.haskell.org/D3708
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An additional stat is tracked per gc: par_balanced_copied This is the
the number of bytes copied by each gc thread under the balanced lmit,
which is simply (copied_bytes / num_gc_threads). The stat is added to
all the appropriate GC structures, so is visible in the eventlog and in
GHC.Stats.
A note is added explaining how work balance is computed.
Remove some end of line whitespace
Test Plan:
./validate
experiment with the program attached to the ticket
examine code changes carefully
Reviewers: simonmar, austin, hvr, bgamari, erikd
Reviewed By: simonmar
Subscribers: Phyx, rwbarton, thomie
GHC Trac Issues: #13830
Differential Revision: https://phabricator.haskell.org/D3658
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This copies the subset of Hoopl's functionality needed by GHC to
`cmm/Hoopl` and removes the dependency on the Hoopl package.
The main motivation for this change is the confusing/noisy interface
between GHC and Hoopl:
- Hoopl has `Label` which is GHC's `BlockId` but different than
GHC's `CLabel`
- Hoopl has `Unique` which is different than GHC's `Unique`
- Hoopl has `Unique{Map,Set}` which are different than GHC's
`Uniq{FM,Set}`
- GHC has its own specialized copy of `Dataflow`, so `cmm/Hoopl` is
needed just to filter the exposed functions (filter out some of the
Hoopl's and add the GHC ones)
With this change, we'll be able to simplify this significantly.
It'll also be much easier to do invasive changes (Hoopl is a public
package on Hackage with users that depend on the current behavior)
This should introduce no changes in functionality - it merely
copies the relevant code.
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: ./validate
Reviewers: austin, bgamari, simonmar
Reviewed By: bgamari, simonmar
Subscribers: simonpj, kavon, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3616
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using Template Haskell, one can construct lambda expressions with no
arguments. The pretty-printer isn't aware of this fact, however. This
changes that.
Test Plan: make test TEST=T13856
Reviewers: bgamari, austin, goldfire
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13856
Differential Revision: https://phabricator.haskell.org/D3664
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have `infixl 9 !!` for `Data.List.!!`, but not for
`Data.List.NonEmpty.!!`. We ought to.
Test Plan: Read it
Reviewers: bgamari, austin, hvr
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3666
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: dfeuer, austin, hvr
Reviewed By: dfeuer
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `Fingerprint` type is not exported from any "public"
module. It therefore seems quite strange that `Type.Reflection`
exports functions for extracting fingerprints. Remove those
exports. If fingerprints are eventually considered public,
this can be reconsidered.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3643
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have one for `(:~:)`, but not for `(:~~:)`! Let's fix this
oversight.
Reviewers: bgamari, austin, hvr
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3657
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: austin, hvr, erikd, simonmar
Subscribers: rwbarton, thomie
GHC Trac Issues: #13832
Differential Revision: https://phabricator.haskell.org/D3652
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This does two things:
* The `RtsTime` type wasn't exported, but it is used as the type of
several record fields. Let's export it and give it some documentation.
* Neither `RTSStats` nor `GCDetails` have `Read` or `Show` instances,
but `GCStats` does! Let's fix this discrepancy.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: goldfire, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3625
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: austin, hvr, dfeuer
Reviewed By: dfeuer
Subscribers: rwbarton, thomie
GHC Trac Issues: #13746
Differential Revision: https://phabricator.haskell.org/D3605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: read it
Reviewers: dfeuer, austin, hvr, nomeata
Reviewed By: dfeuer, nomeata
Subscribers: nomeata, rwbarton, thomie
GHC Trac Issues: #13689
Differential Revision: https://phabricator.haskell.org/D3576
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no new autoconf release, and it seems like there will unlikely be one
<http://lists.gnu.org/archive/html/autoconf/2016-07/msg00017.html>.
This will allow us to support <arch>-apple-ios properly.
These have been taken from
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3558
|
| |
|
|
|
|
|
| |
forkIOUnmasked has been deprecated for several years now. Update reference to
it. See #4858 and #5546.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates hpc submodule.
Reviewers: austin, bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #11799
Differential Revision: https://phabricator.haskell.org/D3465
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were old module names:
* Data.Compact -> GHC.Compact
* Data.Compact.Internal -> GHC.Compact
This commit is for ghc-8.2 branch.
Test Plan: build
Reviewers: austin, bgamari, hvr, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3522
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use `unsafeDupableInterleaveIO` to avoid `noDuplicate` calls. Switch
from `takeMVar` to `readMVar` as multiple entry with `takeMVar`
would lock things up.
Reviewers: austin, hvr, bgamari, simonmar
Reviewed By: simonmar
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3494
|
| |
|
|
|
|
| |
Our new CPP linter enforces this.
|