feature freeze time

Development directions, tasks, and features being actively implemented or pursued by the development team.
Post Reply
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

if you dont compile your own kernel, you should still be able to setup a tmpfs directory (most dists compile support for it in), just do mount -t tmpfs -o size=somesize <dir> I think would work, i'm not a linux console to check and all my tmpfs dirs have long been put into fstab.

for VS, i would suggest making it 750MB. it only uses as much ram as needed. I forget how much ram compiling with debugging symbols takes, or autoconf vs cmake, but it shouldn't be larger than that.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: feature freeze time

Post by chuck_starchaser »

Thanks! I'm looking at the man page for mount and so far I can't find tmpfs but found,

Code: Select all

Mount options for ramfs
       Ramfs  is  a  memory  based  filesystem.  Mount  it  and you have it. Unmount it and it is gone. Present since Linux
       2.3.99pre4.  There are no mount options.
Never mind; I found it:

Code: Select all

Mount options for tmpfs
       size=nbytes
              Override  default  maximum  size  of  the filesystem.  The size is given in bytes, and rounded down to entire
              pages.  The default is half of the memory. The size parameter also accepts a suffix %  to  limit  this  tmpfs
              instance  to that percentage of your physical RAM: the default, when neither size nor nr_blocks is specified,
              is size=50%
That's one thing I was looking for: What units to use for size.
The other is what to expect of it: When does it save modified files?; not until I unmount it?
And should I use it with the local repo?, with the cmake folder?, both?
Found this interesting page:
http://www.brighthub.com/computing/linu ... /9170.aspx
It would seem to imply that files are NOT saved to disk at all. Sorry; I know nothing about this stuff.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

tmpfs is not saved to the disk at all. And it's not a ramdisk. It's basically serving the same function as a ramdisk. You specify the size i believe by MB. Just test it out and run df -h and see what it says it is.

tmpfs is also pageable, so it will be swapped out if needed. It's very handy if you want to do a lot of rapid building. But i would not do any sort of developing in it, as you could potentially lose a decent amount of work that way. Really, the safest and least amount of work way to use tmpfs to help compile times is to use cmake and create your build directory in a tmpfs and read from disk and write to tmpfs. You dramatically decrease disk io contention as eventually your kernel is going to need to write to disk while you're still reading from it ...

I usually use tmpfs for frequent write directories that contain data i dont care if i lose if i suddenly have a problem. Scripts can take care of syncing contents of tmpfs directories with their disk counterparts.
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: feature freeze time

Post by klauss »

chuck_starchaser wrote:The other is what to expect of it: When does it save modified files?; not until I unmount it?
It doesn't save anything.
When you unmount it, everything's gone.
It's for temporary "storage" only - ie, a way to give volatile memory a filesystem's structure. But it's still volatile memory.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: feature freeze time

Post by klauss »

safemode wrote:tmpfs is also pageable, so it will be swapped out if needed. It's very handy if you want to do a lot of rapid building. But i would not do any sort of developing in it, as you could potentially lose a decent amount of work that way. Really, the safest and least amount of work way to use tmpfs to help compile times is to use cmake and create your build directory in a tmpfs and read from disk and write to tmpfs. You dramatically decrease disk io contention as eventually your kernel is going to need to write to disk while you're still reading from it ...
I don't get it.
The kernel already caches and buffers writes, and performs them when I/O activity is low.
There's a 5-second commit limit IIRC, but it can be configured higher. In fact, many power profilers set it to 30s or more.

I've always had more than sufficient I/O performance when building, and I'm using old PATA drives. If you're worried about I/O, you can make -j3, the extra process will use the waiting time of the other processes to compile. But I've always had 100% CPU saturation with -j2 anyways, so I don't use -j3.

If you have a very old distro, you may benefit from adding the option "relatime" to all your ext3 mounts. It decreases read-related writes (ext3 is forced to write every time you read, because it has to update the access times of all files touched, relatime decreases the need to do that, noatime removes it completely).

