[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: testsuite: Use math.inf instead of division-by-zero
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Dec 18 16:33:08 UTC 2024
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
e86b1b20 by Ben Gamari at 2024-12-17T13:51:39-05:00
testsuite: Use math.inf instead of division-by-zero
This both more directly captures the intent and also fixes #25580.
- - - - -
430d965a by Ben Gamari at 2024-12-17T13:52:15-05:00
rts: Fix incorrect format specifiers in era profiling
Fixes #25581.
- - - - -
8b63c3d3 by Andreas Klebinger at 2024-12-18T11:32:58-05:00
Document `-prof` and non `-prof` code being incompatible.
Fixes #25518.
- - - - -
66e50753 by Zubin Duggal at 2024-12-18T11:32:59-05:00
ghcup metadata: output metadata fragment in CI
(cherry picked from commit 52b58a660e735b20961d792d8fa9267f01247a50)
- - - - -
92afc9b2 by Zubin Duggal at 2024-12-18T11:32:59-05:00
ghcup metatdata: use fedora33 for redhat
Redhat 9 doesn't have libtinfo.so.5 anymore
(cherry picked from commit dc86785eb43afd1bd292287c064fb5ad94fe8c7f)
- - - - -
cb7a5062 by Zubin Duggal at 2024-12-18T11:32:59-05:00
ghcup metadata: still use centos for redhat <9
- - - - -
5 changed files:
- .gitlab-ci.yml
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- docs/users_guide/profiling.rst
- rts/ProfHeap.c
- testsuite/driver/perf_notes.py
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -1235,6 +1235,7 @@ ghcup-metadata-release:
# No explicit needs for release pipeline as we assume we need everything and everything will pass.
extends: .ghcup-metadata
script:
+ - nix shell -f .gitlab/rel_eng -c ghcup-metadata --release-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" --fragment
- nix shell -f .gitlab/rel_eng -c ghcup-metadata --release-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml"
rules:
- if: '$RELEASE_JOB == "yes"'
=====================================
.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
=====================================
@@ -243,7 +243,9 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):
, "unknown_versioning" : centos7 }
, "Linux_Fedora" : { ">= 33": fedora33
, "unknown_versioning": centos7 }
- , "Linux_RedHat" : { "unknown_versioning": centos7 }
+ , "Linux_RedHat" : { "< 9": centos7
+ , ">= 9": fedora33
+ , "unknown_versioning": fedora33 }
, "Linux_UnknownLinux" : { "unknown_versioning": rocky8 }
, "Darwin" : { "unknown_versioning" : darwin_x86 }
, "Windows" : { "unknown_versioning" : windows }
=====================================
docs/users_guide/profiling.rst
=====================================
@@ -193,6 +193,13 @@ call are aggregated into the caller [2]_.
Inserting cost centres by hand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.. pragma:: SCC
+
+ :where: any expression
+
+ Instructs GHC to track runtime cost associated with the expression
+ when profiling is enabled.
+
Cost centres are just program annotations. When you say ``-fprof-auto``
to the compiler, it automatically inserts a cost centre annotation
around every binding not marked INLINE in your program, but you are
@@ -361,12 +368,17 @@ Compiler options for profiling
:category:
To make use of the profiling system *all* modules must be compiled
- and linked with the :ghc-flag:`-prof` option. Any ``SCC`` annotations you've
+ and linked with the :ghc-flag:`-prof` option. Any :pragma:`SCC` annotations you've
put in your source will spring to life.
- Without a :ghc-flag:`-prof` option, your ``SCC``\ s are ignored; so you can
+ Without a :ghc-flag:`-prof` option, :pragma:`SCC` annotations are ignored; so you can
compile ``SCC``-laden code without changing it.
+ Since :ghc-flag:`-prof` affects not just code generation but also memory layout at runtime
+ code compiled with and without :ghc-flag:`-prof` is fundamentally incompatible.
+ To get a functional executable a project has to be built
+ either fully with or fully without :ghc-flag:`-prof`.
+
.. ghc-flag:: -fno-prof-count-entries
:shortdesc: Do not collect entry counts
:type: dynamic
=====================================
rts/ProfHeap.c
=====================================
@@ -958,9 +958,9 @@ dumpCensus( Census *census )
count * sizeof(W_));
break;
case HEAP_BY_ERA:
- fprintf(hp_file, "%lu", (StgWord)ctr->identity);
+ fprintf(hp_file, "%" FMT_Word, (StgWord)ctr->identity);
char str_era[100];
- sprintf(str_era, "%lu", (StgWord)ctr->identity);
+ sprintf(str_era, "%" FMT_Word, (StgWord)ctr->identity);
traceHeapProfSampleString(0, str_era, count * sizeof(W_));
break;
case HEAP_BY_MOD:
=====================================
testsuite/driver/perf_notes.py
=====================================
@@ -21,6 +21,7 @@ import sys
from collections import namedtuple, defaultdict
from math import ceil, trunc
+import math
from testutil import passed, failBecause, testing_metrics, print_table
from term_color import Color, colored
@@ -140,7 +141,7 @@ class MetricAcceptanceWindow:
class AlwaysAccept(MetricAcceptanceWindow):
def get_bounds(self, baseline: float) -> Tuple[float, float]:
- return (-1/0, +1/0)
+ return (-math.inf, +math.inf)
def describe(self) -> str:
raise NotImplemented
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/06d48131dd77e38675071ad46bc4f5e579a56681...cb7a506237d4480c7403a2c45ee3b9f176b459fc
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/06d48131dd77e38675071ad46bc4f5e579a56681...cb7a506237d4480c7403a2c45ee3b9f176b459fc
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/20241218/ef62d5d8/attachment-0001.html>
More information about the ghc-commits
mailing list