Skip to content

Commit 398d6b6

Browse files
authored
Merge pull request #28 from tibbe/ghc-8.6-support
GHC 8.6 support
2 parents db39450 + 601cbe0 commit 398d6b6

File tree

3 files changed

+30
-13
lines changed

3 files changed

+30
-13
lines changed

.travis.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,27 @@ before_cache:
2828

2929
matrix:
3030
include:
31-
- compiler: "ghc-8.4.3"
31+
- compiler: "ghc-8.6.2"
3232
# env: TEST=--disable-tests BENCH=--disable-benchmarks
33-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
33+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.2], sources: [hvr-ghc]}}
34+
- compiler: "ghc-8.4.4"
35+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
36+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
3437
- compiler: "ghc-8.2.2"
3538
# env: TEST=--disable-tests BENCH=--disable-benchmarks
36-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.2.2], sources: [hvr-ghc]}}
39+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
3740
- compiler: "ghc-8.0.2"
3841
# env: TEST=--disable-tests BENCH=--disable-benchmarks
39-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.0.2], sources: [hvr-ghc]}}
42+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
4043
- compiler: "ghc-7.10.3"
4144
# env: TEST=--disable-tests BENCH=--disable-benchmarks
42-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.10.3], sources: [hvr-ghc]}}
45+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
4346
- compiler: "ghc-7.8.4"
4447
# env: TEST=--disable-tests BENCH=--disable-benchmarks
45-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.8.4], sources: [hvr-ghc]}}
48+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}}
4649
- compiler: "ghc-7.6.3"
4750
# env: TEST=--disable-tests BENCH=--disable-benchmarks
48-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.6.3], sources: [hvr-ghc]}}
51+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.6.3], sources: [hvr-ghc]}}
4952

5053
before_install:
5154
- HC=${CC}
@@ -88,8 +91,8 @@ install:
8891
# any command which exits with a non-zero exit code causes the build to fail.
8992
script:
9093
# test that source-distributions can be generated
91-
- (cd "." && cabal sdist)
92-
- mv "."/dist/ekg-core-*.tar.gz ${DISTDIR}/
94+
- cabal new-sdist all
95+
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
9396
- cd ${DISTDIR} || false
9497
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
9598
- "printf 'packages: ekg-core-*/*.cabal\\n' > cabal.project"
@@ -107,7 +110,6 @@ script:
107110
- (cd ekg-core-* && cabal check)
108111

109112
# haddock
110-
- rm -rf ./dist-newstyle
111113
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
112114

113115
# Build without installed constraints for packages in global-db

System/Metrics.hs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@ sToMs s = round (s * 1000.0)
370370
--
371371
-- [@rts.gc.bytes_copied@] Number of bytes copied during GC
372372
--
373+
-- [@rts.gc.init_cpu_ms@] CPU time used by the init phase, in
374+
-- milliseconds. GHC 8.6+ only.
375+
--
376+
-- [@rts.gc.init_wall_ms@] Wall clock time spent running the init
377+
-- phase, in milliseconds. GHC 8.6+ only.
378+
--
373379
-- [@rts.gc.mutator_cpu_ms@] CPU time spent running mutator threads,
374380
-- in milliseconds. This does not include any profiling overhead or
375381
-- initialization.
@@ -423,6 +429,10 @@ registerGcMetrics store =
423429
, ("rts.gc.num_bytes_usage_samples" , Counter . fromIntegral . Stats.major_gcs)
424430
, ("rts.gc.cumulative_bytes_used" , Counter . fromIntegral . Stats.cumulative_live_bytes)
425431
, ("rts.gc.bytes_copied" , Counter . fromIntegral . Stats.copied_bytes)
432+
#if MIN_VERSION_base(4,12,0)
433+
, ("rts.gc.init_cpu_ms" , Counter . nsToMs . Stats.init_cpu_ns)
434+
, ("rts.gc.init_wall_ms" , Counter . nsToMs . Stats.init_elapsed_ns)
435+
#endif
426436
, ("rts.gc.mutator_cpu_ms" , Counter . nsToMs . Stats.mutator_cpu_ns)
427437
, ("rts.gc.mutator_wall_ms" , Counter . nsToMs . Stats.mutator_elapsed_ns)
428438
, ("rts.gc.gc_cpu_ms" , Counter . nsToMs . Stats.gc_cpu_ns)
@@ -491,6 +501,10 @@ emptyRTSStats = Stats.RTSStats
491501
, cumulative_par_max_copied_bytes = 0
492502
# if MIN_VERSION_base(4,11,0)
493503
, cumulative_par_balanced_copied_bytes = 0
504+
# if MIN_VERSION_base(4,12,0)
505+
, init_cpu_ns = 0
506+
, init_elapsed_ns = 0
507+
# endif
494508
# endif
495509
, mutator_cpu_ns = 0
496510
, mutator_elapsed_ns = 0

ekg-core.cabal

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ category: System
1414
build-type: Simple
1515
extra-source-files: CHANGES.md
1616
cabal-version: >=1.10
17-
tested-with: GHC == 8.4.3, GHC == 8.2.2, GHC == 8.0.2,
18-
GHC == 7.10.3, GHC == 7.8.4, GHC == 7.6.3
17+
tested-with: GHC == 8.6.2, GHC == 8.4.4, GHC == 8.2.2,
18+
GHC == 8.0.2, GHC == 7.10.3, GHC == 7.8.4,
19+
GHC == 7.6.3
1920

2021
library
2122
exposed-modules:
@@ -33,7 +34,7 @@ library
3334

3435
build-depends:
3536
ghc-prim < 0.6,
36-
base >= 4.6 && < 4.12,
37+
base >= 4.6 && < 4.13,
3738
containers >= 0.5 && < 0.7,
3839
text < 1.3,
3940
unordered-containers < 0.3

0 commit comments

Comments
 (0)