EmuNewz Network

Full Version: Request for testing Compiler settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi!

this is a request to Beta testers being able to compile Jpcsp by themselves.
Could you please try different compiler settings based on r1950: change the value in jpcsp.Allegrex.compiler.CompilerContext.java, line 83
Code:
private int methodMaxInstructions = 3000;
This value determines the size of the Java methods generated by the Jpcsp compiler. In my tests, it seems that the Java JIT compiler is producing better results with small Java methods. Could you try different values for methodMaxInstructions on different games and report any changes (better/worse) of performance. I usually try the following values: 50, 100, 500, 3000 (do not try values above 3000).
It would also be interesting to know if these changes break some games...

I would like to have an idea on how this parameter works on different games before deciding to change this value or provide it as a configurable parameter.

Thank you for your support! Smile
So, my first tests, based on God of War: Chains of Olympus - USA - UCUS98653 [Encrypted].

r1950
Running with dynarec compiler (log level set to OFF)
Compability options used: Use Shaders, Use Media Engine, Decode audio files with SonicStage

#default -> private int methodMaxInstructions = 3000;

run1: 11-12 fps
run2: 11-13 fps
run3: 11-13 fps

#mod1 [crash before intros] -> private int methodMaxInstructions = 50;
Code:
Exception in thread "user_main" java.lang.VerifyError: (class: _S1_2_88232F4, method: s8823c48 signature: ()V) Register 0 contains wrong type
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at jpcsp.Allegrex.compiler.CodeBlock.getExecutable(CodeBlock.java:486)
    at jpcsp.Allegrex.compiler.Compiler.analyse(Compiler.java:294)
    at jpcsp.Allegrex.compiler.Compiler.compile(Compiler.java:349)
    at jpcsp.Allegrex.compiler.Compiler.compile(Compiler.java:324)
    at jpcsp.Allegrex.compiler.CompilerClassLoader.findClass(CompilerClassLoader.java:50)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at _S1_2_8807FAC.s(_S1_2_8807FAC.java:12)
    at _S1_2_8A62CA4.s(_S1_2_8A62CA4.java:60)
    at _S1_2_8A62D04.s(_S1_2_8A62D04.java:36)
    at _S1_2_882FFC8.s882ffc8(_S1_2_882FFC8.java:56)
    at _S1_2_882FFC8.s(_S1_2_882FFC8.java:0)
    at _S1_2_8A4C648.s(_S1_2_8A4C648.java:104)
    at _S1_2_880514C.s88051d4(_S1_2_880514C.java:148)
    at _S1_2_880514C.s(_S1_2_880514C.java:136)
    at _S1_2_8804110.s(_S1_2_8804110.java:12)
    at _S1_2_8804180.s(_S1_2_8804180.java:12)
    at _S1_2_88C0ECC.s88c0ecc(_S1_2_88C0ECC.java:72)
    at _S1_2_88C0ECC.s(_S1_2_88C0ECC.java:0)
    at _S1_2_88C3798.s(_S1_2_88C3798.java:16)
    at _S1_2_88C3798.exec(_S1_2_88C3798.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.jumpCall(RuntimeContext.java:113)
    at jpcsp.Allegrex.compiler.RuntimeContext.call(RuntimeContext.java:192)
    at _S1_2_8804000.s(_S1_2_8804000.java:212)
    at _S1_2_880A4D0.s(_S1_2_880A4D0.java:60)
    at _S1_2_8807CB8.s8807dc0(_S1_2_8807CB8.java:268)
    at _S1_2_8807CB8.s(_S1_2_8807CB8.java:264)
    at _S1_2_8807CB8.exec(_S1_2_8807CB8.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.runThread(RuntimeContext.java:693)
    at jpcsp.Allegrex.compiler.RuntimeThread.run(RuntimeThread.java:47)

#mod2 (crash before intros) -> private int methodMaxInstructions = 100;
Code:
Exception in thread "user_main" java.lang.VerifyError: (class: _S1_2_88232F4, method: s8823c48 signature: ()V) Register 0 contains wrong type
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at jpcsp.Allegrex.compiler.CodeBlock.getExecutable(CodeBlock.java:486)
    at jpcsp.Allegrex.compiler.Compiler.analyse(Compiler.java:294)
    at jpcsp.Allegrex.compiler.Compiler.compile(Compiler.java:349)
    at jpcsp.Allegrex.compiler.Compiler.compile(Compiler.java:324)
    at jpcsp.Allegrex.compiler.CompilerClassLoader.findClass(CompilerClassLoader.java:50)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at _S1_2_8807FAC.s(_S1_2_8807FAC.java:12)
    at _S1_2_8A62CA4.s(_S1_2_8A62CA4.java:60)
    at _S1_2_8A62D04.s(_S1_2_8A62D04.java:36)
    at _S1_2_882FFC8.s(_S1_2_882FFC8.java:56)
    at _S1_2_8A4C648.s(_S1_2_8A4C648.java:104)
    at _S1_2_880514C.s88051d4(_S1_2_880514C.java:148)
    at _S1_2_880514C.s(_S1_2_880514C.java:136)
    at _S1_2_8804110.s(_S1_2_8804110.java:12)
    at _S1_2_8804180.s(_S1_2_8804180.java:12)
    at _S1_2_88C0ECC.s(_S1_2_88C0ECC.java:72)
    at _S1_2_88C3798.s(_S1_2_88C3798.java:16)
    at _S1_2_88C3798.exec(_S1_2_88C3798.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.jumpCall(RuntimeContext.java:113)
    at jpcsp.Allegrex.compiler.RuntimeContext.call(RuntimeContext.java:192)
    at _S1_2_8804000.s(_S1_2_8804000.java:212)
    at _S1_2_880A4D0.s(_S1_2_880A4D0.java:60)
    at _S1_2_8807CB8.s(_S1_2_8807CB8.java:268)
    at _S1_2_8807CB8.exec(_S1_2_8807CB8.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.runThread(RuntimeContext.java:693)
    at jpcsp.Allegrex.compiler.RuntimeThread.run(RuntimeThread.java:47)

#mod3 -> private int methodMaxInstructions = 500;
run1: 11-13 fps
run2: 11-13 fps
run3: 11-13 fps

Prince of Persia - Revelations - USA - ULUS10063

r1950
Running with dynarec compiler (log level set to OFF)
Compability options used: Use Shaders

#default -> private int methodMaxInstructions = 3000;

run1: 9-10 fps
run2: 9-10 fps
run3: 9-10 fps

#mod1 -> private int methodMaxInstructions = 50;

run1: 9-10 fps
run2: 9-10 fps
run3: 9-10 fps

#mod2 -> private int methodMaxInstructions = 100;

run1: 9-10 fps
run2: 9-10 fps
run3: 9-10 fps

#mod3 -> private int methodMaxInstructions = 500;

run1: 9-10 fps
run2: 9-10 fps
run3: 9-10 fps
(01-15-2011, 10:50 PM)BlackDaemon Wrote: [ -> ]So, my first tests, based on God of War: Chains of Olympus - USA - UCUS98653 [Encrypted].

r1950
Running with dynarec compiler (log level set to OFF)
Compability options used: Use Shaders, Use Media Engine, Decode audio files with SonicStage

#default -> private int methodMaxInstructions = 3000;

run1: 11-12 fps
run2: 11-13 fps
run3: 11-13 fps

#mod1 [crash before intros] -> private int methodMaxInstructions = 50;
Code:
Exception in thread "user_main" java.lang.VerifyError: (class: _S1_2_88232F4, method: s8823c48 signature: ()V) Register 0 contains wrong type
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at jpcsp.Allegrex.compiler.CodeBlock.getExecutable(CodeBlock.java:486)
    at jpcsp.Allegrex.compiler.Compiler.analyse(Compiler.java:294)
    at jpcsp.Allegrex.compiler.Compiler.compile(Compiler.java:349)
    at jpcsp.Allegrex.compiler.Compiler.compile(Compiler.java:324)
    at jpcsp.Allegrex.compiler.CompilerClassLoader.findClass(CompilerClassLoader.java:50)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at _S1_2_8807FAC.s(_S1_2_8807FAC.java:12)
    at _S1_2_8A62CA4.s(_S1_2_8A62CA4.java:60)
    at _S1_2_8A62D04.s(_S1_2_8A62D04.java:36)
    at _S1_2_882FFC8.s882ffc8(_S1_2_882FFC8.java:56)
    at _S1_2_882FFC8.s(_S1_2_882FFC8.java:0)
    at _S1_2_8A4C648.s(_S1_2_8A4C648.java:104)
    at _S1_2_880514C.s88051d4(_S1_2_880514C.java:148)
    at _S1_2_880514C.s(_S1_2_880514C.java:136)
    at _S1_2_8804110.s(_S1_2_8804110.java:12)
    at _S1_2_8804180.s(_S1_2_8804180.java:12)
    at _S1_2_88C0ECC.s88c0ecc(_S1_2_88C0ECC.java:72)
    at _S1_2_88C0ECC.s(_S1_2_88C0ECC.java:0)
    at _S1_2_88C3798.s(_S1_2_88C3798.java:16)
    at _S1_2_88C3798.exec(_S1_2_88C3798.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.jumpCall(RuntimeContext.java:113)
    at jpcsp.Allegrex.compiler.RuntimeContext.call(RuntimeContext.java:192)
    at _S1_2_8804000.s(_S1_2_8804000.java:212)
    at _S1_2_880A4D0.s(_S1_2_880A4D0.java:60)
    at _S1_2_8807CB8.s8807dc0(_S1_2_8807CB8.java:268)
    at _S1_2_8807CB8.s(_S1_2_8807CB8.java:264)
    at _S1_2_8807CB8.exec(_S1_2_8807CB8.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.runThread(RuntimeContext.java:693)
    at jpcsp.Allegrex.compiler.RuntimeThread.run(RuntimeThread.java:47)

#mod2 (crash before intros) -> private int methodMaxInstructions = 100;
Code:
Exception in thread "user_main" java.lang.VerifyError: (class: _S1_2_88232F4, method: s8823c48 signature: ()V) Register 0 contains wrong type
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at jpcsp.Allegrex.compiler.CodeBlock.getExecutable(CodeBlock.java:486)
    at jpcsp.Allegrex.compiler.Compiler.analyse(Compiler.java:294)
    at jpcsp.Allegrex.compiler.Compiler.compile(Compiler.java:349)
    at jpcsp.Allegrex.compiler.Compiler.compile(Compiler.java:324)
    at jpcsp.Allegrex.compiler.CompilerClassLoader.findClass(CompilerClassLoader.java:50)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at _S1_2_8807FAC.s(_S1_2_8807FAC.java:12)
    at _S1_2_8A62CA4.s(_S1_2_8A62CA4.java:60)
    at _S1_2_8A62D04.s(_S1_2_8A62D04.java:36)
    at _S1_2_882FFC8.s(_S1_2_882FFC8.java:56)
    at _S1_2_8A4C648.s(_S1_2_8A4C648.java:104)
    at _S1_2_880514C.s88051d4(_S1_2_880514C.java:148)
    at _S1_2_880514C.s(_S1_2_880514C.java:136)
    at _S1_2_8804110.s(_S1_2_8804110.java:12)
    at _S1_2_8804180.s(_S1_2_8804180.java:12)
    at _S1_2_88C0ECC.s(_S1_2_88C0ECC.java:72)
    at _S1_2_88C3798.s(_S1_2_88C3798.java:16)
    at _S1_2_88C3798.exec(_S1_2_88C3798.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.jumpCall(RuntimeContext.java:113)
    at jpcsp.Allegrex.compiler.RuntimeContext.call(RuntimeContext.java:192)
    at _S1_2_8804000.s(_S1_2_8804000.java:212)
    at _S1_2_880A4D0.s(_S1_2_880A4D0.java:60)
    at _S1_2_8807CB8.s(_S1_2_8807CB8.java:268)
    at _S1_2_8807CB8.exec(_S1_2_8807CB8.java)
    at jpcsp.Allegrex.compiler.RuntimeContext.runThread(RuntimeContext.java:693)
    at jpcsp.Allegrex.compiler.RuntimeThread.run(RuntimeThread.java:47)

#mod3 -> private int methodMaxInstructions = 500;
run1: 11-13 fps
run2: 11-13 fps
run3: 11-13 fps

Prince of Persia - Revelations - USA - ULUS10063

r1950
Running with dynarec compiler (log level set to OFF)
Compability options used: Use Shaders

#default -> private int methodMaxInstructions = 3000;

run1: 9-10 fps
run2: 9-10 fps
run3: 9-10 fps

#mod1 -> private int methodMaxInstructions = 50;

run1: 9-10 fps
run2: 9-10 fps
run3: 9-10 fps

#mod2 -> private int methodMaxInstructions = 100;

run1: 9-10 fps
run2: 9-10 fps
run3: 9-10 fps

#mod3 -> private int methodMaxInstructions = 500;

run1: 9-10 fps
run2: 9-10 fps
run3: 9-10 fps

I tested these settings a while ago (maybe mid-December) and for me it does not improve the overall fps but more the response times during the "loading" sequences. I also experienced crashes with 50 and/or 100. Can't test until 6-7 hours from now but will try some new test runs then.
Darth1701,

Thanks i done retesting. Wink

From pressing "Run" button to reach game menu.
r1950
Running with dynarec compiler (log level set to OFF)
Compability options used: Use Shaders

God of War: Chains of Olympus - USA - UCUS98653 [Encrypted]:
#default - 3000

run1: 619 frames 24s 760ms
run2: 583 frames 23s 320ms
run3: 581 frames 23s 240ms

#mod3 - 500

run1: 583 frames 23s 320ms
run2: 584 frames 23s 360ms
run3: 582 frames 23s 280ms

Prince of Persia - Revelations - USA - ULUS10063:
#default - 3000

run1: 460 frames 18s 400ms
run2: 440 frames 17s 600ms
run3: 438 frames 17s 520ms

#mod1 - 50

run1: 420 frames 16s 800ms
run2: 413 frames 16s 520ms
run3: 416 frames 16s 640ms

#mod2 - 100

run1: 402 frames 16s 080ms
run2: 405 frames 16s 200ms
run3: 408 frames 16s 320ms

#mod3 - 500

run1: 440 frames 17s 600ms
run2: 439 frames 17s 560ms
run3: 439 frames 17s 560ms
(01-16-2011, 07:24 AM)Darth1701 Wrote: [ -> ]I tested these settings a while ago (maybe mid-December) and for me it does not improve the overall fps but more the response times during the "loading" sequences. I also experienced crashes with 50 and/or 100. Can't test until 6-7 hours from now but will try some new test runs then.
I've tried to fix these crashes in r1949/r1950... but it looks like I have more work to do Wink
Thank you BlackDaemon for the reports!
BTW, testing with "Only GE graphics" might display a more accurate FPS. Without this option, the FPS is sometimes over-optimistic...
gid15,

Yeah, i've noticed some games shows fake fps. (Tekken: Dark Resurrection, and Mega Man: Maverick Hunter X, for example)
Code:
Exception in thread "user_main" java.lang.VerifyError: (class: _S1_2_88232F4, method: s8823c48 signature: ()V) Register 0 contains wrong type
This should now be fixed in r1952.

Also, "God of War: Chains of Olympus" is pushing the graphics display on the PSP to its limit, and I guess that the poor performance on Jpcsp comes from the graphics engine. Changing "methodMaxInstructions" is only helping the performance of the Allegrex/Mips code and not the graphics. So, this feature is probably only helping games that have already a "decent" performance in Jpcsp (i.e. where the performance do not depend only on the graphics performance), to improve it a little bit. Any experience with "Crisis Core" or "The 3rd Birthday" that are reported to have a quite acceptable performance?

But reports from other games are also interesting Smile
OK, I just did some quick tests with

* Brandish
No crashes with 50 and 100, ingame fps unchanged at about 29 fps, responsiveness is not that much improved (because it already is very good) but the walking (for loading) is almost down to 0,5 sec. where normal is about 2 sec. and transistions between the stages is faster

* WWE 2010
No crashes with 50 and 100, ingame 8 fps (100) to 10 fps (50) to 5 fps (3000=normal), responsiveness improved to a point where it almost is too fast (with 50)

So this is an improvement over the last time I checked this. Maybe a simple input box would be good enough for testing purpose. How about a new Option menu "Advanced"?
(01-16-2011, 05:30 PM)gid15 Wrote: [ -> ]
Code:
Exception in thread "user_main" java.lang.VerifyError: (class: _S1_2_88232F4, method: s8823c48 signature: ()V) Register 0 contains wrong type
This should now be fixed in r1952.

Also, "God of War: Chains of Olympus" is pushing the graphics display on the PSP to its limit, and I guess that the poor performance on Jpcsp comes from the graphics engine. Changing "methodMaxInstructions" is only helping the performance of the Allegrex/Mips code and not the graphics. So, this feature is probably only helping games that have already a "decent" performance in Jpcsp (i.e. where the performance do not depend only on the graphics performance), to improve it a little bit. Any experience with "Crisis Core" or "The 3rd Birthday" that are reported to have a quite acceptable performance?

But reports from other games are also interesting Smile

No crash on 50 on 3rd Birthday, speed is almost unchanged, about 10 fps

EDIT: Tests with r1951
I have no idea for JAVA but iss this means anything for speed?
I guess you have some "Step" methods to call periodically. The longest the compiled block is the slowest responsiveness is. It's kinda logical.
Pages: 1 2