Hi Shougata,
I believe this is indeed the problem. I ran through a simulation with debugging flags present and I receive "Unexpected magic call" errors that report the val (as expected) 20 for begins and 40 for commits.
It seems that in version 1.4, the values used in the checks have simply been scaled up (1024-2048 for begins, 2048-3072 for commits) to provide a wider range of possible transaction ids. Does anyone know if this is the case? If so, would it change any other functionality of the code if I simply scale these values back down?
Thanks again for your reply,
James
On 3/20/07, Shougata Ghosh (shougata@xxxxxxxxxxxxx) <
shougata@xxxxxxxxxxxxx> wrote:Hi James
If you're using GEMS 1.4, I'd lke to point this out:
According to "logtm.h" : #define NEW_RUBY_MAGIC_CALL( service ) \ __asm__ __volatile__ \
( "sethi %1, %%g0 !magic service\n\t" \ : /* no outputs */ \ : "r" (0), "i" ((service)<<16) \
: "l0" /* clobber register */ \ );
#define BEGIN_TRANSACTION(id) NEW_RUBY_MAGIC_CALL((id + 20)) #define COMMIT_TRANSACTION(id) NEW_RUBY_MAGIC_CALL((id + 40))
your xaction id 0 becomes 20 left shifted by 16 (0x140000) for BEGIN_TRANSACTION. If you look inside the function magic_instruction_callback () in commands.C under GEMS/ruby/simics/ , the xaction id is right shifted by 16 (which makes it 20 again) and then the code checks it against various ranges. However, the range 20 to 40 (used for xaction BEGINs) is not there.
I'm not sure if this is causing the problem for you or not. You can try putting some debug printfs in commands.C to figure out if the problem is there. If it is, you can just insert the appropriate range.
Hope this helps.
Shougata
> From: "James Poe" <gemsmaillist@xxxxxxxxx> > Subject: [Gems-users] Running Transactional Workloads with LogTM
> To: gems-users@xxxxxxxxxxx > Message-ID: > <8e6c0c8a0703191952y6f15cf70hc0c92755bf2eae1c@xxxxxxxxxxxxxx
> > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > This is my first attempt at gathering some transactional results > with LogTM > protocols, and I seem to be unable to get ruby to notice the
> transactions.I am using Gems 1.4, Simics 3.0.21, and the simulated > environment is an 8 > processor Solaris 9/Sparc. > > I have written a few benchmarks, and most of the normal result are as
> expected (e.g. instruction counts, etc), but all of the transactional > specific results are always 0: > > transactions_started: 0 [ 0 0 0 0 0 0 0 0 ] > transactions_ended: 0 [ 0 0 0 0 0 0 0 0 ]
> instructions_per_transaction: 0 [ 0 0 0 0 0 0 0 0 ] > cycles_per_transaction: 0 [ 0 0 0 0 0 0 0 0 ] > misses_per_transaction: 0 [ 0 0 0 0 0 0 0 0 ] > > To help debug, I've written an extremely simple benchmark (I've
> also written > several pthread benchmarks that actually perform computations and have > experienced similiar results): > > #include <stdlib.h> > #include <stdio.h> > #include "
magic-instruction.h" > #include "logtm.h" > > int main(int argc, char*argv[]) > { > MAGIC_BREAKPOINT; > BEGIN_TRANSACTION(0); > printf("Transaction\n");
> COMMIT_TRANSACTION(0); > MAGIC_BREAKPOINT; > printf("Transaction Complete\n"); > return 0; > } > > Where "logtm.h" contains:
> > #define NEW_RUBY_MAGIC_CALL( service ) \ > __asm__ __volatile__ \ > ( "sethi %1, %%g0 !magic service\n\t" \
> : /* no outputs */ \ > : "r" (0), "i" ((service)<<16) \ > : "l0" /* clobber register */ \
> ); > > #define BEGIN_TRANSACTION(id) NEW_RUBY_MAGIC_CALL((id + 20)) > #define COMMIT_TRANSACTION(id) NEW_RUBY_MAGIC_CALL((id + 40)) > > > I believe I have all of the correct configuration settings for
> using LogTM, > and I do not receive any errors and the simulation seems to execute > andterminate properly, its just the transactional results are > always 0. > > Is there something that I am missing? Anyone have any suggestions?
> > Thank you in advance, > > James
_______________________________________________ Gems-users mailing list Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/
" to your search.
|