Previous Thread
Next Thread
Print Thread
#111011 - 10/09/17 09:46 PM Compile stats  
Joined: Feb 2014
Posts: 87
Golden Child Online content
Member
Golden Child  Online Content
Member

Joined: Feb 2014
Posts: 87
So it's fun to know how long and how many resources a compile takes:

I'm using ubuntu 17.04.

you can use the shell's built in time command

time make -j4

and that will put out something like:

time make -j4
GCC 6.3.0 detected
Compiling src/emu/natkeyboard.cpp...
Archiving libemu.a...
Linking mame64...

real 0m20.428s
user 0m18.012s
sys 0m2.448s

but how much memory does it take?

let's use /usr/bin/time

/usr/bin/time make -j4
GCC 6.3.0 detected
Compiling src/emu/natkeyboard.cpp...
Archiving libemu.a...
Linking mame64...
18.06user 2.48system 0:27.43elapsed 74%CPU (0avgtext+0avgdata 1705048maxresident)k
104176inputs+560208outputs (1146major+1002703minor)pagefaults 0swaps

and if you want a verbose output use

/usr/bin/time --verbose make -j4

and for a full make of mame 0190 on a Intel Core i3-3220 CPU @ 3.30GHz × 4 takes about 55 minutes.

/usr/bin/time --verbose make -j4
GCC 6.3.0 detected
...
Compiling src/mame/mame.cpp...
Compiling generated/version.cpp...
Building driver list...
34618 driver(s) found
Compiling generated/mame/mame/drivlist.cpp...
Linking mame64...
Command being timed: "make -j4"
User time (seconds): 11907.65
System time (seconds): 557.14
Percent of CPU this job got: 376%
Elapsed (wall clock) time (h:mm:ss or m:ss): 55:08.90
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2241060
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1547
Minor (reclaiming a frame) page faults: 221300921
Voluntary context switches: 385912
Involuntary context switches: 1218757
Swaps: 0
File system inputs: 472136
File system outputs: 5079616
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

#111012 - 10/10/17 01:40 AM Re: Compile stats [Re: Golden Child]  
Joined: Feb 2004
Posts: 1,850
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,850
Sydney, Australia
luaengine.cpp is the killer - why not profile that? wink

#111021 - 10/10/17 01:00 PM Re: Compile stats [Re: Vas Crabb]  
Joined: Feb 2014
Posts: 87
Golden Child Online content
Member
Golden Child  Online Content
Member

Joined: Feb 2014
Posts: 87
How do I profile luaengine.cpp?



full compile latest git pull on an Intel Core i5 CPU 750 @ 2.67GHz x 4 cores takes 43 minutes

make clean
/usr/bin/time --verbose make -j4
GCC 6.3.0 detected
...
Building driver list...
34621 driver(s) found
Compiling generated/mame/mame/drivlist.cpp...
Linking mame64...
Command being timed: "make -j4"
User time (seconds): 8749.88
System time (seconds): 509.38
Percent of CPU this job got: 358%
Elapsed (wall clock) time (h:mm:ss or m:ss): 42:59.68
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2235824
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 7201
Minor (reclaiming a frame) page faults: 221822793
Voluntary context switches: 401964
Involuntary context switches: 1496542
Swaps: 0
File system inputs: 1993784
File system outputs: 5175168
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz
stepping : 5
microcode : 0x7
cpu MHz : 2799.000
cache size : 8192 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid dtherm ida
bugs :
bogomips : 5320.30
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:


Moderated by  R. Belmont 

Who's Online Now
3 registered members (Duke, Pernod, Justin), 18 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,426
Posts109,207
Members4,759
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.025s Queries: 14 (0.011s) Memory: 4.9396 MB (Peak: 5.1082 MB) Zlib enabled. Server Time: 2017-10-19 14:32:09 UTC