Change in osmo-ttcn3-hacks[master]: regen-makefile: Use '-U 5' to split C++ files in multiple chunks

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 30 20:40:22 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13821


Change subject: regen-makefile: Use '-U 5' to split C++ files in multiple chunks
......................................................................

regen-makefile: Use '-U 5' to split C++ files in multiple chunks

Particularly the C++ files generated for the rather comprehensive
3GPP asn.1 specified protocols like MAP, RANAP, ... result in very
large source files and subsequently g++ processes that consume well
into the multiple gigabyte range of memory.

Let's use the '-U 5' option to ask the ttcn3_compiler to split all
c++ files into 5 chunks, resulting in more files to compile, but
smaller individual files.

I also tested '-U type' before, but it was still grinding my 16GB RAM
laptop to unusable deep-swapping state when running 'make -j8' for
the IuCS extended MSC test suite.

Change-Id: I013b623e98d58a39dd7bb2b0db4a911725028535
---
M regen-makefile.sh
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/13821/1

diff --git a/regen-makefile.sh b/regen-makefile.sh
index 77fcb6c..d2b747e 100755
--- a/regen-makefile.sh
+++ b/regen-makefile.sh
@@ -24,7 +24,7 @@
 	USE_CCACHE=1
 fi
 
-ttcn3_makefilegen -p -l -f $*
+ttcn3_makefilegen -p -l -U 5 -f $*
 
 TITAN_VERSION=$(ttcn3_makefilegen -v 2>&1 |grep "Product number" |cut --delimiter="/" -f 2-| sed -e "s/[A-Z ]//g")
 
@@ -60,5 +60,5 @@
 	sed -i -e 's/^CXX = g++ $/CXX = env CCACHE_SLOPPINESS=time_macros ccache g++/' Makefile
 	# Append the -D option to compiler flags. This option disables timestamps
 	# inside comments in the generated C++ code which interfere with ccache.
-	sed -i -e 's/^COMPILER_FLAGS = \(.*\)/&-D/' Makefile
+	sed -i -e 's/^COMPILER_FLAGS = \(.*\)/& -D/' Makefile
 fi

-- 
To view, visit https://gerrit.osmocom.org/13821
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I013b623e98d58a39dd7bb2b0db4a911725028535
Gerrit-Change-Number: 13821
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190430/c2da57ef/attachment.html>


More information about the gerrit-log mailing list