gsdx linux: plug vtune as Windows

This commit is contained in:
Gregory Hainaut 2016-11-18 22:40:52 +01:00
parent 8abf242e2c
commit d58e43edbf
4 changed files with 15 additions and 9 deletions

View File

@ -80,6 +80,7 @@ for ARG in "$@"; do
--cross-multilib ) flags="$flags -DCMAKE_TOOLCHAIN_FILE=$toolfile"; useCross=1; ;;
--no-cross-multilib ) useCross=0; ;;
--coverity ) CoverityBuild=1; cleanBuild=1; ;;
--vtune ) flags="$flags -DUSE_VTUNE=TRUE" ;;
-D* ) flags="$flags $ARG" ;;
*)

View File

@ -28,6 +28,8 @@ if(DISABLE_BUILD_DATE OR openSUSE)
add_definitions(-DDISABLE_BUILD_DATE)
endif()
option(USE_VTUNE "Plug VTUNE to profile GSdx JIT.")
#-------------------------------------------------------------------------------
# Graphical option
#-------------------------------------------------------------------------------

View File

@ -195,15 +195,18 @@ set(GSdxFinalLibs
)
if(EGL_API AND EGL_FOUND)
set(GSdxFinalLibs ${GSdxFinalLibs}
${EGL_LIBRARIES}
)
set(GSdxFinalLibs ${GSdxFinalLibs} ${EGL_LIBRARIES})
endif()
if(LIBLZMA_FOUND)
set(GSdxFinalLibs ${GSdxFinalLibs}
${LIBLZMA_LIBRARIES}
)
set(GSdxFinalLibs ${GSdxFinalLibs} ${LIBLZMA_LIBRARIES})
endif()
if(USE_VTUNE)
set(GSdxFinalFlags ${GSdxFinalFlags} -DENABLE_VTUNE)
include_directories("$ENV{VTUNE_AMPLIFIER_XE_2016_DIR}/include")
set(GSdxFinalLibs ${GSdxFinalLibs} $ENV{VTUNE_AMPLIFIER_XE_2016_DIR}/lib64/libjitprofiling.a)
set(GSdxFinalLibs ${GSdxFinalLibs} $ENV{VTUNE_AMPLIFIER_XE_2016_DIR}/lib32/libjitprofiling.a)
endif()
# Generate Glsl header file. Protect with REBUILD_SHADER to avoid build-dependency on PERL

View File

@ -444,11 +444,11 @@ extern void vmfree(void* ptr, size_t size);
extern void* fifo_alloc(size_t size, size_t repeat);
extern void fifo_free(void* ptr, size_t size, size_t repeat);
#ifdef _WIN32
#ifdef ENABLE_VTUNE
#ifdef ENABLE_VTUNE
#include "jitprofiling.h"
#include <JITProfiling.h>
#ifdef _WIN32
#pragma comment(lib, "jitprofiling.lib")