Re: [Gems-users] Ruby for x86 machine


Date: Wed, 30 Dec 2009 16:19:11 +0800
From: Sitos Lin <sitos.lin@xxxxxxxxx>
Subject: Re: [Gems-users] Ruby for x86 machine
Thank you for the reply.

The current version of gems/ruby would automatically find phys_mem0 or
phys_mem for both x86 and sparc machine. So, we don't need to worry
about the naming problem. At the mean time, I saw ruby attaching to
phys_mem0 correctly in x86 machine (by @conf.phys_mem0.timing_model).
In order to know if device requests do not map to phys_mem0, I tried
to attach ruby to draom0 instead of phys_mem0. This approach can get
some device requests. But that is still wrong. Both running in
100000000 cycles, ruby attaching to phys_mem0 gets 0.005800
requests/cycle, but attaching to dram0 gets only 0.000127
requests/cycle. And attaching to phys_mem0 gets 99.168651% requests
from processor and 0.831349% requests from prefetch, but attaching to
dram0 gets 20.153202% requests from processor and 79.846798% requests
from device. I was happy to see there are some requests from device,
but attaching to dram0 misses more requests than before... It is not
good. So far, I am not sure how to fix that. In ruby, it seems can be
attach to one memory space, maybe I should try to attach ruby to
another memory space or multiple memory spaces. Can we attach ruby to
multiple memory spaces? OK, this is my current progress, and I will
keep working on it. Thank you all.

Best regards,
  Sitos

I have made sure that ruby is attached to phys_mem0 in x86 machine. I
saw many memory space mapping to phys_mem0 and phys_mem0 maps to
dram0. So, I tried to attach ruby to dram0 instead of phys_mem0. This
appr

