Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/40621 )

Change subject: scons: Redistribute generated files for partial linking.
......................................................................

scons: Redistribute generated files for partial linking.

These had not been assigned groups, and so had fallen into whatever the
last group was that scons processed. Since groups aren't set up
explicitly, that's short hand for wherever the SConscript is that
declares them. This meant all the enums, params, etc, ended up in the
unittest lib.o.partial.

This should make any theoretical benefits of splitting up the files more
pronounced (faster link times, less memory usage), but unfortunately it
also magnifies the downsides like having more copies of common symbols
floating around the build directory. A quick check shows that this
increases the size of the X86 build directory when building gem5.opt
from 6.6GB to 8.8GB. This also shows the very significant effect these
duplicated common symbols have on the size of the build directory.

Change-Id: I64070d950395c4c878a293bd6d0f6b8f910c5a93
---
M src/SConscript
1 file changed, 7 insertions(+), 1 deletion(-)



diff --git a/src/SConscript b/src/SConscript
index 538d8aa..2edf884 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -367,6 +367,8 @@
         PySource.tnodes[self.tnode] = self
         PySource.symnames[self.symname] = self

+        Source(self.cpp, tags=tags, add_tags='python')
+
 class SimObject(PySource):
     '''Add a SimObject python file as a python source object and add
     it to a list of sim object modules'''
@@ -1016,6 +1018,7 @@

 # C++ parameter description files
 if GetOption('with_cxx_config'):
+    Source.set_group(joinpath(env['BUILDDIR'], 'cxx_config'))
     for name,simobj in sorted(sim_objects.items()):
         py_source = PySource.modules[simobj.__module__]
         extra_deps = [ py_source.tnode ]
@@ -1070,6 +1073,7 @@
     Source(cxx_config_init_cc_file)

 # Generate all enum header files
+Source.set_group(joinpath(env['BUILDDIR'], 'enums'))
 for name,enum in sorted(all_enums.items()):
     py_source = PySource.modules[enum.__module__]
     extra_deps = [ py_source.tnode ]
@@ -1087,6 +1091,7 @@

 # Generate SimObject Python bindings wrapper files
 if env['USE_PYTHON']:
+    Source.set_group(joinpath(env['BUILDDIR'], 'python', '_m5'))
     for name,simobj in sorted(sim_objects.items()):
         py_source = PySource.modules[simobj.__module__]
         extra_deps = [ py_source.tnode ]
@@ -1195,6 +1200,7 @@

 env.Command('debug/flags.cc', Value(debug_flags),
             MakeAction(makeDebugFlagCC, Transform("TRACING", 0)))
+Source.set_group(joinpath(env['BUILDDIR'], 'debug'))
 Source('debug/flags.cc')

 # version tags
@@ -1266,7 +1272,6 @@
     for source in PySource.all:
         marshal_env.Command(source.cpp, [ py_marshal, source.tnode ],
                         MakeAction(embedPyFile, Transform("EMBED PY")))
-        Source(source.cpp, tags=source.tags, add_tags='python')

 ########################################################################
 #
@@ -1275,6 +1280,7 @@
 #

 # List of constructed environments to pass back to SConstruct
+Source.set_group(joinpath(env['BUILDDIR'], 'base'))
 date_source = Source('base/date.cc', tags=[])

 gem5_binary = Gem5('gem5')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40621
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I64070d950395c4c878a293bd6d0f6b8f910c5a93
Gerrit-Change-Number: 40621
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to