Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance #5599

Merged
merged 6 commits into from Jan 30, 2019

Conversation

Projects
None yet
@Nekotekina
Copy link
Member

commented Jan 26, 2019

This should further improve SPU ASMJIT compilation speed and performance, but probably not noticeable.

@Nekotekina Nekotekina force-pushed the Nekotekina:master branch 5 times, most recently from 97952ce to b7f7ac5 Jan 26, 2019

@Nekotekina

This comment has been minimized.

Copy link
Member Author

commented Jan 28, 2019

Pushed an experimental commit. It should work, but please test for regressions or performance degradation just in case.

@arcadee1977

This comment has been minimized.

Copy link

commented Jan 28, 2019

thanks! I test "Musou Orochi 2 Ultimate", use this setting: SPU ASMJIT+safe, game speed is improve obviously(>20fps). Previously is very slow (<10fps), but crash quickly :(

-1

Newest error log (random crash):
SPU ASMJIT+safe+SPU cache be checked:

F 0:01:24.855544 {SPU[0x2000001] Thread (MainSpursCellSpursKernel1) [0x3460c]} JIT: Out of memory (size=0x460, align=0x10, off=0x0)
·F 0:01:24.855547 {SPU[0x2000001] Thread (MainSpursCellSpursKernel1) [0x3460c]} SPU: Failed to build a function
·F 0:01:24.855622 {SPU[0x2000001] Thread (MainSpursCellSpursKernel1) [0x3460c]} class std::runtime_error thrown: Verification failed (e=0x7f) (0000000000000000):
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:568)
·F 0:01:24.855623 {SPU[0x2000004] Thread (MainSpursCellSpursKernel4) [0x275f8]} JIT: Out of memory (size=0x378, align=0x10, off=0x0)
·F 0:01:24.855626 {SPU[0x2000004] Thread (MainSpursCellSpursKernel4) [0x275f8]} SPU: Failed to build a function
·F 0:01:24.855650 {SPU[0x2000004] Thread (MainSpursCellSpursKernel4) [0x275f8]} class std::runtime_error thrown: Verification failed (e=0x7f):
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:551)

SPU ASMJIT+safe , "SPU cache" not be checked, the following error still appear :

F 0:01:10.826965 {SPU[0x2000000] Thread (MainSpursCellSpursKernel0) [0x2d108]} JIT: Out of memory (size=0x21c, align=0x10, off=0x0)
·F 0:01:10.827072 {SPU[0x2000000] Thread (MainSpursCellSpursKernel0) [0x2d108]} class std::runtime_error thrown: Verification failed (e=0x7f) (0000000000000000):
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:292)

**Now the speed is improving,but many KT games are almost the same crash problem, once solved, many KT games can run perfectly.

@Emulator-Team-2

This comment has been minimized.

Copy link

commented Jan 28, 2019

[ Fist of the North Star 1-Demo NPEB90285 ]

F {SPU[0x2000002] Thread (CellSpursKernel2) [0x30640]} JIT: Out of memory (size=0x908, align=0x10, off=0x0)
F {SPU[0x2000002] Thread (CellSpursKernel2) [0x30640]} SPU: Failed to build a function
F {SPU[0x2000002] Thread (CellSpursKernel2) [0x30640]} class std::runtime_error thrown: Verification failed (e=0x7f): 
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:561)

Log: RPCS3.log


[ Fist of the North Star 2-Demo NPJB90575 ]

RPCS3: Fatal Error
Unhandled Win32 exception 0xC0000005.
Segfault writing location 0000000000000000 at 00000000007497fa.
Instruction address: 00000000007497fa.
Function address: 00000000007490f0 (base+0x7390f0).
Module name: 'rpcs3.exe'.
Module base: 0000000000010000.
RPCS3 image base: 0000000000010000.

F {SPU[0x2000003] Thread (CellSpursKernel3) [0x359e0]} JIT: Out of memory (size=0x2e4, align=0x10, off=0x0)

Log: RPCS3.log


[ Warriors Orochi 3 Ultimate NPUB31505 ]

