From 001d6e8897a335b7cfa8a73e0c52dea9fa612d03 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 1 Jun 2014 22:16:22 +0200 Subject: [PATCH] Get rid of PERF_TEST entirely - if Performance Counters setting is enabled, will also report performance counters log at exit --- Makefile | 4 ---- Makefile.emscripten | 4 ---- Makefile.griffin | 5 ----- Makefile.ps3 | 5 ----- Makefile.ps3.cobra | 5 ----- Makefile.win | 4 ---- android/native/jni/Android.mk | 5 ----- frontend/frontend.c | 2 -- performance.c | 5 +++-- 9 files changed, 3 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 68287da3fb..3feed6b7a5 100644 --- a/Makefile +++ b/Makefile @@ -201,10 +201,6 @@ ifeq ($(SCALER_NO_SIMD), 1) DEFINES += -DSCALER_NO_SIMD endif -ifeq ($(PERF_TEST), 1) - DEFINES += -DPERF_TEST -endif - ifeq ($(HAVE_SDL), 1) OBJ += gfx/sdl_gfx.o input/sdl_input.o input/sdl_joypad.o audio/sdl_audio.o JOYCONFIG_OBJ += input/sdl_joypad.o diff --git a/Makefile.emscripten b/Makefile.emscripten index c019503ab0..86794a6405 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -68,10 +68,6 @@ LIBS = DEFINES = -DHAVE_SCREENSHOTS -DHAVE_CAMERA -DHAVE_NULLAUDIO -DHAVE_BSV_MOVIE -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER LDFLAGS = -L. -s TOTAL_MEMORY=$(MEMORY) -s OUTLINING_LIMIT=50000 --js-library emscripten/library_rwebaudio.js --js-library emscripten/library_rwebinput.js --js-library emscripten/library_rwebcam.js --no-heap-copy -ifeq ($(PERF_TEST), 1) - DEFINES += -DPERF_TEST -endif - ifeq ($(HAVE_RGUI), 1) DEFINES += -DHAVE_MENU -DHAVE_RGUI OBJ += frontend/menu/disp/rgui.o diff --git a/Makefile.griffin b/Makefile.griffin index 35a59349a4..1dbb4f57c5 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -1,7 +1,6 @@ DEBUG = 0 HAVE_LOGGER = 0 HAVE_FILE_LOGGER = 0 -PERF_TEST = 0 WHOLE_ARCHIVE_LINK = 0 BIG_STACK = 0 PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255 @@ -130,10 +129,6 @@ CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE) OBJ = griffin/griffin.o $(PLATOBJS) -ifeq ($(PERF_TEST), 1) - CFLAGS += -DPERF_TEST -endif - ifeq ($(HAVE_LOGGER), 1) CFLAGS += -DHAVE_LOGGER CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) diff --git a/Makefile.ps3 b/Makefile.ps3 index 9bcfff383a..9179ad7345 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -16,7 +16,6 @@ HAVE_GCMGL = 1 HAVE_LOGGER = 0 HAVE_FREETYPE = 0 HAVE_RLAUNCH = 0 -PERF_TEST = 0 WHOLE_ARCHIVE_LINK = 0 CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001 @@ -65,10 +64,6 @@ endif PPU_SRCS = griffin/griffin.c -ifeq ($(PERF_TEST), 1) - DEFINES += -DPERF_TEST -endif - ifeq ($(HAVE_RLAUNCH), 1) DEFINES += -DHAVE_RLAUNCH endif diff --git a/Makefile.ps3.cobra b/Makefile.ps3.cobra index 0497586a01..d93772608c 100644 --- a/Makefile.ps3.cobra +++ b/Makefile.ps3.cobra @@ -16,7 +16,6 @@ HAVE_GCMGL = 1 HAVE_LOGGER = 0 HAVE_FREETYPE = 0 HAVE_RLAUNCH = 0 -PERF_TEST = 0 WHOLE_ARCHIVE_LINK = 0 CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001 @@ -65,10 +64,6 @@ endif PPU_SRCS = griffin/griffin.c -ifeq ($(PERF_TEST), 1) - DEFINES += -DPERF_TEST -endif - ifeq ($(HAVE_RLAUNCH), 1) DEFINES += -DHAVE_RLAUNCH endif diff --git a/Makefile.win b/Makefile.win index b2524765cd..5c5e5addb9 100644 --- a/Makefile.win +++ b/Makefile.win @@ -110,10 +110,6 @@ ifeq ($(SCALER_NO_SIMD), 1) DEFINES += -DSCALER_NO_SIMD endif -ifeq ($(PERF_TEST), 1) - DEFINES += -DPERF_TEST -endif - JLIBS = ifeq ($(HAVE_RGUI), 1) diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk index b876138e96..59d03bfdf4 100644 --- a/android/native/jni/Android.mk +++ b/android/native/jni/Android.mk @@ -1,5 +1,4 @@ LOCAL_PATH := $(call my-dir) -PERF_TEST := 0 HAVE_NEON := 1 HAVE_LOGGER := 1 @@ -42,10 +41,6 @@ ifeq ($(HAVE_LOGGER), 1) LOGGER_LDLIBS := -llog endif -ifeq ($(PERF_TEST), 1) - LOCAL_CFLAGS += -DPERF_TEST -endif - ifeq ($(GLES),3) GLES_LIB := -lGLESv3 LOCAL_CFLAGS += -DHAVE_OPENGLES3 diff --git a/frontend/frontend.c b/frontend/frontend.c index a68a96fbfb..0a651a8390 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -259,9 +259,7 @@ void main_exit(args_type() args) } rarch_deinit_msg_queue(); -#ifdef PERF_TEST rarch_perf_log(); -#endif #if defined(HAVE_LOGGER) && !defined(ANDROID) logger_shutdown(); diff --git a/performance.c b/performance.c index 89ce65821d..e2923a0420 100644 --- a/performance.c +++ b/performance.c @@ -123,10 +123,11 @@ static void log_counters(const struct retro_perf_counter **counters, unsigned nu void rarch_perf_log(void) { -#if defined(PERF_TEST) || !defined(RARCH_INTERNAL) + if (!g_extern.perfcnt_enable) + return; + RARCH_LOG("[PERF]: Performance counters (RetroArch):\n"); log_counters(perf_counters_rarch, perf_ptr_rarch); -#endif } void retro_perf_log(void)