I don't want make to consume both CPU's.
Ged.
-----Original Message----- From: ros-diffs-bounces@reactos.org [mailto:ros-diffs-bounces@reactos.org] On Behalf Of dreimer@svn.reactos.org Sent: 20 August 2008 10:10 To: ros-diffs@reactos.org Subject: [ros-diffs] [dreimer] 35473: make automatically behaves like makex when there is more then one CPU Core now. makex kept for now to keep compatible.
Author: dreimer Date: Wed Aug 20 04:10:07 2008 New Revision: 35473
URL: http://svn.reactos.org/svn/reactos?rev=35473&view=rev Log: make automatically behaves like makex when there is more then one CPU Core now. makex kept for now to keep compatible.
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd trunk/tools/RosBE/RosBE-Windows/Root/RosBE.mac
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Buil... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] Wed Aug 20 04:10:07 2008 @@ -103,11 +103,20 @@ )
:: +:: Get the number of CPUs in the system so we know how many jobs to execute. +:: To modify the number used alter the options used with cpucount: +:: No Option - Number of CPUs. +:: -x1 - Number of CPUs, plus 1. +:: -x2 - Number of CPUs, doubled. +:: -a - Determine the cpu count based on the inherited process affinity mask. +:: +for /f "usebackq" %%i in (`"%_ROSBE_BASEDIR%\Tools\cpucount.exe" -x1`) do set CPUCOUNT=%%i +:: :: Check if we are using -j or not. :: -if "%1" == "multi" ( - if not "%2" == "" ( - title 'makex %2' parallel build started: %TIMERAW% +if %CPUCOUNT% GTR 2 ( + if not "%1" == "" ( + title 'makex %1' parallel build started: %TIMERAW% ) else ( title 'makex' parallel build started: %TIMERAW% ) @@ -139,27 +148,17 @@ goto :EOF
:BUILDMULTI - :: - :: Get the number of CPUs in the system so we know how many jobs to execute. - :: To modify the number used alter the options used with cpucount: - :: No Option - Number of CPUs. - :: -x1 - Number of CPUs, plus 1. - :: -x2 - Number of CPUs, doubled. - :: -a - Determine the cpu count based on the inherited process affinity mask. - :: - for /f "usebackq" %%i in (`"%_ROSBE_BASEDIR%\Tools\cpucount.exe" -x1`) do set CPUCOUNT=%%i - if %_ROSBE_SHOWTIME% == 1 ( if %_ROSBE_WRITELOG% == 1 ( - "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt" + "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt" ) else ( - "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 + "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %* ) ) else ( if %_ROSBE_WRITELOG% == 1 ( - "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt" + "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt" ) else ( - "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 + "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %* ) ) goto :EOF
Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.mac URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/RosB... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.mac [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.mac [iso-8859-1] Wed Aug 20 04:10:07 2008 @@ -7,7 +7,7 @@ ENV = set HELP = "%_ROSBE_BASEDIR%\Help.cmd" $* MAKE = "%_ROSBE_BASEDIR%\Build.cmd" $* -MAKEX = "%_ROSBE_BASEDIR%\Build.cmd" multi $* +MAKEX = "%_ROSBE_BASEDIR%\Build.cmd" $* RADDR2LINE = "%_ROSBE_BASEDIR%\reladdr2line.cmd" $* RENV = for /f "usebackq tokens=*" %i in (`set _ROSBE_`) do @echo %i SCUT = "%_ROSBE_BASEDIR%\scut.cmd" $*
I agree.
gedmurphy schrieb:
I don't want make to consume both CPU's.
Ged.
-----Original Message----- From: ros-diffs-bounces@reactos.org [mailto:ros-diffs-bounces@reactos.org] On Behalf Of dreimer@svn.reactos.org Sent: 20 August 2008 10:10 To: ros-diffs@reactos.org Subject: [ros-diffs] [dreimer] 35473: make automatically behaves like makex when there is more then one CPU Core now. makex kept for now to keep compatible.
Author: dreimer Date: Wed Aug 20 04:10:07 2008 New Revision: 35473
URL: http://svn.reactos.org/svn/reactos?rev=35473&view=rev Log: make automatically behaves like makex when there is more then one CPU Core now. makex kept for now to keep compatible.
Timo Kreuzer wrote:
I agree.
Me too :-) IMO, this should never be changed, especially because we had problems with multiple gcc threads in the past and not everyone wants RosBE to take all his processor performance.
Best regards,
Colin
Indeed, I occasionally use make when I want to leave other cores for other tasks.
On Aug 20, 2008, at 6:31 PM, Timo Kreuzer wrote:
I agree.
gedmurphy schrieb:
I don't want make to consume both CPU's.
Ged.
-----Original Message----- From: ros-diffs-bounces@reactos.org [mailto:ros-diffs- bounces@reactos.org] On Behalf Of dreimer@svn.reactos.org Sent: 20 August 2008 10:10 To: ros-diffs@reactos.org Subject: [ros-diffs] [dreimer] 35473: make automatically behaves like makex when there is more then one CPU Core now. makex kept for now to keep compatible.
Author: dreimer Date: Wed Aug 20 04:10:07 2008 New Revision: 35473
URL: http://svn.reactos.org/svn/reactos?rev=35473&view=rev Log: make automatically behaves like makex when there is more then one CPU Core now. makex kept for now to keep compatible.