Newer distros come preconfigured with relatime by default.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

Writes will occur to the disk whenever your journal fills up as well, the time limit is just for committing when this doesn't happen.

In any case, i dont use tmpfs in this manner. I usually only use it for certain /var directories on my main machine. I use it extensively in setups that utilize flash storage though. Avoiding writes to flash is always good.

If i had a newer system with gobs and gobs of ram like they all have today, i'd definitely use it and copy my entire /usr directory to ram on bootup. mmm..

it's basically the replacement of shm from back in the day, only more useful.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: feature freeze time

Post by chuck_starchaser »

Alright; I think I won't mess with it, then; my barracudas are pretty smart at prioritizing and scheduling reads and writes, anyways.

DAMN!
I just remembered, I'm not using my barracudas! I'm using a crappy wd since I installed Ubuntu.
Maybe I should move /tmp to barracuda 1 and firefox's temp folder to barracuda 2 or something.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: feature freeze time

Post by chuck_starchaser »

Question:
Shouldn't vegastrike's installer, by default, make its folder tree "realtime" or "noatime"?
I know there's no installer for linux; but perhaps the instructions should include a "how-to-speedup file access for vegastrike" section.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

any optimizing your storage suggestion would probably be welcomed.. but I dont think you'll see much improvement with anything less than drastically increasing your read io latency and bandwidth. basically, move to appropriate raid setups and goto sata if you are on pata.


in other news:

after work i committed some tweaks to cmake. You should now be able to select enabling certain cpu specific flags (i added some initial basic ones to start off with),

