-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PKG: optimize
libretro-mednafen-wswan
(#153)
- optimize `mednafen_wswan_libretro` core code - add PGO data (uclibc)
- Loading branch information
Showing
17 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
Binary file added
BIN
+260 Bytes
board/miyoo/profile/libretro-mednafen-wswan/libretro-common/compat/compat_strl.gcda
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+1.38 KB
board/miyoo/profile/libretro-mednafen-wswan/mednafen/sound/Blip_Buffer.gcda
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+556 Bytes
board/miyoo/profile/libretro-mednafen-wswan/mednafen/wswan/eeprom.gcda
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+556 Bytes
board/miyoo/profile/libretro-mednafen-wswan/mednafen/wswan/interrupt.gcda
Binary file not shown.
Binary file added
BIN
+452 Bytes
board/miyoo/profile/libretro-mednafen-wswan/mednafen/wswan/rtc.gcda
Binary file not shown.
Binary file added
BIN
+1.45 KB
board/miyoo/profile/libretro-mednafen-wswan/mednafen/wswan/sound.gcda
Binary file not shown.
Binary file added
BIN
+464 Bytes
board/miyoo/profile/libretro-mednafen-wswan/mednafen/wswan/tcache.gcda
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+1.75 KB
board/miyoo/profile/libretro-mednafen-wswan/mednafen/wswan/wswan-memory.gcda
Binary file not shown.
55 changes: 55 additions & 0 deletions
55
package/miyoo/retroarch/libretro-mednafen-wswan/0001-Makefile-optimize-pgo-flags.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
From 9872ea07fab71eddfdd52df1840dff0ef5dba36d Mon Sep 17 00:00:00 2001 | ||
From: Apaczer <[email protected]> | ||
Date: Sun, 16 Feb 2025 21:00:26 +0100 | ||
Subject: [PATCH 1/2] Makefile: optimize & pgo flags | ||
|
||
--- | ||
Makefile | 17 ++++++++++++++--- | ||
1 file changed, 14 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/Makefile b/Makefile | ||
index 851dd5b..b2e06c6 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -12,6 +12,8 @@ filter_out2 = $(call filter_out1,$(call filter_out1,$1)) | ||
unixpath = $(subst \,/,$1) | ||
unixcygpath = /$(subst :,,$(call unixpath,$1)) | ||
|
||
+PROFILE ?= 0 | ||
+ | ||
# system platform | ||
ifeq ($(platform),) | ||
platform = unix | ||
@@ -325,9 +327,18 @@ else ifeq ($(platform), miyoo) | ||
CC = /opt/miyoo/usr/bin/arm-linux-gcc | ||
CXX = /opt/miyoo/usr/bin/arm-linux-g++ | ||
AR = /opt/miyoo/usr/bin/arm-linux-ar | ||
- fpic := -fPIC | ||
+ fpic := -fno-PIC | ||
SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T | ||
- FLAGS += -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s | ||
+ FLAGS += -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s \ | ||
+ -fdata-sections -ffunction-sections -Wl,--gc-sections \ | ||
+ -fno-stack-protector -fno-ident -fomit-frame-pointer \ | ||
+ -fno-unroll-loops | ||
+ifeq ($(PROFILE), YES) | ||
+ FLAGS += -fprofile-generate=/mnt/profile # rm path if you want dir structure intact at runtime | ||
+ LDFLAGS += -lgcov | ||
+else ifeq ($(PROFILE), APPLY) | ||
+ FLAGS += -fprofile-use -fbranch-probabilities -Wno-error=coverage-mismatch | ||
+endif | ||
|
||
# Windows MSVC 2017 all architectures | ||
else ifneq (,$(findstring windows_msvc2017,$(platform))) | ||
@@ -562,7 +573,7 @@ all: $(TARGET) | ||
ifeq ($(DEBUG),1) | ||
FLAGS += -O0 -g | ||
else | ||
- FLAGS += -O2 -DNDEBUG $(EXTRA_GCC_FLAGS) | ||
+ FLAGS += -Ofast -DNDEBUG $(EXTRA_GCC_FLAGS) | ||
endif | ||
|
||
ifneq (,$(findstring msvc,$(platform))) | ||
-- | ||
2.45.2.windows.1 | ||
|
53 changes: 53 additions & 0 deletions
53
.../retroarch/libretro-mednafen-wswan/0002-lr_core_options-finetune-frameskip-samprate.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From eaece46af09d9a79466d0dd2f9450356e9c84057 Mon Sep 17 00:00:00 2001 | ||
From: Apaczer <[email protected]> | ||
Date: Sun, 16 Feb 2025 23:11:50 +0100 | ||
Subject: [PATCH 2/2] lr_core_options: finetune frameskip & samprate | ||
|
||
disable 60Hz mode | ||
--- | ||
libretro_core_options.h | 8 ++++---- | ||
1 file changed, 4 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/libretro_core_options.h b/libretro_core_options.h | ||
index 462ff2c..22cb9f4 100644 | ||
--- a/libretro_core_options.h | ||
+++ b/libretro_core_options.h | ||
@@ -151,7 +151,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { | ||
{ "manual", "Manual" }, | ||
{ NULL, NULL }, | ||
}, | ||
- "disabled" | ||
+ "manual" | ||
}, | ||
{ | ||
"wswan_frameskip_threshold", | ||
@@ -179,7 +179,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { | ||
{ "60", NULL }, | ||
{ NULL, NULL }, | ||
}, | ||
- "33" | ||
+ "60" | ||
}, | ||
{ | ||
"wswan_60hz_mode", | ||
@@ -193,7 +193,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { | ||
{ "enabled", NULL }, | ||
{ NULL, NULL }, | ||
}, | ||
- "enabled", | ||
+ "disabled", | ||
}, | ||
{ | ||
"wswan_sound_sample_rate", | ||
@@ -209,7 +209,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { | ||
{ "48000", NULL }, | ||
{ NULL, NULL }, | ||
}, | ||
- "44100", | ||
+ "11025", | ||
}, | ||
{ | ||
"wswan_sound_low_pass", | ||
-- | ||
2.45.2.windows.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters