Re: [rvm-research] How to record objects' read/write times

Robin Garner <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
On 11/05/15 17:53, 王晨曦 wrote:
> Hi,every one
>
>    I want to record objects' read and write times. As far as I know,
> the Write Barrier is inserted before every Pointer update( object
> assignment ), so I can modify the Write Barrier to record the
> reference  times of the source object. But I know the reference times
> is not equal to the write times of the   source object. Such as:
>
> class a{
>    ........
> }
>
> class b{
>
> a test =new a();
>
> double array_double[ ];
> int   array_int[];
>
> ....
> }
>
>
> and the write barrier will only be inserted before the: (Is this right ?)
>
> b.test=a ; //pointer update
>
> but these assignment below will be ignored. But I think these
> assignments will contribute the main read/write times.
>
> for(i=0;i<Const;i++)
>     array[i]=...
>     array_int[i]===
>

If you look at the MutatorContext class you will see that there is not 
just one write barrier, but one per type plus a couple of special cases, 
so there should be opportunities to instrument every field access.

I can't emphasize Eliot's point (3) enough: be very careful of the code 
you invoke in a barrier.  You need to be certain you don't trigger 
another barrier, and if you are instrumenting all types you must use the 
methods in org.mmtk.vm.Barriers to do *all* heap writes.

Regards,
Robin

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.