·F {SPU[0x2000003] Thread (MainSpursCellSpursKernel3) [0x323b8]} JIT: Out of memory (size=0x2bc, align=0x10, off=0x0)
·F  {SPU[0x2000001] Thread (MainSpursCellSpursKernel1) [0x37348]} JIT: Out of memory (size=0x1340, align=0x10, off=0x0)
·F {SPU[0x2000001] Thread (MainSpursCellSpursKernel1) [0x37348]} SPU: Failed to build a function

Log: RPCS3.log

@Krusher97

This comment has been minimized.

Copy link

commented Jan 28, 2019

rpcs3_ 2 _2019-01-28_21-16-40
rpcs3_2019-01-28_21-19-32

Huge FPS gain in Deception 4. Its a game which compiles SPU Cache nonstop so it can only run in ASMJIT but at single digit framerate. With this PR it hits 20+FPS.

Though it does crash with a fatal error after a while.
rpcs3_ 2 _2019-01-28_21-26-37
RPCS3.zip

@arcadee1977

This comment has been minimized.

Copy link

commented Jan 28, 2019

Musou Orochi 2 Ultimate(BLAS50676):

ERROR LOG (random crash):
SPU ASMJIT+mega+SPU cache

F 0:01:18.155557 {SPU[0x2000004] Thread (MainSpursCellSpursKernel4) [0x34740]} JIT: Out of memory (size=0x2620, align=0x10, off=0x0)
·F 0:01:18.155560 {SPU[0x2000004] Thread (MainSpursCellSpursKernel4) [0x34740]} SPU: Failed to build a function
·F 0:01:18.155649 {SPU[0x2000004] Thread (MainSpursCellSpursKernel4) [0x34740]} class std::runtime_error thrown: Verification failed (e=0x7f):
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:561)

SPU ASMJIT+safe , "SPU cache" not be checked, the following error still appear :

F 0:01:10.826965 {SPU[0x2000000] Thread (MainSpursCellSpursKernel0) [0x2d108]} JIT: Out of memory (size=0x21c, align=0x10, off=0x0)
·F 0:01:10.827072 {SPU[0x2000000] Thread (MainSpursCellSpursKernel0) [0x2d108]} class std::runtime_error thrown: Verification failed (e=0x7f) (0000000000000000):
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:292)

@Emulator-Team-2

This comment has been minimized.

Copy link

commented Jan 28, 2019

[cd58087]
[ Fist of the North Star 1-Demo NPEB90285 ]

·F {SPU[0x2000003] Thread (CellSpursKernel3) [0x2f5cc]} JIT: Out of memory (size=0x970, align=0x10, off=0x0)
·F {SPU[0x2000003] Thread (CellSpursKernel3) [0x2f5cc]} SPU: Failed to build a function
·F {SPU[0x2000003] Thread (CellSpursKernel3) [0x2f5cc]} class std::runtime_error thrown: Verification failed (e=0x7f) (0000000000000000): 
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:574)

Log: RPCS3.log

@Nekotekina

This comment has been minimized.

Copy link
Member Author

commented Jan 28, 2019

Thanks, I don't think I will fix out of memory error in this PR.

@Emulator-Team-2

This comment has been minimized.

Copy link

commented Jan 28, 2019

[ 88639ae ]
[ ONE PIECE: PIRATE WARRIORS ]

F {SPU[0x2000004] Thread (CellSpursKernel4) [0x303b8]} JIT: Out of memory (size=0x3ac, align=0x10, off=0x0)
F {SPU[0x2000004] Thread (CellSpursKernel4) [0x303b8]} class std::runtime_error thrown: Verification failed (e=0x7f) (0000000000000000): 
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:292)

Log: RPCS3.log

F {SPU[0x2000004] Thread (CellSpursKernel4) [0x39f50]} JIT: Out of memory (size=0x27b8, align=0x10, off=0x0)
F {SPU[0x2000004] Thread (CellSpursKernel4) [0x39f50]} SPU: Failed to build a function
F {SPU[0x2000004] Thread (CellSpursKernel4) [0x39f50]} class std::runtime_error thrown: Verification failed (e=0x7f): 
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:551)

Log: RPCS3.log

F {SPU[0x2000004] Thread (CellSpursKernel4) [0x399a0]} JIT: Out of memory (size=0x1870, align=0x10, off=0x0)
F {SPU[0x2000004] Thread (CellSpursKernel4) [0x399a0]} SPU: Failed to build a function
F {SPU[0x2000004] Thread (CellSpursKernel4) [0x399a0]} class std::runtime_error thrown: Verification failed (e=0x7f) (0000000000000000): 
(in file c:\projects\rpcs3\rpcs3\emu\cell\spurecompiler.cpp:568)

