Polina Dudnik wrote: > > > On Tue, Jul 14, 2009 at 3:21 PM, Daniel Sanchez <[email protected] > <mailto:[email protected]>> wrote: > > Polina Dudnik wrote: > > > > > > On Tue, Jul 14, 2009 at 3:07 PM, Daniel Sanchez > <[email protected] <mailto:[email protected]> > > <mailto:[email protected] <mailto:[email protected]>>> > wrote: > > > > Polina Dudnik wrote: > > > Hi, > > > > > > I would like to test atomics in ruby. > > > > > > The regression tester contains a test_atomic binary in > > > /gem5/regression/test-progs/m5threads/bin/sparc/linux. > > > > > > I try to run the tester by issuing: > > > > > > build/SPARC_SE/m5.fast -d > > > > > > > build/SPARC_SE/tests/fast/quick/40.m5threads-test-atomic/sparc/linux/simple-atomic-mp-ruby > > > -re tests/run.py > > > > > > > build/SPARC_SE/tests/fast/quick/40.m5threads-test-atomic/sparc/linux/simple-atomic-mp-ruby > > > > > > The tester reports success, but I don't think it ever > calls ruby. > > > > > > > I haven't used the new Ruby code, but I guess you output the > ruby > > stats > > somewhere. By looking at them, you should be able to > determine if Ruby > > is being used or not. You can also turn ruby debug and trace > a few > > memory accesses. > > > > > > > > I put some printfs in ruby's makeRequest and I can see those when I > > run Alpha's memtest. SPARC test-atomic does not call into ruby > because > > I don't see those printfs. > > What CPU model are you using? Non-timing accesses are not passed to > Ruby. If you're using AtomicSimpleCPU, try to use TimingSimpleCPU > or O3. > > > I tried both atomic and timing, and neither seems to be calling into > ruby.
That's weird. Are you sure you're instantiating a RubyMemory, not a regular PhysicalMemory? > > > > > > > > > > > > > > I tried to compile the test_atomic for alpha. I have the > > > cross-compiler but I don't have any libraries. The make > file in > > > /gem5/regression/test-progs/m5threads/src points to > ../pthread.c and > > > ../pthread_defs.h ../tls_defs.h. However, I don't have any > of those > > > files. Where are they? Do I need any alpha libraries to > compile > > > test_atomic binary? > > > > > > > test_atomic (and any other multithreaded program in SE) uses > > m5threads. > > As we discussed a while back, the newer m5threads will not > compile for > > Alpha because I didn't implement TLS there (the TLS ABI is quite > > different from the SPARC and x86 ones). I recommend that you > compile > > multithreaded programs for SPARC unless you require Alpha > for some > > specific reason. > > > > > > I see. Well, I guess the reason why Alpha could be nice is because > > Alpha is the only architecture that uses LLSC, so we could test > their > > implementation. SPARC uses RMW instructions which would have a > > different implementation on Ruby. > > The m5threads code has a few #error statements that prevent it from > compiling in alpha, but the library itself does not depend on TLS to > work, so if you remove those statements and test it only with programs > that don't use TLS, things should work. > > > I could do that or test it with Ruby tester which has pseudo-threads. > Does the Ruby tester simulate LLSC though? > I guess, given that pthreads don't really work for Alpha, I am > wondering whether LLSC testing is on the critical path. > It is definitely not an issue for us. We're currently using SPARC, and the plan is to move to x86 at some point. This is why m5threads only works for SPARC and x86. If anyone needs help getting m5threads to work on other architectures, I'll be happy to give some guidance. Regards, Daniel _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