2009/12/29 Dan Gibson <degibson@xxxxxxxx>:
> To get an idea of the problems relating to Ruby's interactions with Simics
> memory objects, read the following posts:
> https://lists.cs.wisc.edu/archive/gems-users/2006/msg00063.shtml
> https://lists.cs.wisc.edu/archive/gems-users/2007-September/msg00065.shtml
>
> You should also read the Simics Reference Manual on the topic 'memory
> spaces'.
>
> The x86 patch for Ruby modifies ruby.c to account for differences in memory
> spaces between SPARC and x86 targets. If this operation has failed, it could
> cause your problem. This is why I asked you to verify if Ruby is attached to
> all memory spaces. See the above posts, and the reference manual, and find
> out if Ruby is set as the timing module for all memory spaces.
>
> Regards,
> Dan
>
>
> On Tue, Dec 29, 2009 at 3:42 AM, Muhammad abid Mughal
> <mabidm_pieas@xxxxxxxxx> wrote:
>>
>> actually sparc uses memory-mapped i/o so you can i/o req whereas x86 does
>> not
>> it uses special i/o inst (IN and OUT) and separate address space
>> you have to find i/o address-space obj then attach Ruby as i told u
>> already
>> I have not done it before
>> ________________________________
>> From: Sitos Lin <sitos.lin@xxxxxxxxx>
>> To: Gems Users <gems-users@xxxxxxxxxxx>
>> Sent: Tuesday, December 29, 2009 17:14:05
>> Subject: Re: [Gems-users] Ruby for x86 machine
>>
>> Hello:
>>   I am trying case 2 and 3, and I have modified the files
>> simics/SimicsDriver and simics/SimicsProcessor to capture the requests
>> filtered in function isUnhandledTransaction(). Here, my question is
>> this modification can capture all requests (including the ones
>> filtered out in isUnhandledTransactions: ifetch/prefetch/dma/io ...)
>> for case 2, but not works for case 3. That means,
>> isUnhandledTransaction does not receive the requests such as DMA/IO.
>> So, I can not capture the requests from device in x86 machine. So, I
>> have no idea what's wrong. :)
>> Best regards,
>>   Sitos
>>
>> 2009/12/29 Muhammad abid Mughal <mabidm_pieas@xxxxxxxxx>:
>> > Hi,
>> > There are three cases
>> >  1. Opal + Ruby
>> >  2. Simics(Sparc)+ Ruby and
>> >  3. Simics (x86) + Ruby.
>> > You have performed the first one but to perform 2nd or 3rd you have to
>> >  follow:
>> >    If you are using Simics and Ruby then for every memory
>> > operation(ie  ld/st/atomic/ifetch/prefetch/dma/io, etc)  simics calls
>> > this
>> > function
>> >      SimicsDriver::makeRequest() and this function filters out
>> > all  unsupported operations(ie i/o , DMA,cache flush, prefetch)
>> >  via  SimicsDriver::isUnhandledTransaction(). so this way DMA/ io
>> > operations  are not passed to Ruby and not cached in any caches.
>> >
>> >  you need to make some changes to this
>> > function  SimicsDriver::isUnhandledTransaction(). whenever memory is
>> > accessed by DMA
>> >  or I/O device this  IS_DEV_MEM_OP(mem_trans->s.ini_type) returns true
>> > and
>> > you can use  'mem_trans' arg to do some profiling
>> >  Hope it helps
>> >  Regards,
>> >  Muhammad abid
>> >
>> > ________________________________
>> > From: Sitos Lin <sitos.lin@xxxxxxxxx>
>> > To: Gems Users <gems-users@xxxxxxxxxxx>
>> > Sent: Tuesday, December 29, 2009 16:02:38
>> > Subject: Re: [Gems-users] Ruby for x86 machine
>> >
>> > Hi:
>> >   I found that for both sparc and x86 machine, ruby is attached to
>> > phys_mem0 (x86) or phys_mem (sparc). If the phys_mem0 (or phys_mem)
>> > represnets the physical memory. Why I can get the memory requests from
>> > device in Sparc/Ruby, but only get the memory requests from processor
>> > in x86/Ruby? Does some objects filter the requests from device in x86
>> > machine, so that them can not reach phys_mem0? Thank you.
>> > Best regards,
>> >   Sitos
>> >
>> > 2009/12/29 Muhammad abid Mughal <mabidm_pieas@xxxxxxxxx>:
>> >> Hi,
>> >>     You dont need to attach Ruby to physical memory, its already
>> >> attached.In
>> >> Simics , Every physical memory object (of class ram) has associated
>> >> memory-space(class of simics) object.. To see if ruby attached ,Type
>> >> following commands on simics CLI
>> >> Ultrsparc processor specific, Give them a try
>> >>  list-objects    display all objects in the system . try to find obj
>> >> like
>> >> "phys_mem0" then type
>> >> phys_memo.map   Display which ram object(s) this memory space is
>> >> attached
>> >> @conf.phys_mem0.timing_model  If ruby attached then display ruby
>> >> @conf.cpu0.physical_memory  Display name of memory-space to which this
>> >> processor attached
>> >>
>> >> To see how Ruby attached to timing_model of memory-space
>> >> see init_local in ruby.c file
>> >>
>> >> Regards,
>> >> Muhammad abid
>> >> ________________________________
>> >> From: Sitos Lin <sitos.lin@xxxxxxxxx>
>> >> To: Gems Users <gems-users@xxxxxxxxxxx>
>> >> Sent: Tuesday, December 29, 2009 12:37:08
>> >> Subject: Re: [Gems-users] Ruby for x86 machine
>> >>
>> >> Hello:
>> >>   I attach Ruby to the x86 machine by following the same instructions
>> >> from the quick start:
>> >>
>> >> instruction-fetch-mode instruction-fetch-trace
>> >> istc-disable
>> >> dstc-disable
>> >> cpu-switch-time 1
>> >> load-module ruby
>> >> ruby0.setparam g_NUM_PROCESSORS 1
>> >> ruby0.setparam g_MEMORY_SIZE_BYTES 4294967296
>> >> ruby0.init
>> >>
>> >>   There is no instruction indicating which physical memory objects
>> >> ruby attach to. How can I attach ruby to a specific memory object?
>> >> Thank you.
>> >>
>> >> Best regards,
>> >>   Sitos
>> >>
>> >> 2009/12/28 Dan Gibson <degibson@xxxxxxxx>:
>> >>> Sitos,
>> >>> Make sure you have attached Ruby to all physical memory objects. The
>> >>> serengeti target in Simics has only one, but as I recall, the x86
>> >>> target
>> >>> has
>> >>> many physical memory spaces.
>> >>>
>> >>> Regards,
>> >>> Dan
>> >>>
>> >>> On Mon, Dec 28, 2009 at 4:03 AM, Sitos Lin <sitos.lin@xxxxxxxxx>
>> >>> wrote:
>> >>>>
>> >>>> Hello:
>> >>>>  I have modified several files in Ruby to capture the memory access
>> >>>> from device (DMA operations). It works well with Sparc machine. I can
>> >>>> see the memory requests both from processor and device. However, when
>> >>>> I load Ruby module to a x86 machine, there are only requests from
>> >>>> processor without the requests from device. Do x86 machine need
>> >>>> additional modifications? Thanks.
>> >>>> Best regards,
>> >>>>  Sitos
>> >>>> _______________________________________________
>> >>>> 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.
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> http://www.cs.wisc.edu/~gibson [esc]:wq!
>> >>>
>> >>> _______________________________________________
>> >>> 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.
>> >>>
>> >>>
>> >>>
>> >> _______________________________________________
>> >> 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.
>> >>
>> >>
>> >> ________________________________
>> >> Get your preferred Email name!
>> >> Now you can @ymail.com and @rocketmail.com.
>> >> _______________________________________________
>> >> 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.
>> >>
>> >>
>> >>
>> > _______________________________________________
>> > 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.
>> >
>> >
>> > ________________________________
>> > Get your new Email address!
>> > Grab the Email name you've always wanted before someone else does!
>> > _______________________________________________
>> > 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.
>> >
>> >
>> >
>> _______________________________________________
>> 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.
>>
>>
>> ________________________________
>> Get your preferred Email name!
>> Now you can @ymail.com and @rocketmail.com.
>> _______________________________________________
>> 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.
>>
>>
>
>
>
> --
> http://www.cs.wisc.edu/~gibson [esc]:wq!
>
> _______________________________________________
> 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.
>
>
>
[← Prev in Thread] Current Thread [Next in Thread→]