Skip to content

Commit

Permalink
Activate compilation profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmojo committed Nov 4, 2020
1 parent 0150206 commit 19af411
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ raine
output
opk_data
raine.opk

*.gcda
22 changes: 20 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,16 @@ CXX=${target}-g++
INCDIR = -I/usr/${target}/include
STRIP = strip
ifeq ("${target}","gcw0")
CC=/opt/gcw0-toolchain/usr/bin/mipsel-linux-gcc -std=c11 -DGCW0
CXX=/opt/gcw0-toolchain/usr/bin/mipsel-linux-g++ -std=c++11 -DGCW0 -L/home/philippe/src/GLU/lib -L/home/philippe/src/gl4es/lib -L/home/philippe/src/muparser/lib
CC=/opt/gcw0-toolchain/usr/bin/mipsel-linux-gcc -std=c11 -DGCW0
CC += -Ofast -fdata-sections -ffunction-sections -mno-fp-exceptions -mno-check-zero-division -fsingle-precision-constant -fno-common -march=mips32r2 -mtune=mips32r2 -flto -mno-shared -mplt
# PGO
# CC += -fprofile-generate=/media/data/local/home/PGO
CC += -fprofile-use
CXX=/opt/gcw0-toolchain/usr/bin/mipsel-linux-g++ -std=c++11 -DGCW0 -L/home/philippe/src/GLU/lib -L/home/philippe/src/gl4es/lib -L/home/philippe/src/muparser/lib
CXX += -Ofast -fdata-sections -ffunction-sections -mno-fp-exceptions -mno-check-zero-division -fsingle-precision-constant -fno-common -march=mips32r2 -mtune=mips32r2 -flto -mno-shared -mplt
# PGO
# CXX += -fprofile-generate=/media/data/local/home/PGO
CXX += -fprofile-use
INCDIR = -I/home/philippe/src/GLU/include -I/home/philippe/src/gl4es/include -I/home/philippe/src/muparser/include
STRIP = /opt/gcw0-toolchain/usr/bin/mipsel-linux-strip
endif
Expand Down Expand Up @@ -174,6 +182,16 @@ endif
endif
endif

ifeq ("${target}","gcw0")
LD += -Wl,--as-needed -Wl,--gc-sections -flto -s
# PGO
# LD += -lgcov
# LD += -std=c11 -DGCW0
# LD += -Ofast -fdata-sections -ffunction-sections -mno-fp-exceptions -mno-check-zero-division -fsingle-precision-constant -fno-common -march=mips32r2 -mtune=mips32r2 -flto -mno-shared -mplt
# LD += -fprofile-generate=/media/data/local/home/PGO
LD += -fprofile-use
endif

WINDRES_V := $(shell windres --version 2>/dev/null)
ifdef WINDRES_V
WINDRES:=windres
Expand Down
2 changes: 1 addition & 1 deletion opk_data/raine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ cd `dirname $0`

export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH

exec ./raine -screenx 320 -screeny 240 -nb -nogui -rp "$romPath" -nb ${romName%%.*} 2>&1 >/var/tmp/raine.log
exec ./raine -screenx 320 -screeny 240 -fullscreen 1 -nb -nc -nogui -rp "$romPath" -nb ${romName%%.*}
4 changes: 2 additions & 2 deletions source/emumain.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extern void update_rjoy_list(void);
extern void update_inputs(void);
extern void update_gui_inputs(void);

UINT32 cpu_fps;
int cpu_fps;
UINT32 quit_loop;

int req_fwd;
Expand Down Expand Up @@ -147,7 +147,7 @@ FPSmanager fpsm;

UINT32 run_game_emulation(void)
{
UINT32 cpu_tick;
int cpu_tick;
UINT32 draw_screen;
const VIDEO_INFO *vid_info;
char str[256];
Expand Down

0 comments on commit 19af411

Please sign in to comment.