Dolphin, the GameCube and Wii emulator - Forums

Full Version: Hyrule Field Slowdown Observation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It's a general problem.

We don't know the solution. We'd appreciate if you experiment and test various things out and let us know the results.
(03-30-2010, 12:19 AM)[SS] Starscream Wrote: [ -> ]
(03-29-2010, 03:13 PM)skid Wrote: [ -> ]
(03-29-2010, 01:11 PM)KrossX Wrote: [ -> ]Class view => Search YieldCPU():
[color=#696969]..\Core\Common\Src\Thread.h => 216 inline void YieldCPU()[/color]

That one? Is just _mm_pause .. O_O"

Yes, that is the one. The fix is to replace it with something better than _mm_pause. What to replace it with? dunno.

How about __yield

http://msdn.microsoft.com/en-us/library/2b2h26kx%28VS.80%29.aspx
Apparently that function is only for itanium processors
Really? I read it was for AMD64 processors.
(03-30-2010, 06:50 AM)[SS] Starscream Wrote: [ -> ]Really? I read it was for AMD64 processors.

intrin.h
Code:
/*
** __MACHINE             : all compilers
** __MACHINEI            : Intel (32 bit x86) and X64
** __MACHINEX64          : X64 compiler only
** __MACHINEIA32         : 32 bit x86 arch only
** __MACHINEX86X_X64     : X86 Extended intrinsics supported on X64
** __MACHINEX86X_IA64    : X86 Extended intrinsics supported on IA64
** __MACHINEIA64         : IA64 compiler only
** __MACHINEW64          : WIN64(tm), 64 bit compilers only
** __MACHINEIW64         : IA32 + Win64 compilers only (__MACHINEI + __MACHINEW64)
** __MACHINESA           : ARM (StrongARM) only
** __MACHINEARMX         : ARM XSCALE intrinsics
** __MACHINECC           : Intel XSCALE Concan
** __MACHINECE           : common intrinsic functions for Windows CE
** __MACHINEZ            : nothing
*/

.... further in the same file ....

__MACHINEIA64(void __yield(void))
Okay, so who's fluent in coding here besides the developers? If we can get some knowledgeable coders to offer some suggestions, we can alter the code and test the changes ourselves and report back if it improves anything. We might be able to take a crack at this and either fix the problem or at least improve performance somewhat.

I'm going to look around, try to find anything better than _mm_pause if there is anything.

Skid, is that code I mentioned commented out and if so, why is it commented out? I've tried to uncomment the code but it just produces a ton of errors during compilation.
(03-30-2010, 07:49 AM)Xtreme2damax Wrote: [ -> ]Skid, is that code I mentioned commented out and if so, why is it commented out? I've tried to uncomment the code but it just produces a ton of errors during compilation.
What code ?
(03-30-2010, 08:04 AM)James333 Wrote: [ -> ]
(03-30-2010, 07:49 AM)Xtreme2damax Wrote: [ -> ]Skid, is that code I mentioned commented out and if so, why is it commented out? I've tried to uncomment the code but it just produces a ton of errors during compilation.
What code ?

Quote:#ifdef _WIN32
YieldProcessor();
#elif defined(_M_IX86) || defined(_M_X64)
_mm_pause();
#endif
}

That code, it has a "#" before every other line. I don't know how to code so this might server another purpose besides commenting out the code.
(03-30-2010, 08:32 AM)Xtreme2damax Wrote: [ -> ]
(03-30-2010, 08:04 AM)James333 Wrote: [ -> ]
(03-30-2010, 07:49 AM)Xtreme2damax Wrote: [ -> ]Skid, is that code I mentioned commented out and if so, why is it commented out? I've tried to uncomment the code but it just produces a ton of errors during compilation.
What code ?

Quote:#ifdef _WIN32
YieldProcessor();
#elif defined(_M_IX86) || defined(_M_X64)
_mm_pause();
#endif
}

That code, it has a "#" before every other line. I don't know how to code so this might server another purpose besides commenting out the code.
in c++ for comment something you use // or /* */
The # are used when you are working with definitions ( I don't know how to explain it but they are not comments ), they must be there



What is the difference between Vtune and Very Sleepy ? ( I just found that profiler , and I want to know If I can work with it )

http://www.codersnotes.com/sleepy
Thanks for explaining.

I did some reading and I'm wondering if the following would work any better:

Quote:inline void YieldProcessor(void)
{
#ifdef _WIN32
sleep(0);
#elif defined(_M_IX86) || defined(_M_X64) || defined(__SVR4)
thr_yield();
#else
sched_yield();
#endif
}

I of course get identifier not found errors and I am not sure what to do to correct it so I can't test. The code above may also need some alterations if it isn't correct.
From where did you got those functions ???