This does not enable builtin C++ types that gcc has for explicitly using things like SSE and such in code, (this is not inline assembly i'm talking about, but C/C++ code which needs no macros to compile to vectorized code vs standard, only the appropriate cxxflags for enabling that particular simd, like mtuning to an appropriate cpu and -mfpmath=sse and -msse[2,3] etc.

We might still need macros to make such future uses of builtins (if we decide to use them) to not be seen by msVC.

For instance, we might benefit from 3dnow ified matrix calculations... as well as see code in places (all over physics). The problem unfortunately, is that we're still far from these things actually contributing a significant amount to the overall cpu usage of the game. So optimizing them right now is a waste of time, hence, backburner.
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: feature freeze time

Post by klauss »

@safemode: those macros include the prefetch instruction, which does indeed help in many places. So if you can enable them, it would be great.

They work both in msvc and gcc, all you need is some preprocessor magic to #define the macro to nothing when it is not available, and code can use it where it helps regardless of availability.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: feature freeze time

Post by chuck_starchaser »

How do I display the flags available to cmake?

As far as 3DNow! is concerned, I have a full vector and matrix library I wrote years ago. The pity is that 3DNow! is AMD-only. I could probably easily translate it to SSEx, and it would probably be much more efficient and faster than anything the compiler, or even explicit intrinsics, could achieve. I remember getting the routine that flips a matrix from row major to column major optimized down to a handful of 3DNow instructions, which is not trivial.
I also have a special angle class, for angles that are seldom updated but frequently used in trigonometry: All operators that changed the angle caused the updating of degrees, radians and cycles, as well as sine and cosine members; and the global sine and cosine functions were overloaded for this special angle type to simply read the cached values.
(And the updating of sine and cosine was super-fast, with both being computed at the same time, in parallel.)
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: feature freeze time

Post by klauss »

Explicit intrinsics are pretty much the same as inline assembly.
The intrinsics map almost 1-to-1 to SSE instructions.

I bet the intrinsics even have their own 3DNow implementation, which won't map 1-to-1, perhaps, but perhaps so. Most SIMD instruction sets are pretty much equivalent: shuffle here, shuffle there, add/sub packed int8/16/32s, with/without saturation, etc...

EDIT: actually, the hardest (as in painful) part of getting proper SIMD code isn't the instruction and logic itself, but the need to align stuff to 128-bit boundaries. Malloc and friends don't, so you have to do it yourself. If you're processing an external buffer (possibly misaligned), you have to add prologue/epilogue to process the misaligned head/tail of the buffer... all painful stuff.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

chuck_starchaser wrote:How do I display the flags available to cmake?

As far as 3DNow! is concerned, I have a full vector and matrix library I wrote years ago. The pity is that 3DNow! is AMD-only. I could probably easily translate it to SSEx, and it would probably be much more efficient and faster than anything the compiler, or even explicit intrinsics, could achieve. I remember getting the routine that flips a matrix from row major to column major optimized down to a handful of 3DNow instructions, which is not trivial.
I also have a special angle class, for angles that are seldom updated but frequently used in trigonometry: All operators that changed the angle caused the updating of degrees, radians and cycles, as well as sine and cosine members; and the global sine and cosine functions were overloaded for this special angle type to simply read the cached values.
(And the updating of sine and cosine was super-fast, with both being computed at the same time, in parallel.)

gcc lets you write the code in standard C/C++ using a special call to a builtin function. This allows the code to compile to vectorized forms as chosen by the compiler at compiletime, rather than having to inline asm. I was thinking more along that when it comes to micro-optimizations rather than having chunks of asm thrown about.
Ed Sweetman endorses this message.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

chuck_starchaser wrote:How do I display the flags available to cmake?
ccmake is your friend if you really want to see what's available to you. That's what i use if i want to veer off any default settings.

so you run ccmake <path to source> in your bin dir. Then it shows you the variables and such. You can then select a cpu arch from the list and hit c to reconfigure, it will then show you your updated CXXFLAGS (assuming you are in Release mode, i have yet to conditionally enable viewing the various CXXFLAGS depending on build mode), they can be viewed in advanced mode though. You then generate your makefile with g. then run make

You can see the actual commands cmake uses by doing # VERBOSE=1 make this displays the actual commandlines used. But is usually unnecessary.
Ed Sweetman endorses this message.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

i forgot about -ftree-vectorize and -ftree-slp-vectorize

I'm going to add this to the CPU_OPTS variable in cmake.

In addition to that, i'm going to look into -ffast-math or -fassociative-math , as that also turns on floating point auto-vectorization.

Though, the -math options tend to break api compliance and so may cause bugs in cases where we are telling gcc to use a precision for comparing values that the -math argument borks up.


I dont expect these compiler flags to measurably change overall performance but i think it will make the bloated functions even more noticeable by reducing the noise floor wherever possible. For when we do profiling and all.

edit: in the future when we do get down to micro-optimizing to make a difference, we might want to look into open64, amd's open source gpl2 compiler. It's _much_ more geared towards auto-vectorization and optimization for modern hardware (both amd and intel) and seems likely to be fairly drop-in for gcc ..http://developer.amd.com/cpu/open64/Pages/default.aspx
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: feature freeze time

Post by klauss »

You're forgetting opcode.

It may help opcode.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

true, but opcode is not slow even without those options. It could half the time opcode consumes and you still wouldn't notice that in the game because it's not our bottleneck.

regardless, i'll be adding the options ... Just trying to avoid code-side micro-optimizations.

edit: last comment on page 6 got edited, Also, i'm going to profile the code tomorrow. The trick to profiling the code is creating a synthetic simulation that portrays worst case performance seen in the regular game. ie, i need a mission that creates 12 to 40 ships of various types around a jump point or space station and they're all attacking eachother. Most of the test missions are python files created a decade ago and dont even function as intended anymore.
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: feature freeze time

Post by klauss »

Opcode isn't stressed much now, but it will be as soon as a feature that has been in queue for a looong looong time gets implemented.

Namely, once shields drop to zero, bolts and beams should collide against the collider mesh rather than the shield bubble.

It really modifies gameplay, and at least two mods require that behavior.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: feature freeze time

Post by chuck_starchaser »

safemode wrote:
chuck_starchaser wrote:How do I display the flags available to cmake?
ccmake is your friend if you really want to see what's available to you. That's what i use if i want to veer off any default settings.

so you run ccmake <path to source> in your bin dir. Then it shows you the variables and such. You can then select a cpu arch from the list and hit c to reconfigure, it will then show you your updated CXXFLAGS (assuming you are in Release mode, i have yet to conditionally enable viewing the various CXXFLAGS depending on build mode), they can be viewed in advanced mode though. You then generate your makefile with g. then run make

You can see the actual commands cmake uses by doing # VERBOSE=1 make this displays the actual commandlines used. But is usually unnecessary.
This is what I see in the upper right screen in cmake:

Code: Select all

/usr/lib/libavcodec.so                                                                                                    
 AVFORMAT_LIBRARY                 /usr/lib/libavformat.so                                                                                                   
 AVUTIL_LIBRARY                   /usr/lib/libavutil.so                                                                                                     
 CMAKE_BACKWARDS_COMPATIBILITY    2.4                                                                                                                       
 CMAKE_BUILD_TYPE                 Release                                                                                                                   
 CMAKE_CXX_FLAGS_REWITHDEBINFO     -DNV_CUBE_MAP -DBOOST_PYTHON_NO_PY_SIGNATURES -include config.h -pipe -O2 -Wall -Wno-unused-function -Wno-unused-variable
 CMAKE_INSTALL_PREFIX             /usr/local                                                                                                                
 DL_LIB                           /usr/lib/libdl.so                                                                                                         
 EXECUTABLE_OUTPUT_PATH                                                                                                                                     
 FFMPEG_INCLUDE_DIR               FFMPEG_INCLUDE_DIR-NOTFOUND                                                                                               
 GTK2_ATK_INCLUDE_DIR             /usr/include/atk-1.0                                                                                                      
 GTK2_ATK_LIBRARY                 /usr/lib/libatk-1.0.so                                                                                                    
 GTK2_CAIRO_INCLUDE_DIR           /usr/include/cairo                                                                                                        
 GTK2_CAIRO_LIBRARY               /usr/lib/libpangocairo-1.0.so                                                                                             
 GTK2_GDK_INCLUDE_DIR             /usr/lib/gtk-2.0/include                                                                                                  
 GTK2_GDK_LIBRARY                 /usr/lib/libgdk-x11-2.0.so                                                                                                
 GTK2_GDK_PIXBUF_LIBRARY          /usr/lib/libgdk_pixbuf-2.0.so                                                                                             
 GTK2_GLIBCONFIG_INCLUDE_DIR      /usr/lib/glib-2.0/include                                                                                                 
 GTK2_GLIB_INCLUDE_DIR            /usr/include/glib-2.0                                                                                                     
 GTK2_GLIB_LIBRARY                /usr/lib/libglib-2.0.so                                                                                                   
 GTK2_GMODULE_LIBRARY             /usr/lib/libgmodule-2.0.so                                                                                                
 GTK2_GOBJECT_LIBRARY             /usr/lib/libgobject-2.0.so                                                                                                
 GTK2_GTHREAD_LIBRARY             /usr/lib/libgthread-2.0.so                                                                                                
 GTK2_GTKGL_INCLUDE_DIR           GTK2_GTKGL_INCLUDE_DIR-NOTFOUND                                                                                           
 GTK2_GTKGL_LIBRARY               GTK2_GTKGL_LIBRARY-NOTFOUND                                                                                               
 GTK2_GTK_INCLUDE_DIR             /usr/include/gtk-2.0                                                                                                      
 GTK2_GTK_LIBRARY                 /usr/lib/libgtk-x11-2.0.so                                                                                                
 GTK2_PANGO_INCLUDE_DIR           /usr/include/pango-1.0                                                                                                    
 GTK2_PANGO_LIBRARY               /usr/lib/libpango-1.0.so                                                                                                  
 LIBRARY_OUTPUT_PATH                                                                                                                                        
 OPENAL_INCLUDE_DIR               /usr/include/AL                                                                                                           
 OPENAL_LIBRARY                   /usr/lib/libopenal.so                                                                                                     
 SDLMAIN_LIBRARY                  /usr/lib/libSDLmain.a                                                                                                     
 SDL_INCLUDE_DIR                  /usr/include/SDL                                                                                                          
 SDL_LIBRARY                      /usr/lib/libSDLmain.a;/usr/lib/libSDL.so;-lpthread                                                                        
 USE_NET_THREAD_POSIX             OFF                                                                                                                       
 UTIL_LIB                         /usr/lib/libutil.so                                                                                                       
 ogg_INCLUDE_DIR                  /usr/include/ogg                                                                                                          
 ogg_LIBRARY                      /usr/lib/libogg.so                                                                                                        
 vorbis_INCLUDE_DIR               /usr/include/vorbis                                                                                                       
 vorbis_LIBRARY                   /usr/lib/libvorbis.so                                                                                                     
 vorbisfile_LIBRARY               /usr/lib/libvorbisfile.so
I believe I have ffmpeg; any idea why it's not found?
Also GTK... If I need them and they are not found, how come the program compiles? And if I don't need them,
why's it looking for them? Also, any reason to have "-Wno-unused-function -Wno-unused-variable"? Unused function
would be a bonanza, --to know what can be deleted... :D Unused variables should be got rid of, too.
Switching to advanced mode I see other missing paths...

Code: Select all

/usr/include                                                                                                              
 OPENGL_gl_LIBRARY                /usr/lib/libGL.so                                                                                                         
 OPENGL_glu_LIBRARY               /usr/lib/libGLU.so                                                                                                        
 OPENGL_xmesa_INCLUDE_DIR         OPENGL_xmesa_INCLUDE_DIR-NOTFOUND                                                                                         
 PKG_CONFIG_EXECUTABLE            /usr/bin/pkg-config                                                                                                       
 PNG_INCLUDE_DIRS                 /usr/include                                                                                                              
 PNG_LIBRARIES                    /usr/lib/libpng.so                                                                                                        
 PYTHON_INCLUDE_PATH              /usr/include/python2.6                                                                                                    
 PYTHON_LIBRARY                   /usr/lib/python2.6/config/libpython2.6.so                                                                                 
 SDLMAIN_LIBRARY                  /usr/lib/libSDLmain.a                                                                                                     
 SDL_INCLUDE_DIR                  /usr/include/SDL                                                                                                          
 SDL_LIBRARY                      /usr/lib/libSDLmain.a;/usr/lib/libSDL.so;-lpthread                                                                        
 USE_NET_THREAD_POSIX             OFF                                                                                                                       
 UTIL_LIB                         /usr/lib/libutil.so                                                                                                       
 X11_ICE_INCLUDE_PATH             /usr/include                                                                                                              
 X11_ICE_LIB                      /usr/lib/libICE.so                                                                                                        
 X11_SM_LIB                       /usr/lib/libSM.so                                                                                                         
 X11_X11_INCLUDE_PATH             /usr/include                                                                                                              
 X11_X11_LIB                      /usr/lib/libX11.so                                                                                                        
 X11_XShm_INCLUDE_PATH            /usr/include                                                                                                              
 X11_XTest_INCLUDE_PATH           /usr/include                                                                                                              
 X11_XTest_LIB                    X11_XTest_LIB-NOTFOUND                                                                                                    
 X11_Xaccessrules_INCLUDE_PATH    X11_Xaccessrules_INCLUDE_PATH-NOTFOUND                                                                                    
 X11_Xaccessstr_INCLUDE_PATH      /usr/include                                                                                                              
 X11_Xau_INCLUDE_PATH             /usr/include                                                                                                              
 X11_Xau_LIB                      /usr/lib/libXau.so                                                                                                        
 X11_Xcomposite_INCLUDE_PATH      /usr/include                                                                                                              
 X11_Xcomposite_LIB               /usr/lib/libXcomposite.so                                                                                                 
 X11_Xcursor_INCLUDE_PATH         /usr/include                                                                                                              
 X11_Xcursor_LIB                  /usr/lib/libXcursor.so                                                                                                    
 X11_Xdamage_INCLUDE_PATH         /usr/include                                                                                                              
 X11_Xdamage_LIB                  /usr/lib/libXdamage.so                                                                                                    
 X11_Xdmcp_INCLUDE_PATH           /usr/include                                                                                                              
 X11_Xdmcp_LIB                    /usr/lib/libXdmcp.so                                                                                                      
 X11_Xext_LIB                     /usr/lib/libXext.so                                                                                                       
 X11_Xfixes_INCLUDE_PATH          /usr/include                                                                                                              
 X11_Xfixes_LIB                   /usr/lib/libXfixes.so                                                                                                     
 X11_Xft_INCLUDE_PATH             /usr/include                                                                                                              
 X11_Xft_LIB                      /usr/lib/libXft.so                                                                                                        
 X11_Xinerama_INCLUDE_PATH        /usr/include                                                                                                              
 X11_Xinerama_LIB                 /usr/lib/libXinerama.so                                                                                                   
 X11_Xinput_INCLUDE_PATH          /usr/include                                                                                                              
 X11_Xinput_LIB                   /usr/lib/libXi.so                                                                                                         
 X11_Xkb_INCLUDE_PATH             /usr/include                                                                                                              
 X11_Xkblib_INCLUDE_PATH          /usr/include                                                                                                              
 X11_Xlib_INCLUDE_PATH            /usr/include                                                                                                              
 X11_Xpm_INCLUDE_PATH             X11_Xpm_INCLUDE_PATH-NOTFOUND/usr/lib/libXrender.so                                                                                                    
 X11_Xscreensaver_INCLUDE_PATH    X11_Xscreensaver_INCLUDE_PATH-NOTFOUND                                                                                    
 X11_Xscreensaver_LIB             X11_Xscreensaver_LIB-NOTFOUND                                                                                             
 X11_Xshape_INCLUDE_PATH          /usr/include                                                                                                              
 X11_Xt_INCLUDE_PATH              /usr/include                                                                                                              
 X11_Xt_LIB                       /usr/lib/libXt.so                                                                                                         
 X11_Xutil_INCLUDE_PATH           /usr/include                                                                                                              
 X11_Xv_INCLUDE_PATH              X11_Xv_INCLUDE_PATH-NOTFOUND                                                                                              
 X11_Xv_LIB                       X11_Xv_LIB-NOTFOUND                                                                                                       
 X11_Xxf86misc_LIB                X11_Xxf86misc_LIB-NOTFOUND                                                                                                
 X11_dpms_INCLUDE_PATH            /usr/include                                                                                                              
 X11_xf86misc_INCLUDE_PATH        X11_xf86misc_INCLUDE_PATH-NOTFOUND                                                                                        
 X11_xf86vmode_INCLUDE_PATH       X11_xf86vmode_INCLUDE_PATH-NOTFOUND                                                                                       
 ZLIB_INCLUDE_DIR                 /usr/include                                                                                                              
 ZLIB_LIBRARY                     /usr/lib/libz.so               
But I can't find anything resembling processor-specific flags.
This is after svn up-ping, in advanced view; and I tried running it with the source pahth and with the cmake build path, and same thing.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

Did you create a new build dir or rerun cmake in a previous one. Apparently you're not using an updated CMakelist.

Some things are searched for but not needed and so dont error when they're not found because they're part of a package that finds numerous things (some needed some not).

I can hide those things from the standard ccmake screen, just haven't had the need to ..it'll get done in the future though to clean up the screen.

I'm going to commit a new cmake file tonight and you can check it out there.

Options should look like this in ccmake

NOTE: if you use ccmake, you _have_ to specify a build type. otherwise it is empty and uses no build type. Right now i'm not sure if that's intentional (since you are supposed to be able to specify at build-time any sort of build type, regardless of what you set ccmake up with initially.

Code: Select all

                                                    Page 1 of 3
 AVCODEC_LIBRARY                 */usr/local/lib/libavcodec.so               
 AVFORMAT_LIBRARY                */usr/local/lib/libavformat.so              
 AVUTIL_LIBRARY                  */usr/local/lib/libavutil.so                
 CMAKE_BACKWARDS_COMPATIBILITY   *2.4                                        
 CMAKE_BUILD_TYPE                *                                           
 CMAKE_CXX_FLAGS_RELEASE         * -DNV_CUBE_MAP -DBOOST_PYTHON_NO_PY_SIGNATU
 CMAKE_INSTALL_PREFIX            */usr/local                                 
 CPUAMD_k10                      *OFF                                        
 CPUAMD_k8                       *OFF                                        
 CPUAMD_k9                       *OFF                                        
 CPUINTEL_core2                  *OFF                                        
 CPUINTEL_nocona                 *OFF                                        
 CPUINTEL_p4                     *OFF                                        
 CPUINTEL_prescott               *OFF                                        
 DL_LIB                          */usr/lib/libdl.so                          
 EXECUTABLE_OUTPUT_PATH          *                                           
 FFMPEG_INCLUDE_DIR              */usr/local/include/ffmpeg                  

Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: feature freeze time

Post by chuck_starchaser »

safemode wrote:Did you create a new build dir or rerun cmake in a previous one. Apparently you're not using an updated CMakelist.
Same as the previous one; didn't know I needed to create a new one.
Some things are searched for but not needed and so dont error when they're not found because they're part of a package that finds numerous things (some needed some not).

I can hide those things from the standard ccmake screen, just haven't had the need to ..it'll get done in the future though to clean up the screen.
Would be good to hide not needed stuff. I'm your guinea pig, here. I got confused by all those not-found messages; so will many others in the future; and then you'll spend 20% of your free time answering forum posts. Best to invest the time up front and clean up the process so that it's clear and straightforward for experts and newbies alike. Also, I'd suggest there should be no un-supported options; like, I think last time I picked a wrong target or something. If it's not supported, it shouldn't be there --if possible, of course.
I'm going to commit a new cmake file tonight and you can check it out there.
Okay, I'll wait until you're done and then create a new cmake folder and try it.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

I'll do the cmake update later today.

It's always best to just delete the build dir and start fresh when dealing with an update to the cmake config, rather than overwriting everything.
EDIT: If you dont want to rebuild everything though, i'm pretty sure deleting the CMakeCache file will suffice.
EndEDIT

The following code block represents all the vectorized loops when building only the vegastrike bin. This does not include STL or other system headers that get vectorized too.

down the road, we can use -ftree-vectorize-verbose=2 to see what doesn't get vectorized and why and if any are in fast paths.

Code: Select all


/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/Ice/IceRevisitedRadix.cpp:262: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/Ice/IceRevisitedRadix.cpp:273: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/Ice/IceRevisitedRadix.cpp:263: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/Ice/IceRevisitedRadix.cpp:491: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/Ice/IceRevisitedRadix.cpp:452: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/Ice/IceRevisitedRadix.cpp:389: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/Ice/IceRevisitedRadix.cpp:380: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/csgeom2/opbox.cpp:231: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/collide2/OPC_OptimizedTree.cpp:620: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/networking/netserver.cpp:179: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/unit_generic.cpp:1260: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh_poly.cpp:153: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh_poly.cpp:152: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh.cpp:247: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh.cpp:247: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh_xml.cpp:1938: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/config_xml.cpp:74: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/config_xml.cpp:69: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/config_xml.cpp:74: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/config_xml.cpp:69: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/in_joystick.cpp:121: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/in_joystick.cpp:121: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/in_joystick.cpp:184: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/in_joystick.cpp:184: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/in_joystick.cpp:95: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/in_joystick.cpp:340: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/in_joystick.cpp:366: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/in_mouse.cpp:235: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/cockpit.cpp:1884: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/cockpit.cpp:1884: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/cockpit.cpp:1908: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/cockpit.cpp:1884: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/cockpit.cpp:1908: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh_bin.cpp:236: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/file_main.h:59: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/file_main.h:81: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/file_main.h:81: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/file_main.h:59: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh_gfx.cpp:199: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh_gfx.cpp:1570: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/mesh_gfx.cpp:1282: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/technique.cpp:342: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/vsbox.cpp:86: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gfx/vsbox.cpp:86: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/aldrv/al_listen.cpp:44: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/aldrv/al_sound.cpp:133: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/basecomputer.cpp:4660: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/cmd/cont_terrain.cpp:231: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gldrv/gl_program.cpp:253: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gldrv/hashtable_3d.h:21: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gldrv/gl_sphere_list.cpp:63: note: LOOP VECTORIZED.
/usr/src/userspace/vega/svnvega/safe-branch/src/gldrv/gl_sphere_list.cpp:63: note: LOOP VECTORIZED.

Profiling however, may take more effort than it's worth as finding the right gameplay issues to exploit and make more pronounced is probably gonna have to be handcrafted in a mission file.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: feature freeze time

Post by chuck_starchaser »

Did it. Got the vectorizations for K8. No noticeable change in performance, tho.
My suspicion is that that these automatic vectorizations are probably pretty dumb; like spending time moving data from general registers to mmx or sse registers, only to do one or two simd instructions and then move everything back to general registers.
I'm pretty confident that to take real advantage of simd instructions you just have to roll up your sleeves and write the inline assembly; no shortcuts; but I may be wrong.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: feature freeze time

Post by safemode »

chuck_starchaser wrote:Did it. Got the vectorizations for K8. No noticeable change in performance, tho.
My suspicion is that that these automatic vectorizations are probably pretty dumb; like spending time moving data from general registers to mmx or sse registers, only to do one or two simd instructions and then move everything back to general registers.
I'm pretty confident that to take real advantage of simd instructions you just have to roll up your sleeves and write the inline assembly; no shortcuts; but I may be wrong.
no need for assembly, gcc offers you options for writing code that will be properly aligned and padded so the auto-vectorization finds it and deals with it.

The problem with not seeing the benefit is that the bottlenecks in the code aren't simple loop related arithmetic. You can vectorize the shit out of many parts of the code base and you wouldn't notice a thing when you play the game. The slow parts are parts that aren't ever going to get vectorized, inline assembly or not.

Plus, the code you have there doesn't have -ftree-vectorize in the cxxflags yet. Not that it would likely matter that much.


I think today, i'll play the game for 30 minutes, profiling regular gameplay. Then look at that data. This isn't all about vectorization so much as pinpointing our new bottlenecks, the vectorization is just a bit of free gravy. It's also something i want to do in order to provide a baseline for various functions so that if and when they are rewritten, we can see if there is a performance regression and if we'll have to reverse the change if it can't be made to at least meet what it replaced.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: feature freeze time

Post by chuck_starchaser »

I think you were saying that much of the time is spent in unit creation. If that's so, probably one of the biggest performance changes we could make would be to install a fast, block allocator. Boost used to have one...
I just found this:
http://warp.povusers.org/FSBAllocator/
Check this out too:
http://en.wikibooks.org/wiki/Optimizing ... llocations
I'll add these links and any others I find to the Programming Links sticky.

EDIT:
Found the Boost Pool Allocator.
http://vegastrike.sourceforge.net/forum ... 50#p116250
Post Reply