For various other tasks, we need information about where the CPU is actually the most heavily used in the game, under various run-time conditions.
Because we want to enhance the 3D models and textures quality, increase the game realism, ... we need solutions to increase the frame rates, or keep them at the same level as now.
But for the moment, we only have impressions and ideas about this, no real figures, so we don't know where to work.
Tasks that may need profiling data :
Here are the profiling results we got from various :
Important notes :
See the tables below for details about these variants.
See also the callgrind format files in svn:/trunk/doc/docdevel/profiling for full details (the files from which the following tables have been built).
All figures below are absolute cumulative % elapsed time, except for the lines giving frame rates (frames/s) or update rates (number/s).
Only the significant upper levels of the call graph are given here (indented through the '*' char).
Hard / soft configuration | CML1 | CML1 | CML1 | CML1 | CML1 | CML1 | CML1 | CML1 | CML1 | CML1 |
---|---|---|---|---|---|---|---|---|---|---|
Profiling method | MO1 | MO1 | MO1 | MO1 | MO1 | MO1 | MO1 | MO1 | MO1 | MO1 |
Gaming scenario | SGL1 | SGL1 | SGM1 | SGM1 | SGL1 | SGL1 | SGM1 | SGM1 | SGH1 | SGH1 |
Physics engine | Simu V2 | Simu V3 | Simu V2 | Simu V3 | Simu V2 | Simu V3 | Simu V2 | Simu V3 | Simu V2 | Simu V3 |
Build configuration | Debug | Debug | Debug | Debug | Release | Release | Release | Release | Release | Release |
Speed Dreams | 82,50 | 86,00 | 87,50 | 97,20 | ? | ? | ? | ? | ? | ? |
* libm.so | 2,00 | 5,80 | 4,70 | 15,00 | 1,90 | 5,20 | 4,50 | 14,00 | 10,10 | 35,00 |
* libc.so | 5,80 | 5,30 | 4,60 | 3,80 | 6,40 | 5,90 | 6,00 | 5,60 | 5,90 | 3,60 |
* no-vmlinux (Linux kernel) | 9,00 | 9,50 | 10,20 | 10,60 | 9,10 | 9,00 | 8,70 | 8,60 | 8,70 | 8,10 |
* ReUpdate | 8,50 | 13,20 | 23,80 | 36,70 | ? | ? | ? | ? | ? | ? |
* * ReOneStep | 5,40 | 10,20 | 21,20 | 34,00 | ? | ? | ? | ? | ? | ? |
* * * Simu Vx simUpdate | 3,80 | 8,45 | 16,90 | 30,20 | 0,90 | 1,90 | 2,90 | 6,10 | 8,00 | 16,30 |
* * * Simplix TDriver::drive | 0,75 | 0,60 | 2,40 | 2,00 | 0,40 | 0,80 | 1,20 | 2,10 | 2,80 | 5,00 |
* * * USR drive | 0,50 | 0,45 | 1,60 | 1,40 | 0,30 | 0,60 | 0,80 | 1,80 | 2,20 | 3,80 |
* SSGGraph refresh | 51,70 | 47,30 | 38,60 | 28,20 | 71,10 | 67,70 | 65,10 | 51,30 | 52,10 | 26,90 |
* * /dev/zero (??) | 5,50 | 4,90 | 5,60 | 2,90 | 6,20 | 5,10 | 7,80 | 5,00 | 6,30 | 2,10 |
* * cGrScreen::update | 2,65 | 2,50 | 2,20 | 2,20 | 16,20 | 16,10 | 15,50 | 12,90 | 15,50 | 8,20 |
* * * cGrScreen::camDraw | 1,80 | 1,70 | 1,75 | 1,80 | ? | ? | ? | ? | ? | ? |
* * * cGrBoard::refreshBoard | 0,70 | 0,60 | 0,45 | 0,40 | ? | ? | ? | ? | ? | ? |
* * libGLCore.so.185. | 44,00 | 40,00 | 30,00 | 19,00 | 49,30 | 46,00 | 42,80 | 32,50 | 11,20 | 13,70 |
* * libGL.so.185. | 2,00 | 1,90 | 1,40 | 0,80 | 2,90 | 2,70 | 2,90 | 1,80 | 1,50 | 0,70 |
* * libOpenAL.so | 2,70 | 2,90 | 5,00 | 6,20 | 2,70 | 2,90 | 3,90 | 4,10 | 4,20 | 4,30 |
Frames per second : min-max (mean) | 60-135(87) | 60-125(83) | 24-62(35) | 20-61(34) | 59-181(93) | 58-185(99) | 32-91(46) | 28-88(43) | 17-58(34) | 7-33(22) |
Robots update rate (N per second) | 48 | 51 | 49 | 48 | 52 | ? | ? | ? | ? | 46 |
Simu update rate (N per second) | 496 | 510 | 497 | 502 | 542 | ? | ? | ? | ? | 500 |
Notes:
Comments on the previous table (Medium to high Linux 64 configuration, oprofile tool, debug and release build configurations) :
Note: More variants are to be tested before the above assertions are proved to be true. Mainly Windows build configurations are lacking.
Only the significant upper levels of the call graph are given here (indented through the '*' char).
Hard / soft configuration | CML2 |
---|---|
Profiling method | MO2 |
Gaming scenario | SGL1 |
Physics engine | Simu V2 |
Build configuration | Debug |
Speed Dreams | 100.00 |
* libm.so | 10.40 |
* libc.so | 3.44 |
* no-vmlinux (Linux Kernel) | 8.77 |
* ReUpdate | 41.55 |
* * ReOneStep | 41.31 |
* * * Simu Vx simUpdate | 34.08 |
* * * Simplix TDriver::drive | 3.07 |
* * * USR drive | 1.79 |
* SSGGraph refresh | 0.00 |
* * cGrScreen::update | 0.00 |
* * * cGrScreen::camDraw | 0.00 |
* * * cGrBoard::refreshBoard | 0.00 |
* * libGLCore.so.185. | 0.00 |
* * libGL.so.185. | 0.00 |
* * libOpenAL.so | 27.61 |
Frames per second : min-max (mean) | 6/3600 |
Robots update rate (N per second) | 50? |
Simu update rate (N per second) | 500? |
Notes:
Only the significant upper levels of the call graph are given here (indented through the '*' char).
Hard / soft configuration | CML1 | CML1 | CML1 | CML1 | CML1 | CML1 | CML1 | CML1 |
---|---|---|---|---|---|---|---|---|
Profiling method | MO1 | MO1 | MO1 | MO1 | MO1 | MO1 | MO1 | MO1 |
Gaming scenario | SGL2 | SGL2 | SGL2 | SGL2 | SGL3 | SGL3 | SGL3 | SGL3 |
Physics engine | Simu V2 | Simu V3 | Simu V2 | Simu V3 | Simu V2 | Simu V3 | Simu V2 | Simu V3 |
Build configuration | Debug | Debug | Release | Release | Debug | Debug | Release | Release |
Speed Dreams | 94,5 | 96,9 | 82,9 | 80,6 | 85,4 | 79,2 | 83,2 | 81,7 |
* libc.so | 2,1 | 2,4 | 6,0 | 2,8 | 4,6 | 1,3 | 6,0 | 3,2 |
* no-vmlinux | 17,4 | 13,2 | 17,6 | 11,9 | 19,2 | 14,6 | 17,9 | 11,3 |
* ReUpdate? | 61,3 | 61,3 | 56,3 | 64,4 | 61,6 | 63,3 | 57,7 | 65,7 |
* * ReOneStep? | 60,3 | 60,9 | ? | ? | 60,6 | 62,9 | ? | ? |
* * * Simu Vx simUpdate | 47,7 | 55,4 | 48,2 | 63,1 | 43,9 | 55,5 | 54,8 | 63,6 |
* * librobottools.so | 4,1 | 9,1 | 4,3 | 9,8 | 4,2 | 9,6 | 5,0 | 9,9 |
* * libm.so | 13,3 | 19,8 | 26,0 | 40,9 | 12,8 | 19,5 | 25,4 | 41,6 |
* * * robot::drive | 7,4 | 3,0 | 5,4 | 2,1 | 11,8 | 5,0 | 5,5 | 2,1 |
* * librobottools.so | 0,7 | 0,1 | 0,7 | 0,1 | 0,7 | 0,1 | 0,8 | 0,1 |
* * libm.so | 0,4 | 0,2 | 2,2 | 0,4 | 0,9 | 0,2 | 1,9 | 0,1 |
Robots update rate (N per second) | 3,4 | 1,6 | 4,7 | 2,2 | 2,9 | 1,5 | 4,0 | 2,1 |
Simu update rate (N per second) | 35,2 | 16,7 | 47,3 | 22,2 | 29,5 | 15,2 | 41,3 | 21,6 |
Comments on the previous table (Medium to high Linux 64 configuration, oprofile tool, debug and release build configurations) :
Note : The profiling data files for these tests, especially the "Debug build" ones, gives more details about how the main components of Simu V3 are involved.
Here's how to setup, start, stop profiling, and how to produce reports (needs oprofile, valgrind with cachegrind, kcachegrind).
sudo opcontrol --no-vmlinux --event=default --callgraph=32 sudo cat /root/.oprofile/daemonrc SESSION_DIR=/var/lib/oprofile CHOSEN_EVENTS_0=CPU_CLK_UNHALTED:100000:0:1:1 NR_CHOSEN=1 SEPARATE_LIB=1 SEPARATE_KERNEL=0 SEPARATE_THREAD=0 SEPARATE_CPU=0 VMLINUX=none IMAGE_FILTER= BUF_SIZE=65536 CPU_BUF_SIZE=0 CALLGRAPH=32 XENIMAGE=none sudo opcontrol --start-daemon sudo opcontrol --reset speed-dreams # Start the race (New race) and wait for the real race start (3D world / blind-mode screen). sudo opcontrol --start # Keep SD window visible (no screen saver ...) # Let the race go until the first racer crosses the end line. sudo opcontrol --shutdown # Recommended daemon shutdown/start before each profiling session. opreport -cgf >opreport-cgf.out.txt # Extract call tree + profiling data # Convert to cachegrind format for easy analysis in kcachegrind GUI cat opreport-cgf.out.txt | op2calltree.py >opreport-cgf.op2calltree.py.cachegrind kcachegrind opreport-cgf.op2calltree.py.cachegrind &
Notes:
you can also use gprof2dot.py to produce a PNG image of the call tree with detailed profiling info :
opreport -gdf | gprof2dot.py -f oprofile | dot -Tpng -o opreport-gdf.gprof2dot.png
Start Speed Dreams in valgrind with the callgrind tool and make sure the result is stored in a file which can be read by kcachegrind.
Notes:
1 | USR | Arne Fischer | SC Boxer 96 |
2 | USR | Hans Meyer | SC Boxer 96 |
3 | Simplix | Yuuki Kyousou | SC Boxer 96 |
4 | Simplix | Haruna Say | SC Boxer 96 |
Notes:
Same as Scenario SGL1 "Global light 1", but :
1 | USR | Arne Fischer | SC Boxer 96 |
2 | Simplix | Yuuki Kyousou | SC Boxer 96 |
3 | USR | Hans Meyer | SC Boxer 96 |
4 | Simplix | Haruna Say | SC Boxer 96 |
5 | USR | Tony Davies | SC Cavallo 360 |
6 | Simplix | Vittorio Basso | SC Cavallo 360 |
7 | USR | Ken Rayner | SC Cavallo 360 |
8 | Simplix | Sal Moretti | SC Cavallo 360 |
9 | USR | Mick Donna | SC Murasama NSX |
10 | Simplix | Arnaud Beauchamp | SC Murasama NSX |
11 | USR | Greg Wilson | SC Murasama NSX |
12 | Simplix | Jacques Prewitt | SC Murasama NSX |
Notes:
Same as Scenario SGL1 "Global medium 1", but :
1 | USR | Arne Fischer | SC Boxer 96 |
2 | Simplix | Yuuki Kyousou | SC Boxer 96 |
3 | USR | Hans Meyer | SC Boxer 96 |
4 | Simplix | Haruna Say | SC Boxer 96 |
5 | USR | Tony Davies | SC Cavallo 360 |
6 | Simplix | Vittorio Basso | SC Cavallo 360 |
7 | USR | Ken Rayner | SC Cavallo 360 |
8 | Simplix | Sal Moretti | SC Cavallo 360 |
9 | USR | Mick Donna | SC Murasama NSX |
10 | Simplix | Arnaud Beauchamp | SC Murasama NSX |
11 | USR | Greg Wilson | SC Murasama NSX |
12 | Simplix | Jacques Prewitt | SC Murasama NSX |
13 | USR | Jackie Graham | SC Spirit 300 |
14 | Simplix | Marisol Carrillo | SC Spirit 300 |
15 | USR | Steve Magson | SC Spirit 300 |
16 | Simplix | Luis Barreto | SC Spirit 300 |
17 | USR | Mark Duncan | SC FMC GT4 |
18 | Simplix | Brad Newman | SC FMC GT4 |
19 | USR | Chuck Davis Jr | SC FMC GT4 |
20 | Simplix | Micheal Ashbury | SC FMC GT4 |
21 | USR | Stefan Larsson | SC Lynx 220 |
22 | Simplix | Augustus Booth | SC Lynx 220 |
23 | USR | Don Nelson | SC Lynx 220 |
24 | Simplix | Jeremy Carmicheal | SC Lynx 220 |
Notes:
Same as Scenario SGL1 "Global light 2", but :
Wiki: Index
Wiki: PreparingMultithreading
Wiki: TheWayToRelease2