[Git][ghc/ghc][wip/backports] 4 commits: gitlab-ci: Introduce DWARF release jobs for Deb10 and Fedora 27
Ben Gamari
gitlab at gitlab.haskell.org
Fri Jun 26 16:58:59 UTC 2020
Ben Gamari pushed to branch wip/backports at Glasgow Haskell Compiler / GHC
Commits:
26386f0c by Ben Gamari at 2020-06-20T15:26:31-04:00
gitlab-ci: Introduce DWARF release jobs for Deb10 and Fedora 27
(cherry picked from commit 481e31740672a37c5b3a8924bba7e15c4080bc2e)
- - - - -
fd4325aa by Ben Gamari at 2020-06-23T16:18:27-04:00
rts/ProfHeap: Free old allocations when reinitialising Censuses
Previously when not LDV profiling we would repeatedly reinitialise
`censuses[0]` with `initEra`. This failed to free the `Arena` and
`HashTable` from the old census, resulting in a memory leak.
Fixes #18348.
- - - - -
74ef489a by Ben Gamari at 2020-06-23T16:19:51-04:00
rts/ProfHeap: Only allocate the Censuses that we need
When not LDV profiling there is no reason to allocate 32 Censuses; one
will do. This is a very small memory footprint optimisation, but it
comes for free.
- - - - -
ea4ccb53 by Ben Gamari at 2020-06-26T12:58:52-04:00
gitlab-ci: Bump Docker images
- - - - -
2 changed files:
- .gitlab-ci.yml
- rts/ProfHeap.c
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
GIT_SSL_NO_VERIFY: "1"
# Commit of ghc/ci-images repository from which to pull Docker images
- DOCKER_REV: 408eff66aef6ca2b44446c694c5a56d6ca0460cc
+ DOCKER_REV: 1ac7f435c9312f10422a82d304194778378e2a1a
# Sequential version number capturing the versions of all tools fetched by
# .gitlab/ci.sh.
@@ -673,6 +673,15 @@ release-x86_64-linux-deb10:
<<: *release
extends: .build-x86_64-linux-deb10
+release-x86_64-linux-deb10-dwarf:
+ <<: *release
+ extends: .build-x86_64-linux-deb10
+ variables:
+ CONFIGURE_ARGS: "--enable-dwarf-unwind"
+ BUILD_FLAVOUR: dwarf
+ TEST_ENV: "x86_64-linux-deb10-dwarf"
+ BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-deb10-linux-dwarf.tar.xz"
+
#################################
# x86_64-linux-deb8
#################################
@@ -758,7 +767,7 @@ release-x86_64-linux-centos7:
# x86_64-linux-fedora27
#################################
-validate-x86_64-linux-fedora27:
+.build-x86_64-linux-fedora27:
extends: .validate-linux
stage: full-build
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV"
@@ -767,12 +776,28 @@ validate-x86_64-linux-fedora27:
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-fedora27-linux.tar.xz"
cache:
key: linux-x86_64-fedora27
+
+validate-x86_64-linux-fedora27:
+ extends: .build-x86_64-linux-fedora27
artifacts:
when: always
# These are used for head.hackage jobs therefore we keep them around for
# longer.
expire_in: 8 week
+release-x86_64-linux-fedora27:
+ <<: *release
+ extends: .build-x86_64-linux-fedora27
+
+release-x86_64-linux-fedora27-dwarf:
+ <<: *release
+ extends: .build-x86_64-linux-fedora27
+ variables:
+ CONFIGURE_ARGS: "--enable-dwarf-unwind"
+ BUILD_FLAVOUR: dwarf
+ TEST_ENV: "x86_64-linux-fedora27-dwarf"
+ BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-fedora27-linux-dwarf.tar.xz"
+
############################################################
# Validation via Pipelines (Windows)
############################################################
=====================================
rts/ProfHeap.c
=====================================
@@ -260,6 +260,16 @@ LDV_recordDead( const StgClosure *c, uint32_t size )
STATIC_INLINE void
initEra(Census *census)
{
+ // N.B. When not LDV profiling we reinitialise the same Census over
+ // and over again. Consequently, we need to ensure that we free the
+ // resources from the previous census.
+ if (census->hash) {
+ freeHashTable(census->hash, NULL);
+ }
+ if (census->arena) {
+ arenaFree(census->arena);
+ }
+
census->hash = allocHashTable();
census->ctrs = NULL;
census->arena = newArena();
@@ -407,18 +417,24 @@ initHeapProfiling(void)
#if defined(PROFILING)
if (doingLDVProfiling()) {
era = 1;
+ n_censuses = 32;
} else
#endif
{
era = 0;
+ n_censuses = 1;
}
// max_era = 2^LDV_SHIFT
max_era = 1 << LDV_SHIFT;
- n_censuses = 32;
censuses = stgMallocBytes(sizeof(Census) * n_censuses, "initHeapProfiling");
+ // Ensure that arena and hash are NULL since otherwise initEra will attempt to free them.
+ for (int i=0; i < n_censuses; i++) {
+ censuses[i].arena = NULL;
+ censuses[i].hash = NULL;
+ }
initEra( &censuses[era] );
/* initProfilingLogFile(); */
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/540d5562f323eabdc2b80ba1520be312b88ab8ae...ea4ccb533ff744dba2c8662861e9f5868e775291
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/540d5562f323eabdc2b80ba1520be312b88ab8ae...ea4ccb533ff744dba2c8662861e9f5868e775291
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200626/6a793120/attachment-0001.html>
More information about the ghc-commits
mailing list