Giter Club home page Giter Club logo

voglperf's Introduction

voglperf

Benchmarking tool for Linux OpenGL games. Spews frame information every second. Example:

##############################################################################
Voglperf framerates from pid 12106.
##############################################################################
3564.35 fps frames:3567 time:1000.74ms min:0.23ms max:14.72ms
4144.01 fps frames:4145 time:1000.24ms min:0.23ms max:1.20ms
4037.20 fps frames:4038 time:1000.20ms min:0.23ms max:1.20ms
4059.60 fps frames:4060 time:1000.10ms min:0.23ms max:1.09ms

Can also write frame times to a log file which can then be graphed with gnuplot, etc.

cat /tmp/voglperf.glxspheres64.2014_02_12-16_02_20.csv:
# Feb 12 16:02:20 - glxspheres64                                                                                                                                                    
# 3414.30 fps frames:3417 time:1000.79ms min:0.23ms max:15.00ms
0.42
0.34
0.30
0.30
0.29
0.29
...

Building

We use cmake and the voglproj binaries are put into the bin directory. A Makefile is included to simplify this a bit and see how cmake is launched.

To build amd64 and i386 packages:

make

To build just i386:

make voglperf32

To build just amd64:

make voglperf64

To delete the build32, build64, and bin build files:

make clean

Building voglperf on SteamOS

  • Click "Settings" on top right.
  • Click "Interface" on left.
  • Check "Enable access to the Linux desktop".
  • Head back to main menu, click "Exit", "Return to Desktop" (or hit ctrl+alt+F8)
  • Click "Activities" on top left, then "Applications".
  • Click "Terminal" icon.
  • Type passwd and enter a password.
  • Install build packages:
  • sudo apt-get install steamos-dev
  • echo "deb http://ftp.debian.org/debian wheezy main contrib non-free" | sudo tee -a /etc/apt/sources.list
  • sudo apt-get update
  • sudo apt-get install git ca-certificates cmake g++ gcc-multilib g++-multilib
  • sudo apt-get install mesa-common-dev libedit-dev libtinfo-dev libtinfo-dev:i386
  • Get the volgperf source:
  • git clone https://github.com/ValveSoftware/voglperf.git
  • Build:
  • cd voglperf
  • make

Run voglperf on SteamOS

  • Run voglperf as "steam" user.
  • sudo -u steam bin/voglperfrun64
  • You should see something like:
  • Starting web server...
  • Started http://172.16.10.93:8081
  • Double click "Return to Steam" (or hit ctrl+alt+f7)
  • Connect to voglperf url with Chrome or Firefox browser from another computer.
  • Browser should show something like:
Connected to ws://172.16.10.93:8081/ws  
  Welcome!
Gameid: ''  
    WS Connections: 1  
    logfile: Off (Launch option)  
    verbose: Off  
    fpsspew: Off  
    fpsshow: Off (Launch option)  
    dry-run: Off (Launch option)  
    ld-debug: Off (Launch option)  
    xterm: Off (Launch option)  
    debugger-pause: Off (Launch option)
  • To launch TF2, do:
  • game start 440
  • Click OK button on "Allow game launch" dialog.
  • logfile start 10 ;
  • Should see something like:
  • Logfile started: /tmp/voglperf.Team-Fortress-2.2014_04_01-06_28_16.csv (10 seconds).

  • Logfile stopped: http://172.16.10.93:8081/logfile/tmp/voglperf.Team-Fortress-2.2014_04_01-06_28_16.csv

  • Right click on logfile link and say "Open in New Tab" (or whatever).

Run vogl w/ SSH on SteamOS

  • Run ip addr and note IP address of your SteamOS box.
  • ssh [email protected]
  • cd voglperf
  • sudo -u steam bin/voglperfrun64
  • Run various commands:
    • help
    • status
    • showfps on
    • game start 440
    • etc.

Notes

  • HTML needs to be cleaned up.
  • Occasionally web client will think two clients are connected and duplicated messages. (Needs to be tracked down.)
  • We are currently adding voglperf as a SteamOS package.

Logfiles

Display graph in gnuplot (install gnuplot-x11):

