|
From: Josep M. P. C. <jos...@bs...> - 2006-12-22 11:56:59
|
Josef Weidendorfer wrote: > On Thursday 21 December 2006 11:33, Josep M. Perez Cancer wrote: > >> 4. Adding the ability of handling several independent address spaces >> inside valgrind. >> > > VG probably would use one PPU process per PPU/SPU. > No need for supporting independent address spaces. > > It really would be nice to get memcheck working when multiple > processes are communicating via shared memory. Should be possible > when every process runs in VG: They have to share VG's meta > information for the shared address ranges. > > DMA transfers in the case of Cell is probably easy after implementing > the general feature. > > Sharing meta information among different VG processes could even be > a starting point to speed up multithreaded code on multiprocessor > (-core) machines. > I fully agree. That would help and is generic enough to be useful for all platforms. > >> 5. Adding a mechanism to cope with SPU code (and data) that after the >> translation doesn't fit on the SPU memory. >> > > I can not imagine you ever want to run VG itself partly on a SPU. > Why would you? > As you mentioned above, you could think of an SPU thread as an independent process with shared memory and special communication mechanisms. In fact, it is possible to build an SPU binary and run it from the command line. Then it would be nice if we could run memcheck on such a program, specially since the local store does not have memory protection. Furthermore, typically a program that has PPU and SPU parts starts its SPU parts by starting SPU binaries that have been encapsulated into the program itself. In that case, it would help if we could start the main program from memcheck, and then the spawned SPU "threads" could run automatically under memcheck (even if independently). The last step would be to use the shared memory infrastructure that you mentioned to coordinate the PPU and the SPU parts. For example, if the SPU program does a DMA to bring a piece of main memory to its local store, it could also bring in the information regarding that memory. Then the SPU program could run with memory checks. At some point the SPU program may send its output back to main memory. At that point the updated memory information of the output data could also be sent back to the PPU, and the PPU could merge it with its existing information. Josep M. Perez > Josef > |