Log: RPCS3.log

@Nekotekina

This comment has been minimized.

Copy link
Member Author

commented Jan 28, 2019

@Emulator-Team-2 How much SPU cache it creates?

@Emulator-Team-2

This comment has been minimized.

Copy link

commented Jan 28, 2019

with spu block size: safe
S {PPU[0x1000000] Thread (main_thread)} SPU: SPU Runtime: Built 515046 functions. O_O

@creeperjedi

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2019

In Dynasty Warriors: Gundam 3, I am getting the same "JIT: Out of memory" error that others are reporting, though I have seen a noticeable performance increase.
Log: Dynasty Warriors Gundam 3 Log - v0.0.5-291d55bf.log

@thx4ever

This comment has been minimized.

Copy link

commented Jan 28, 2019

Audio Stuttering in this PR
Game: Deception 4 Blood of Ties, this not happen on master for me, i'm using XAudio2 on Windows 10 Pro

@Kravickas

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2019

It probably create more cache to be faster ? So it consume more RAM a u are all probably using only Safe mode which compile the most spu cache and eats more RAM than Mega and Giga, tho giga is almost unusable on master with heavier spu games. Out of memory is on master too if u choose safe mode and veeery spu heavy game for example GTA V

Nekotekina added some commits Jan 26, 2019

Added jit_runtime class
Is a memory manager for ASMJIT, replaces asmjit::JitRuntime
Unified memory manager for ASMJIT and LLVM
Unified SPU trampoline generation
Remove previous workarounds
Remove SPUThread::jit_dispatcher
Use global array - save memory
Move the array to JIT memory
Implement atomic_t<>::release
More relaxed store with release memory order
spu_runtime::add minor optimization
Use preallocated vectors in trampoline generation subroutine

@Nekotekina Nekotekina force-pushed the Nekotekina:master branch 2 times, most recently from 43f0dfb to 7a085b6 Jan 29, 2019

Initial support for HLE in internal API
atomic_storage<>: add compare_exchange_hle_acq and fetch_add_hle_rel
shared_mutex: add methods (un)lock_hle and (un)lock_shared_hle
Clang: 👅

@Nekotekina Nekotekina force-pushed the Nekotekina:master branch from 7a085b6 to f50d9cc Jan 29, 2019

@arcadee1977

This comment has been minimized.

Copy link

commented Jan 29, 2019

I test "Ninja Gaiden Sigma 2" with this PR , use SPU ASMJIT, there is no faster than master , only with SPU LLVM can we get faster speed . In addition , turn off "Hyper-Threading Technology" in BIOS and get a huge speed boost ( "The House of the Dead 4" is also get speedup at Hyper-Threading is closed , my CPU is i7 8700K )

SPU ASMJIT : 27fps
SPU LLVM : 41fps
SPU LLVM+turn off HT : 51fps

But in stage 9 last boss 、stage10、stage14 , you must use SPU ASMJIT+giga , otherwise the game will crash (simulator close suddenly ) , So the above three stages are very slow .

@questore

This comment has been minimized.

Copy link

commented Jan 29, 2019

Can you post a Build link for me to test, please?

@money123451

This comment has been minimized.

Copy link

commented Jan 29, 2019

Can you post a Build link for me to test, please?

click on the show all checks button and click details link next to the little blue circle and then the artifacts tab from there download the largest file and extract it to a folder ...

Update About window
Updated supporters and contributors

@Nekotekina Nekotekina changed the title [WIP] Maintenance Maintenance Jan 30, 2019

@Nekotekina Nekotekina merged commit 039f8e1 into RPCS3:master Jan 30, 2019

2 of 4 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Resident007

This comment has been minimized.

Copy link

commented Jan 30, 2019

Graphics in The Last of Us are now pretty broken though
image
RPCS3.log

@enkelprifti98

This comment has been minimized.

Copy link

commented Feb 4, 2019

Im also getting out of memory errors with Fifa Street 4 ever since this PR was merged to the Master branch. Is this being looked on? The performance is better with the Maintenance changes, hopefully the error gets fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.