gnuplot -p -e 'set terminal wxt size 1280,720;set ylabel "milliseconds";set yrange [0:100]; plot "/tmp/voglperf.Team-Fortress-2.2014_02_13-13_06_20.csv" with lines'

Output graph to blah.png:

gnuplot -p -e 'set output "blah.png";set terminal pngcairo size 1280,720 enhanced;set ylabel "milliseconds";set yrange [0:100]; plot "/tmp/voglperf.Team-Fortress-2.2014_02_13-13_06_20.csv" with lines'

Example Screenshot

Example screenshot

License and Credits

voglperf code is under the MIT License. The license file Repository License is stored within the repository (and is reproduced here):

                       VOGLPERF CODE  LICENSE

  Copyright 2013-2014 RAD Game Tools and Valve Software
  All Rights Reserved.

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.

src/eintr_wrapper.h- Chromium Authors (2012); BSD-style License. [Current License] (https://chromium.googlesource.com/chromium/src.git/+/master/LICENSE)

src/webby/ - Andreas Fredriksson (2012); BSD-style License Current License; Source Location

src/libedit/ - Jess Thrysoee and NetBSD (2014); BSD-style License Current License; Source Location

voglperf's People

Contributors

christophhaag avatar dscharrer avatar gotschelm avatar imgxx avatar kingtaurus avatar mikesartain avatar plagman avatar ttimo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

voglperf's Issues

need `make install` target

In some distros it is better have a make install target.
I am working on an ebuild and i have no clue as to what files are useful or not.
So i am just assuming everything in bin/ needs to be installed.

Log file should include timestamp of every frame

With microsecond accuracy.

csv file example:

# frame number, frame end timestamp with microseconds, frame time microseconds
1,1489260325.123444,5123
2,1489260325.129121,6777
3,1489260325.135912,5555

This will allow graphing with x axis as a time. This will also allow averaging in time, doing various smoothing algorithms (exponential moving average, moving averages in time, max and min over last 5 seconds, etc), instead just in frames, additionally it allows many other things, like creations of histograms, cumulative distributions, etc, properly normalized between files with different numbers of frames, or with different sections of single play / benchmarks, split on time, and not frames.

Also, the fact that the voglperf show some min/max statistics in the header, means to me, that the file is not being written, until the game ends or logging period ends.

Instead the file should be streamed, and the statistics should be dumped at the end. This way there is no overhead of buffering this in memory. Writing to the file can be done asynchronously from a separate thread with some small buffering if needed. Users can put it in tmpfs, or just leave it to the kernel to flush it really to a disk, so there should be no significant performance impact.

ERROR: Could not retrieve pid of launched game.

Voglperf seems to have trouble finding the PID of the started game:

Welcome!
Gameid: ''
  WS Connections: 1
  logfile: Off (Launch option)
  verbose: Off
  fpsprint: Off
  fpsshow: Off
  dry-run: Off (Launch option)
  ld-debug: Off (Launch option)
  xterm: Off (Launch option)
  debugger-pause: Off (Launch option)
> fpsshow on
fpsshow: On
> fpsprint on
fpsprint: On
> game start 253030
GameID: 253030 (gameid253030)
LD_PRELOAD=./libvoglperf32.so:/home/leinardi/temp/voglperf/bin/libvoglperf64.so:$LD_PRELOAD
VOGLPERF_CMD_LINE="--msqid=131075  --showfps"
Steam url string:
  steam steam://run/253030//VOGLPERF_CMD_LINE="--msqid=131075  --showfps" LD_PRELOAD=./libvoglperf32.so:/home/leinardi/temp/voglperf/bin/libvoglperf64.so:$LD_PRELOAD %command%
Launch string:
  steam steam://run/253030//VOGLPERF_CMD_LINE%3d%22--msqid%3d131075%20%20--showfps%22%20LD_PRELOAD%3d.%2flibvoglperf32.so%3a%2fhome%2fleinardi%2ftemp%2fvoglperf%2fbin%2flibvoglperf64.so%3a%24LD_PRELOAD%20%25command%25
Waiting for child process to start...
Running Steam on ubuntu 14.04 64-bit
STEAM_RUNTIME is enabled automatically
ERROR: Could not retrieve pid of launched game.
> game start 440
GameID: 440 (TF2)
LD_PRELOAD=./libvoglperf32.so:/home/leinardi/temp/voglperf/bin/libvoglperf64.so:$LD_PRELOAD
VOGLPERF_CMD_LINE="--msqid=131075  --showfps"
Steam url string:
  steam steam://run/440//VOGLPERF_CMD_LINE="--msqid=131075  --showfps" LD_PRELOAD=./libvoglperf32.so:/home/leinardi/temp/voglperf/bin/libvoglperf64.so:$LD_PRELOAD %command%
Launch string:
  steam steam://run/440//VOGLPERF_CMD_LINE%3d%22--msqid%3d131075%20%20--showfps%22%20LD_PRELOAD%3d.%2flibvoglperf32.so%3a%2fhome%2fleinardi%2ftemp%2fvoglperf%2fbin%2flibvoglperf64.so%3a%24LD_PRELOAD%20%25command%25
Waiting for child process to start...
Running Steam on ubuntu 14.04 64-bit
STEAM_RUNTIME is enabled automatically
ERROR: Could not retrieve pid of launched game.

System Info: https://gist.github.com/leinardi/4c1779f0f800850724d1

MIT license vs voglperf code license

I don't understand your licensing. Your README says the code is under the MIT license, but in your license file you call it "VOGLPERF CODE LICENSE". The body of the LICENSE seems to be a copy of the MIT license, but everybody has to check it word-by-word now since you gave it a different name. Also in the header it says "All Rights Reserved", which is not compatible to the MIT license, so that statement doesn't make any sense.

If this should have been the MIT license, please just use the MIT license (https://choosealicense.com/licenses/mit/) and replace "[year] [fullname]", but nothing else.

VoglPerf does not use "Launch Options" for a game

Hi,

Actually, there is a bug for the Witcher 2 with keyboards and we must to set "LC_ALL=C %command%" in the Launch Options for this game to play correctly.

Problem with voglperf, when i launch the game with it, the option set in steam is not use by voglperf. This is the launch command use by vogleperf :

steam steam://run/20920//VOGLPERF_CMD_LINE="--msqid=0 --showfps" LD_PRELOAD=/home/berillions/Desktop/voglperf/bin/libvoglperf32.so:/home/berillions/Desktop/voglperf/bin/libvoglperf64.so:$LD_PRELOAD %command%

You can see that "LC_ALL=C" is not used...
How to fix this problem ?

Thanks,
Max

Compiling errors when using the command

HI dear author,
It's truly a honor to write a letter to you, I'm building your project nowadays and found the error when building as following, I wonder if there is a chance that you know the reason? :)

image

image

thank you
best regards to you
William

fpsprint not working.

I have tried using fpsprint on, however nothing spews out to console nor the browser.
Tried both with Dota 2 and CS:GO

logging works but i want frames.

Linker cannot find lpthread

When trying to compile for x86 i receive the following error.

/usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status

Getting error when I make the package on Fedora 23 (x64)

Here's my system:
Linux tinodesk 4.3.3-303.fc23.x86_64 #1 SMP Tue Jan 19 18:31:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

When I try to make the package on Fedora 23 I get the following error:

cmake options:
-DCMAKE_BUILD_TYPE='Release': Build debug or release. (Debug|Release)
-DCMAKE_VERBOSE='OFF': Spew cmake project options. (On|Off)
-DBUILD_X64='': Build 32 or 64-bit. (On|Off)

Building 64-bit voglperf...
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
tinfo_LIBRARY
linked by target "voglperfrun" in directory /home/martino/voglperf/src

-- Configuring incomplete, errors occurred!
See also "/home/martino/voglperf/build_x86_64/CMakeFiles/CMakeOutput.log".
See also "/home/martino/voglperf/build_x86_64/CMakeFiles/CMakeError.log".
make[1]: Entering directory '/home/martino/voglperf/build_x86_64'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory '/home/martino/voglperf/build_x86_64'
Makefile:16: recipe for target 'voglperfnative' failed
make: *** [voglperfnative] Error 2

Possible race condition in log files.

My application is rendering frames in about 100-200μs each, at times, and sometimes when the frametimes are around there, voglperf's log files will have an extra "0." before a frametime line. It looks like:

...
0.13
0.17
0.0.17
0.20
...

And I'm not sure exactly how that comes about.

Replace dependency on tinfo with ncurses

libtinfo on many systems is just a symlink to ncurses.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6deaba5..2e83a5f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,10 +41,7 @@ message("MAKE_LIBRARY_ARCHITECTURE is ${CMAKE_LIBRARY_ARCHITECTURE}")

 # add libedit lib
 include_directories(${CMAKE_SOURCE_DIR}/libedit-3.1/include)
-set(LIBEDIT_LIBS
-    "${CMAKE_SOURCE_DIR}/libedit-3.1/lib/${LIBDIR}/libedit.a"
-    tinfo
-    )
+set(LIBEDIT_LIBS "${CMAKE_SOURCE_DIR}/libedit-3.1/lib/${LIBDIR}/libedit.a" ncurses)

 set(SRC_LIST
     voglperfrun.cpp

steam: not found

Hi,

Running in Ubuntu 15.04 64bit, I have tried both voglperfun32 and voglperfrun64 and neither seem to be able to locate steam. It is installed, and can be run from a terminal by simply entering steam.

This is what the Terminal spits out when voglperf cannot locate Steam:

> game start 255710

GameID: 255710 (gameid255710)

LD_PRELOAD=/home/ismail/Desktop/voglperf/bin/libvoglperf32.so:/home/ismail/Desktop/voglperf/bin/libvoglperf64.so:$LD_PRELOAD

VOGLPERF_CMD_LINE="--msqid=131076  --showfps"

Steam url string:
  steam steam://run/255710//VOGLPERF_CMD_LINE="--msqid=131076  --showfps" LD_PRELOAD=/home/ismail/Desktop/voglperf/bin/libvoglperf32.so:/home/ismail/Desktop/voglperf/bin/libvoglperf64.so:$LD_PRELOAD %command%

Launch string:
  steam steam://run/255710//VOGLPERF_CMD_LINE%3d%22--msqid%3d131076%20%20--showfps%22%20LD_PRELOAD%3d%2fhome%2fismail%2fDesktop%2fvoglperf%2fbin%2flibvoglperf32.so%3a%2fhome%2fismail%2fDesktop%2fvoglperf%2fbin%2flibvoglperf64.so%3a%24LD_PRELOAD%20%25command%25
Waiting for child process to start...
sh: 1: steam: not found

In this instance I am attempting to run Cities Skylines. There were no issues when I ran make to get the bin files.

Steam is installed, and runs without issue. Running games is also fine (Cities Skylines, Borderlands the Pre-Sequel, CSGO).

Unable to build 32bit binary on openSUSE 13.1 x86_64

$ LANG=C make -j5 voglperf32

cmake options:
  -DCMAKE_BUILD_TYPE='Release': Build debug or release. (Debug|Release)
  -DCMAKE_VERBOSE='OFF': Spew cmake project options. (On|Off)
  -DBUILD_X64='False': Build 32 or 64-bit. (On|Off)

Building 32-bit voglperf...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yuri/voglperf/build32
make[1]: Entering directory `/home/yuri/voglperf/build32'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
make[2]: Entering directory `/home/yuri/voglperf/build32'
make[3]: Entering directory `/home/yuri/voglperf/build32'
make[3]: Leaving directory `/home/yuri/voglperf/build32'
make[3]: Entering directory `/home/yuri/voglperf/build32'
Linking C shared library /home/yuri/voglperf/bin/libvoglperf32.so
/usr/lib64/libGL.so: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[3]: *** [/home/yuri/voglperf/bin/libvoglperf32.so] Error 1
make[3]: Leaving directory `/home/yuri/voglperf/build32'
make[2]: *** [CMakeFiles/voglperf.dir/all] Error 2
make[2]: Leaving directory `/home/yuri/voglperf/build32'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/yuri/voglperf/build32'
make: *** [voglperf32] Error 2

The cmake script seeks for libGL.so in a wrong directory: /usr/lib64 instead of /usr/lib. As a result, script uses lib with wrong arch and binary cannot be built.

Can't build in Xubuntu 14.04 64bit

I want to get an idea of my FPS for The Witcher 2 so I found this voglperf tool but I am not sure how to build it. I downloaded the source, unpacked the archive, cd'd into the directory and ran make and I receive the following error
Linking CXX executable /home/ubu/voglperf-0.1/bin/voglperfrun32
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
make[3]: *** [/home/ubu/voglperf-0.1/bin/voglperfrun32] Error 1
make[3]: Leaving directory /home/ubu/voglperf-0.1/build32' make[2]: *** [CMakeFiles/voglperfrun.dir/all] Error 2 make[2]: Leaving directory/home/ubu/voglperf-0.1/build32'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/ubu/voglperf-0.1/build32'
make: *** [voglperf32] Error 2

can someone please help me build this or point me to precompiled .deb's for ubuntu 14.04?

Can't build under Ubuntu 17.10

Install dependencies

snigel@workstation:~$ sudo apt-get install git ca-certificates cmake g++ gcc-multilib g++-multilib
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version (20170717).
cmake is already the newest version (3.9.1-1).
g++ is already the newest version (4:7.2.0-1ubuntu1).
g++-multilib is already the newest version (4:7.2.0-1ubuntu1).
gcc-multilib is already the newest version (4:7.2.0-1ubuntu1).
git is already the newest version (1:2.14.1-1ubuntu4).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
snigel@workstation:~$ sudo apt-get install mesa-common-dev libedit-dev libtinfo-dev libtinfo-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libedit-dev is already the newest version (3.1-20170329-1).
libtinfo-dev is already the newest version (6.0+20160625-1ubuntu1).
mesa-common-dev is already the newest version (17.2.2-0ubuntu1).
libtinfo-dev:i386 is already the newest version (6.0+20160625-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Try to build.

snigel@workstation:~$ git clone https://github.com/ValveSoftware/voglperf.git
snigel@workstation:~$ cd voglperf
snigel@workstation:~/voglperf$ make

cmake options:
  -DCMAKE_BUILD_TYPE='Release': Build debug or release. (Debug|Release)
  -DCMAKE_VERBOSE='': Spew cmake project options. (On|Off)
  -DBUILD_X64='': Build 32 or 64-bit. (On|Off)

-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
Building 64-bit voglperf...
CMake Error at build_options.cmake:136 (list):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  CMakeLists.txt:16 (include)


-- Configuring incomplete, errors occurred!
See also "/home/snigel/voglperf/build_x86_64/CMakeFiles/CMakeOutput.log".
See also "/home/snigel/voglperf/build_x86_64/CMakeFiles/CMakeError.log".
make[1]: Entering directory '/home/snigel/voglperf/build_x86_64'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/home/snigel/voglperf/build_x86_64'
Makefile:16: recipe for target 'voglperfnative' failed
make: *** [voglperfnative] Error 2

Can't build on Mageia 4 x64

Hi.
Im trying build Voglperf on my system but I have problem :/

[x@localhost voglperf (master)]$ make voglperf64

cmake options:
-DCMAKE_BUILD_TYPE='Release': Build debug or release. (Debug|Release)
-DCMAKE_VERBOSE='OFF': Spew cmake project options. (On|Off)
-DBUILD_X64='True': Build 32 or 64-bit. (On|Off)

Building 64-bit voglperf...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/x/voglperf/build64
make[1]: Entering directory '/home/x/voglperf/build64'
make[2]: Entering directory '/home/x/voglperf/build64'
make[3]: Entering directory '/home/x/voglperf/build64'
make[3]: Leaving directory '/home/x/voglperf/build64'
make[3]: Entering directory '/home/x/voglperf/build64'
make[3]: *** No rule to make target '/usr/lib64/libGL.so', required by '/home/x/voglperf/bin/libvoglperf64.so'. Stop.
make[3]: Leaving directory '/home/x/voglperf/build64'
CMakeFiles/Makefile2:63: commands for target 'CMakeFiles/voglperf.dir/all' failed
make[2]: *** [CMakeFiles/voglperf.dir/all] error 2
make[2]: Leaving directory '/home/x/voglperf/build64'
Makefile:75: commands for target 'all' failed
make[1]: *** [all] error 2
make[1]: Leaving directory '/home/x/voglperf/build64'
Makefile:19: commands for target 'voglperf64' failed
make: *** [voglperf64] error 2
[x@localhost voglperf (master)]$

Its some about /libGL.so? Hmm i have installed fglrx driver and have default mesa pack - stock in my system but why this error present? BTW. sorry for bad english translation :)

voglperf tries to link static library to its dynamic LD_PRELOAD libary

voglperf build tries to link libSDL2 library statically to voglperf's LD_PRELOAD library.

LD_PRELOAD is shared library. Shared libraries are compiled as position independent code, with -fPIC. Static libraries (in general) aren't, in the distributions. Because of this, voglperf compile fails, GCC doesn't (anymore) allow shared objects to have TEXT relocations.

I guess by static linking you try to avoid conflicts with Steam games that also link libSDL2, but the correct solution is just not using SDL2 in the LD_PRELOAD.

Your preload library is really simple, there's nothing that needs SDL2, all that functionality is already easily available in C library.

Of the SDL functionality you're using, these are just wrappers for libc functions:

  • SDL_memset()
  • SDL_isspace()
  • SDL_getenv()
  • SDL_strstr()
  • SDL_snprintf()

And rest are trivial to change to use standard C-library POSIX functions:

  • SDL_Delay() -> nanosleep()
  • SDL_LoadObject() -> dlopen()
  • SDL_LoadFunction() -> dlsym()

Voglperf Not Working In SteamOS

Following instruction from voglperf main github page for steamos (https://github.com/ValveSoftware/voglperf#building-voglperf-on-steamos) when intending to build 32 and 64 bit packages with make there appears to be 64 bit build only. What i see when building with make is

desktop@steamos:~/voglperf$ make

cmake options:
  -DCMAKE_BUILD_TYPE='Release': Build debug or release. (Debug|Release)
  -DCMAKE_VERBOSE='OFF': Spew cmake project options. (On|Off)
  -DBUILD_X64='': Build 32 or 64-bit. (On|Off)

Building 64-bit voglperf...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/desktop/voglperf/build_unknown
make[1]: Entering directory `/home/desktop/voglperf/build_unknown'
make[2]: Entering directory `/home/desktop/voglperf/build_unknown'
make[3]: Entering directory `/home/desktop/voglperf/build_unknown'
make[3]: Leaving directory `/home/desktop/voglperf/build_unknown'
make[3]: Entering directory `/home/desktop/voglperf/build_unknown'
Linking C shared library /home/desktop/voglperf/bin/libvoglperf64.so
make[3]: Leaving directory `/home/desktop/voglperf/build_unknown'
[ 25%] Built target voglperf
make[3]: Entering directory `/home/desktop/voglperf/build_unknown'
make[3]: Leaving directory `/home/desktop/voglperf/build_unknown'
make[3]: Entering directory `/home/desktop/voglperf/build_unknown'
Linking CXX executable /home/desktop/voglperf/bin/voglperfrun64
make[3]: Leaving directory `/home/desktop/voglperf/build_unknown'
[100%] Built target voglperfrun
make[2]: Leaving directory `/home/desktop/voglperf/build_unknown'
make[1]: Leaving directory `/home/desktop/voglperf/build_unknown'
desktop@steamos:~/voglperf$ man make
desktop@steamos:~/voglperf$ cd build_unknown/
desktop@steamos:~/voglperf/build_unknown$ ls
CMakeCache.txt  CMakeFiles  cmake_install.cmake  index.html  Makefile
desktop@steamos:~/voglperf/build_unknown$

When running sudo -u steam bin/voglperfrun64 we get

desktop@steamos:~/voglperf$ sudo -u steam bin/voglperfrun64

Starting web server...
  Started http://192.168.1.66:8081

[webby] WebSocket connected GET on /ws
Welcome!

which is good but when trying to start a game we get

> game start 20920

GameID: 20920 (gameid20920)
WARNING: realpath /home/desktop/voglperf/bin/./libvoglperf32.so failed 'No such file or directory.'

LD_PRELOAD=./libvoglperf32.so:/home/desktop/voglperf/bin/libvoglperf64.so:$LD_PRELOAD

VOGLPERF_CMD_LINE="--msqid=65538 "

Steam url string:
  steam steam://run/20920//VOGLPERF_CMD_LINE="--msqid=65538 " LD_PRELOAD=./libvoglperf32.so:/home/desktop/voglperf/bin/libvoglperf64.so:$LD_PRELOAD %command%

Launch string:
  steam steam://run/20920//VOGLPERF_CMD_LINE%3d%22--msqid%3d65538%20%22%20LD_PRELOAD%3d.%2flibvoglperf32.so%3a%2fhome%2fdesktop%2fvoglperf%2fbin%2flibvoglperf64.so%3a%24LD_PRELOAD%20%25command%25
Waiting for child process to start...
Running Steam on steamos 1.0 64-bit
STEAM_RUNTIME is enabled automatically

ERROR: Could not retrieve pid of launched game.

I have not worked out what i need to do to get both 32bit and 64bit builds available for voglperf and posted here because of the unexpected behaviour of voglperf.

SteamOS is the latest beta build 133.

[minor] Use the available packaged libraries for libedit

Within Ubuntu (and many other Linux variants) it is possible to use the package libedit-dev to provide necessary headers and libraries for building voglperf.

apt-file list libedit-dev
libedit-dev: /usr/include/editline/history.h
libedit-dev: /usr/include/editline/readline.h
libedit-dev: /usr/include/histedit.h
libedit-dev: /usr/lib/x86_64-linux-gnu/libedit.a
libedit-dev: /usr/lib/x86_64-linux-gnu/libedit.so
libedit-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/libedit.pc
libedit-dev: /usr/share/doc/libedit-dev/changelog.Debian.gz
libedit-dev: /usr/share/doc/libedit-dev/copyright
...snip...

Diffs are below:

diff -p0 src/libedit-3.1/include/histedit.h /usr/include/histedit.h 
*** src/libedit-3.1/include/histedit.h  2014-09-03 10:35:20.000000000 -0700
--- /usr/include/histedit.h 2013-10-21 06:51:16.000000000 -0700
***************
*** 1 ****
! /*    $NetBSD: histedit.h,v 1.50 2013/01/22 20:23:21 christos Exp $   */
--- 1 ----
! /*    $NetBSD: histedit.h,v 1.51 2013/07/12 17:48:29 christos Exp $   */
*************** int      el_wget(EditLine *, int, ...);
*** 281 ****
--- 282 ----
+ int        el_cursor(EditLine *, int);

There is no difference between editline/readline.h;

Font size for fpsshow is small on big screens/resolutions

Hi,

I've been runing Voglperf to check out the Witcher 2's performance on Ubuntu 14.04 64bit. The issue I'm running into is that the font size for the OSD of frames-per-second is very very small. I am running at 1920x1080 on a 25" screen.

Is there a current way to increase the font size? I am using release 0.2, and have been scouring the source code, but see no section for text size that can be modified (I've only skimmed through the code though).

Whilst the font size is the most important at the moment, the color of the font is also hard to see (dark red). Any assistance or guidance is greatly appreciated!

Compile error

Error at "make voglperf64":

Linking C shared library /home/img/voglperf/bin/libvoglperf64.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/voglperf.dir/link.txt --verbose=1
/usr/bin/cc  -fPIC -g -Wall -Wextra -fno-omit-frame-pointer -march=corei7 -Wno-unused-parameter -Wno-unused-function -fno-strict-aliasing -fno-math-errno -fvisibility=hidden -Wno-unused-local-typedefs   -fno-exceptions -g -O2 -DNDEBUG -Wl,--no-undefined -Wl,--version-script=/home/img/voglperf/src/libvoglperf_linker_script.txt -shared -Wl,-soname,libvoglperf64.so -o /home/img/voglperf/bin/libvoglperf64.so CMakeFiles/voglperf.dir/voglperf.c.o -Wl,-Bstatic -lSDL2 -Wl,-Bdynamic -ldl -lpthread -lrt -lm 
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libSDL2.a(SDL_string.o): перемещение R_X86_64_32S для «.rodata» не может использоваться при создании общего объекта; перекомпилируйте с -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libSDL2.a: error adding symbols: Некорректное значение

System information: https://gist.github.com/imgxx/9203971

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.