Announcement

Collapse
No announcement yet.

Tool for measuring FPS in games

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • dammarin
    started a topic Tool for measuring FPS in games

    Tool for measuring FPS in games

    AFAICT, nothing like this exists for Linux. Is it at all possible to do?

    Clearly the Phoronix Test Suite measures FPS of various games, but I'm not a programmer and wouldn't be able to make nor heads nor tails from it.

    Basically, I'm looking for even a quick-and-dirty solution which would show the FPS of an app (game) and dump it into a file for further processing. If possible, both for Linux and OS X.

    Any ideas?

    Thanks.

  • priestnot
    replied
    Never mind I already got it to work.

    Thank you for all your help.

    Leave a comment:


  • priestnot
    replied
    Thank you for all your help.
    It worked now it created and writes to the log file.

    By the way is there a way to print the actual FPS instead of the frame time?

    Leave a comment:


  • curaga
    replied
    I could reproduce with the SDL2 test programs, git now supports SDL2 for both glx and egl.

    Leave a comment:


  • priestnot
    replied
    More info:
    I am using extreme tux racer (but it is to be used with other programs)

    I added some prints to you code to see If I understood what it was doing...
    Code:
    $ LD_PRELOAD=./libframetime.so etracer 
    	Called: *dlsym()
    		:if (!realdlsym) = true
    
    	Called: initdlsym()
    		: initdlsym() if(!realdlsym) = true (this is the first one were it calls realdlsym = dlvsym(libdl, "dlsym", "GLIBC_2.0");
    
    	Called: *dlsym()
                    Does not enter any of the If's 
    	Called: *dlsym()
                    Does not enter any of the If's 
    
            Repeats more 32 times
    
    	Called: init()
    	enters in the ifndef NO_EGL
    
    
    Extreme TuxRacer SVN Development --  http://www.extremetuxracer.com 
    (c) 2007 The ETRacer team
    (c) 2004-2005 The PPRacer team
    (c) 1999-2001 Jasmin F. Patry<[email protected]>
    ETRacer comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to redistribute it under certain conditions.
    See http://www.gnu.org/copyleft/gpl.html for details.
    
    	Called: *dlsym()
                    Does not enter any of the If's 
    	Called: *dlsym()
                    Does not enter any of the If's 
    	Called: *dlsym()
                    Does not enter any of the If's 
    	Called: *dlsym()
                    Does not enter any of the If's 
    	Called: *dlsym()
                    Does not enter any of the If's 
    	Called: *dlsym()
                    Does not enter any of the If's 
    %%% etracer warning: Attempt to bind to Texture unloaded texture: `b-herring_run_icon'
    
    	Called: deinit()

    Leave a comment:


  • curaga
    replied
    Thanks, but that info is only useful for the dlsym not found issue, which was already fixed. You haven't mentioned what application you're measuring, and I'd need to reproduce it somehow.

    Leave a comment:


  • priestnot
    replied
    I do not know if it helps but here you have all the information I have gather:

    Code:
    $ readelf -a /lib/i386-linux-gnu/lib* /lib/i386-linux-gnu/libdl*.so |grep dlsym
      2180: 00124550   106 FUNC    GLOBAL DEFAULT   12 [email protected]@GLIBC_PRIVATE
    001a20e8  00003c07 R_386_JUMP_SLOT   00000000   dlsym
        60: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (9)
      2180: 00124550   106 FUNC    GLOBAL DEFAULT   12 [email protected]@GLIBC_PRIVATE
        33: 00000e40   136 FUNC    GLOBAL DEFAULT   13 [email protected]@GLIBC_2.0
        33: 00000e40   136 FUNC    GLOBAL DEFAULT   13 [email protected]@GLIBC_2.0
    00004038  00001007 R_386_JUMP_SLOT   00000000   dlsym
        16: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (6)
    0002410c  00004b07 R_386_JUMP_SLOT   00000000   dlsym
        75: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (5)
    0002410c  00004b07 R_386_JUMP_SLOT   00000000   dlsym
        75: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (5)
    00036130  00005407 R_386_JUMP_SLOT   00000000   dlsym
        84: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (5)
    00036130  00005407 R_386_JUMP_SLOT   00000000   dlsym
        84: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (5)
    000160f8  00003f07 R_386_JUMP_SLOT   00000000   dlsym
        63: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (13)
    000160f8  00003f07 R_386_JUMP_SLOT   00000000   dlsym
        63: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (13)
    0000e09c  00002607 R_386_JUMP_SLOT   00000000   dlsym
        38: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (14)
    0000e09c  00002607 R_386_JUMP_SLOT   00000000   dlsym
        38: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (14)
    0007412c  00004e07 R_386_JUMP_SLOT   00000000   dlsym
        78: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (8)
    0007412c  00004e07 R_386_JUMP_SLOT   00000000   dlsym
        78: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (8)
    000170b8  00002d07 R_386_JUMP_SLOT   00000000   dlsym
        45: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (7)
    000170b8  00002d07 R_386_JUMP_SLOT   00000000   dlsym
        45: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (7)
    000190d0  00003807 R_386_JUMP_SLOT   00000000   __libc_dlsym
        56: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_PRIVATE (19)
       715: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]@GLIBC_PRIVA
    000190d0  00003807 R_386_JUMP_SLOT   00000000   __libc_dlsym
        56: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_PRIVATE (19)
       715: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]@GLIBC_PRIVA
    000080b0  00002f07 R_386_JUMP_SLOT   00000000   __libc_dlsym
        47: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_PRIVATE (9)
    000080b0  00002f07 R_386_JUMP_SLOT   00000000   __libc_dlsym
        47: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_PRIVATE (9)
    00021110  00004607 R_386_JUMP_SLOT   00000000   dlsym
        70: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (10)
    000e619c  00006807 R_386_JUMP_SLOT   00000000   dlsym
       104: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (13)
    000e619c  00006807 R_386_JUMP_SLOT   00000000   dlsym
       104: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (13)
    000060a4  00002907 R_386_JUMP_SLOT   00000000   dlsym
        41: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (6)
    000060a4  00002907 R_386_JUMP_SLOT   00000000   dlsym
        41: 00000000     0 FUNC    GLOBAL DEFAULT  UND [email protected]_2.0 (6)
        33: 00000e40   136 FUNC    GLOBAL DEFAULT   13 [email protected]@GLIBC_2.0

    Leave a comment:


  • priestnot
    replied
    I just tested your new src (support older 32-bit glibc) and aparently it start working. At least it does not give me the same error.

    The problem is that the output file is always empty. (I tried with a custon output and with the default)

    HAPPY NEW YEAR by the way...

    Leave a comment:


  • Serafean
    replied
    Originally posted by priestnot View Post
    Sorry did not understand the question. But if you want to know the OS and the drivers, the OS is Ubuntu based distro and the drivers depends on the graphic card (can be Nvidia, ATI, Intel)
    Wasn't a question, was a suggestion to use GALLIUM_HUD (environment variable, google it) when using the opensource drivers. IMO nothing is more precise than the driver directly telling you.

    Serafean

    Leave a comment:


  • curaga
    replied
    Me? Sure, that's where I checked the path from. But it's two minutes of wasted time for a distro I do not use, when most distros have libs in standard paths.

    Leave a comment:

Working...
X