Browse Source

[mORMot] - migrate to Ubuntu24.04; [email protected]; return to glibc MM (#9072)

* [mORMot] - migrate to Ubuntu24.04; [email protected]; return to glibc MM

* [mORMot] - [email protected] + Define FPC_LIBCMM_NOMSIZE to disable the malloc_usable_size() call on Linux + O3 optimization level

---------

Co-authored-by: pavel.mash <[email protected]>
pavelmash 1 year ago
parent
commit
84b9953abc

+ 1 - 1
frameworks/Pascal/mormot/benchmark_config.json

@@ -9,8 +9,8 @@
         "query_url": "/queries?queries=",
         "fortune_url": "/fortunes",
         "update_url": "/updates?queries=",
-        "plaintext_url": "/plaintext",
         "cached_query_url": "/cached-queries?count=",
+        "plaintext_url": "/plaintext",
         "port": 8080,
         "approach": "Realistic",
         "classification": "Fullstack",

+ 1 - 3
frameworks/Pascal/mormot/mormot.dockerfile

@@ -9,8 +9,7 @@ COPY setup_and_build.sh .
 
 RUN /bin/bash -c ./setup_and_build.sh
 
-FROM ubuntu:22.04
-RUN apt-get update -yqq && apt-get install -yqq libmimalloc2.0
+FROM ubuntu:24.04
 
 ARG TFB_TEST_NAME
 
@@ -18,7 +17,6 @@ COPY --from=builder /build/bin/fpc-x86_64-linux/raw /usr/local/bin/raw
 COPY --from=builder /build/libpq.so.5.16 /usr/lib/x86_64-linux-gnu/libpq.so.5
 
 ENV TFB_TEST_NAME=$TFB_TEST_NAME
-ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libmimalloc.so.2.0
 
 EXPOSE 8080
 CMD ["raw"]

+ 3 - 3
frameworks/Pascal/mormot/setup_and_build.sh

@@ -35,7 +35,7 @@ echo "Download statics from $URL ..."
 wget -qO- "$URL" | tar -xz -C ./libs/mORMot/static
 
 # uncomment for fixed commit URL
-URL=https://github.com/synopse/mORMot2/tarball/527b3fb11cb4dad5f2c03ace293b550f85504420
+URL=https://github.com/synopse/mORMot2/tarball/f0fc66c954cd45f5c581e52c21170923805a683b
 #URL="https://api.github.com/repos/synopse/mORMot2/tarball/$USED_TAG"
 echo "Download and unpacking mORMot sources from $URL ..."
 wget -qO- "$URL" | tar -xz -C ./libs/mORMot  --strip-components=1
@@ -72,7 +72,7 @@ fi
 # Warning: (5090) Variable XXX of a managed type does not seem to be initialized
 SUPRESS_WARN=-vm11047,6058,5092,5091,5060,5058,5057,5028,5024,5023,4081,4079,4055,3187,3124,3123,5059,5036,5089,5090
 echo "Start compiling..."
-fpc -MDelphi -Sci -Ci -O4 -g -gl -gw2 -Xg -k'-rpath=$ORIGIN' -k-L$BIN \
+fpc -MDelphi -Sci -Ci -O3 -g -gl -gw2 -Xg -k'-rpath=$ORIGIN' -k-L$BIN \
   -T$TARGET -P$ARCH \
   -veiq -v-n-h- $SUPRESS_WARN \
   -Fi"$BIN/fpc-$ARCH_TG/.dcu" -Fi"$MSRC" \
@@ -80,7 +80,7 @@ fpc -MDelphi -Sci -Ci -O4 -g -gl -gw2 -Xg -k'-rpath=$ORIGIN' -k-L$BIN \
   -Fu"$MSRC/core" -Fu"$MSRC/db" -Fu"$MSRC/rest" -Fu"$MSRC/crypt" \
     -Fu"$MSRC/app" -Fu"$MSRC/net" -Fu"$MSRC/lib" -Fu"$MSRC/orm" -Fu"$MSRC/soa" \
   -FU"$BIN/fpc-$ARCH_TG/.dcu" -FE"$BIN/fpc-$ARCH_TG" -o"$BIN/fpc-$ARCH_TG/$dest_fn" \
-  -dFPC_LIBCMM \
+  -dFPC_LIBCMM -dFPC_LIBCMM_NOMSIZE \
   -B -Se1 "./src/raw.pas" | grep "[Warning|Error|Fatal]:"
 
 script_successful

+ 1 - 2
frameworks/Pascal/mormot/src/raw.pas

@@ -831,8 +831,7 @@ begin
     ConsoleWaitForEnterKey;
     //TSynLog.Family.Level := LOG_VERBOSE; // enable shutdown logs for debug
     if servers = 1 then
-      writeln(ObjectToJsonDebug(rawServers[0].fHttpServer,
-        [woDontStoreVoid, woHumanReadable]))
+      writeln(ObjectToJsonDebug(rawServers[0].fHttpServer))
     else
     begin
       writeln('Per-server accepted connections:');