• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 41 42 43 44 45 ... 117 Next »

running dolphin in valgrind?
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
running dolphin in valgrind?
07-31-2014, 01:16 PM
#1
triad Offline
Member
***
Posts: 52
Threads: 8
Joined: Jul 2014
Has anyone managed to run dolphin in valgrind with recent master? When I try, I get a bunch of "Executable memory ended up above 2GB!", and then dolphin goes piff.

When I run with memcheck, I see:
Code:
==7357== Thread 4:
==7357== Invalid write of size 1
==7357==    at 0x6A4355: Gen::XEmitter::AlignCode16() (x64Emitter.cpp:88)
==7357==    by 0x600C32: Jit64AsmRoutineManager::Generate() (JitAsm.cpp:38)
==7357==    by 0x602C57: Jit64::Init() (JitAsm.h:32)
==7357==    by 0x5F8D0F: JitInterface::InitJitCore(int) (JitInterface.cpp:84)
==7357==    by 0x5F2376: PowerPC::Init(int) (PowerPC.cpp:144)
==7357==    by 0x59C1B8: CCPU::Init(int) (CPU.cpp:30)
==7357==    by 0x5ABFDD: HW::Init() (HW.cpp:48)
==7357==    by 0x5689E0: Core::EmuThread() (Core.cpp:354)
==7357==    by 0x60D778F: ??? (in /usr/lib64/libstdc++.so.6.0.19)
==7357==    by 0x3348007F32: start_thread (in /usr/lib64/libpthread-2.18.so)
==7357==    by 0x33474F4DEC: clone (in /usr/lib64/libc-2.18.so)
==7357==  Address 0xffffffffffffffff is not stack'd, malloc'd or (recently) free'd

Does it just not work right now? Are there some tricks I don't know to get it to work?
Find
Reply
07-31-2014, 03:46 PM
#2
Sonicadvance1 Offline
Professional Hand Holder
**********
Developers (Some Administrators and Super Moderators)
Posts: 716
Threads: 15
Joined: Jan 2013
The real issue is that it can't allocate it's memory space where it is expecting and crashes out.
Find
Reply
08-01-2014, 12:46 PM
#3
triad Offline
Member
***
Posts: 52
Threads: 8
Joined: Jul 2014
(07-31-2014, 03:46 PM)Sonicadvance1 Wrote: The real issue is that it can't allocate it's memory space where it is expecting and crashes out.

...and I see you twiddled with something and I'm getting a different error. Thanks.

I'm also getting:
Code:
==22613== Thread 4:
==22613== Invalid write of size 1
==22613==    at 0x6A9510: Gen::XEmitter::WriteSimple1Byte(int, unsigned char, Gen::X64Reg) (x64Emitter.cpp:606)
==22613==    by 0x6A7FA1: Gen::XEmitter::ABI_PushAllCalleeSavedRegsAndAdjustStack() (x64ABI.cpp:624)
==22613==    by 0x600D8E: Jit64AsmRoutineManager::Generate() (JitAsm.cpp:39)
==22613==    by 0x602BF7: Jit64::Init() (JitAsm.h:32)
==22613==    by 0x5F8E4F: JitInterface::InitJitCore(int) (JitInterface.cpp:77)
==22613==    by 0x5F24B6: PowerPC::Init(int) (PowerPC.cpp:145)
==22613==    by 0x59C228: CCPU::Init(int) (CPU.cpp:30)
==22613==    by 0x5AC04D: HW::Init() (HW.cpp:48)
==22613==    by 0x568A50: Core::EmuThread() (Core.cpp:354)
==22613==    by 0x60D778F: ??? (in /usr/lib64/libstdc++.so.6.0.19)
==22613==    by 0x3348007F32: start_thread (in /usr/lib64/libpthread-2.18.so)
==22613==    by 0x33474F4DEC: clone (in /usr/lib64/libc-2.18.so)
==22613==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Expected? Not? (Hmm... is there some flag to tweak valgrind so that it can allocate memory how it wants? Or does it just not work? Are you able to run dolphin in valrind?)
Find
Reply
08-01-2014, 01:07 PM
#4
Sonicadvance1 Offline
Professional Hand Holder
**********
Developers (Some Administrators and Super Moderators)
Posts: 716
Threads: 15
Joined: Jan 2013
It's expected. If you can't allocate ram under 2GB then the x86_64 JIT cores will fail out
Valgrind makes it impossible for us to grab memory in that space.
The interpreter core will probably still work.
May need to forcibly disable the VertexLoader "JIT" in the source as well?
Find
Reply
08-01-2014, 11:41 PM
#5
triad Offline
Member
***
Posts: 52
Threads: 8
Joined: Jul 2014
(08-01-2014, 01:07 PM)Sonicadvance1 Wrote: It's expected. If you can't allocate ram under 2GB then the x86_64 JIT cores will fail out. Valgrind makes it impossible for us to grab memory in that space.

Okay, good to know; thanks.

Do you know if it's possible to make this work? (Either by changing how dolphin works, or by changing how valgrind works, I mean. Not by turning off the JIT, since that mostly defeats the purpose.) It would be helpful if it were possible to use valgrind with dolphin, for debugging and profiling.

Assuming there is a good reason why the JIT must have memory below 2 GiB, for the sake of curiosity / education, is there a short explanation somewhere why that's the case?
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 2 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode