[Git][ghc/ghc][wip/andreask/ci_validate] 5 commits: OSMem.c: Use proper type for mbinds mask argument.

Andreas Klebinger gitlab at gitlab.haskell.org
Fri Nov 27 10:48:49 UTC 2020



Andreas Klebinger pushed to branch wip/andreask/ci_validate at Glasgow Haskell Compiler / GHC


Commits:
afcd1727 by Andreas Klebinger at 2020-11-27T11:47:02+01:00
OSMem.c: Use proper type for mbinds mask argument.

StgWord has different widths on 32/64bit. So use the proper type
instead.

- - - - -
49dcad94 by Andreas Klebinger at 2020-11-27T11:47:02+01:00
Linker.c: Only define freeNativeCode_ELF when using elf format.

- - - - -
399d306e by Andreas Klebinger at 2020-11-27T11:47:02+01:00
rts: EventLog.c: Properly cast (potential) 32bit pointers to uint64_t

- - - - -
9fc22a20 by Andreas Klebinger at 2020-11-27T11:47:44+01:00
Rts/elf-linker: Upcast to 64bit to satisfy format string.

The elf size is 32bit on 32bit builds and 64 otherwise.
We just upcast to 64bits before printing now.

- - - - -
b02863bc by Andreas Klebinger at 2020-11-27T11:48:29+01:00
Use validate flavour for all CI builds.

This also means we compile GHC with -O1 instead of -O2 for some
platforms for CI. As a result a lot of test metrics
got worse which we now have to accept.

-------------------------
Metric Increase:
    ManyAlternatives
    ManyConstructors
    MultiLayerModules
    Naperian
    T10421
    T12150
    T12227
    T12234
    T12425
    T12545
    T12707
    T13035
    T13253
    T13253-spj
    T13379
    T13719
    T14697
    T18282
    T18698a
    T18698b
    T1969
    T3064
    T3294
    T4801
    T5321FD
    T5321Fun
    T5631
    T6048
    T783
    T9020
    T9203
    T9233
    T9872a
    T9872b
    T9872c
    T9872d
    T9961
    haddock.Cabal
    haddock.base
    parsing001
    T5642
    WWRec
-------------------------

- - - - -


5 changed files:

- .gitlab-ci.yml
- rts/Linker.c
- rts/eventlog/EventLog.c
- rts/linker/Elf.c
- rts/posix/OSMem.c


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -442,7 +442,7 @@ validate-x86_64-darwin:
     LANG: "en_US.UTF-8"
     CONFIGURE_ARGS: "--with-intree-gmp"
     TEST_ENV: "x86_64-darwin"
-    BUILD_FLAVOUR: "perf"
+    BUILD_FLAVOUR: "validate"
   after_script:
     - cp -Rf $HOME/.cabal cabal-cache
     - .gitlab/ci.sh clean
@@ -493,7 +493,7 @@ validate-x86_64-darwin:
   tags:
     - x86_64-linux
   variables:
-    BUILD_FLAVOUR: "perf"
+    BUILD_FLAVOUR: "validate"
   before_script:
       # Build hyperlinked sources for documentation when building releases
     - |


=====================================
rts/Linker.c
=====================================
@@ -171,7 +171,9 @@ Mutex linker_mutex;
 /* Generic wrapper function to try and Resolve and RunInit oc files */
 int ocTryLoad( ObjectCode* oc );
 
+#if defined(OBJFORMAT_ELF)
 static void freeNativeCode_ELF (ObjectCode *nc);
+#endif
 
 /* Link objects into the lower 2Gb on x86_64 and AArch64.  GHC assumes the
  * small memory model on this architecture (see gcc docs,


=====================================
rts/eventlog/EventLog.c
=====================================
@@ -1489,7 +1489,8 @@ static void postTickyCounterDef(EventsBuf *eb, StgEntCounter *p)
     ensureRoomForVariableEvent(eb, len);
     postEventHeader(eb, EVENT_TICKY_COUNTER_DEF);
     postPayloadSize(eb, len);
-    postWord64(eb, (uint64_t) p);
+
+    postWord64(eb, (uint64_t)((uintptr_t) p));
     postWord16(eb, (uint16_t) p->arity);
     postString(eb, p->arg_kinds);
     postString(eb, p->str);
@@ -1513,7 +1514,7 @@ static void postTickyCounterSample(EventsBuf *eb, StgEntCounter *p)
 
     ensureRoomForEvent(eb, EVENT_TICKY_COUNTER_SAMPLE);
     postEventHeader(eb, EVENT_TICKY_COUNTER_SAMPLE);
-    postWord64(eb, (uint64_t) p);
+    postWord64(eb, (uint64_t)((uintptr_t) p));
     postWord64(eb, p->entry_count);
     postWord64(eb, p->allocs);
     postWord64(eb, p->allocd);


=====================================
rts/linker/Elf.c
=====================================
@@ -904,8 +904,8 @@ ocGetNames_ELF ( ObjectCode* oc )
                    ASSERT(common_used <= common_size);
 
                    IF_DEBUG(linker,
-                            debugBelch("COMMON symbol, size %ld name %s allocated at %p\n",
-                                       symbol->elf_sym->st_size, nm, symbol->addr));
+                            debugBelch("COMMON symbol, size %llu name %s allocated at %p\n",
+                                       (uint64_t) symbol->elf_sym->st_size, nm, symbol->addr));
 
                    /* Pointless to do addProddableBlock() for this area,
                       since the linker should never poke around in it. */


=====================================
rts/posix/OSMem.c
=====================================
@@ -364,7 +364,7 @@ void osBindMBlocksToNode(
 {
 #if HAVE_LIBNUMA
     int ret;
-    StgWord mask = 0;
+    unsigned long mask = 0;
     mask |= 1 << node;
     if (RtsFlags.GcFlags.numa) {
         ret = mbind(addr, (unsigned long)size,



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/878f4abdbae9a6e8936aa006940df42def3b148d...b02863bc0a299f67bafbfcba0db2c46fee228ad4

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/878f4abdbae9a6e8936aa006940df42def3b148d...b02863bc0a299f67bafbfcba0db2c46fee228ad4
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/20201127/fa159a88/attachment-0001.html>


More information about the ghc-commits mailing list