[rvm-research] Turning off synchronisation

View: New views
8 Messages — Rating Filter:   Alert me  

[rvm-research] Turning off synchronisation

by Khilan Gudka-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear all,

Is there any easy way to turn synchronized into a no-op? I would like  
to do various (timing) comparisons like against a version with no  
synchronisation.

Khilan

--
Khilan Gudka
PhD Student
Department of Computing
Imperial College London
http://www.doc.ic.ac.uk/~khilan/


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Turning off synchronisation

by Filip Pizlo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

See ThinLock.java.  Assuming you're doing this in the adaptive  
configs, simply changing inlineLock and inlineUnlock to do nothing and  
return will get you pretty close.  The baseline compiler will still  
emit calls to locking methods, but the speed of baseline-executed code  
does not have a significant impact on the speed of the program overall.

Another thing to note is that the RVM uses biased locking, which is  
quite fast - by default, monitors don't lead to any synchronization at  
all - just a load, compare, store.

Something to worry about is that the VM itself uses locks. :-)  So you  
may get some very interesting crashes when you do this!

-Filip



On Sep 8, 2009, at 6:36 , Khilan Gudka wrote:

> Dear all,
>
> Is there any easy way to turn synchronized into a no-op? I would like
> to do various (timing) comparisons like against a version with no
> synchronisation.
>
> Khilan
>
> --
> Khilan Gudka
> PhD Student
> Department of Computing
> Imperial College London
> http://www.doc.ic.ac.uk/~khilan/
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Turning off synchronisation

by David P Grove :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Khilan Gudka <khilan@...> wrote on 09/08/2009 06:36:07 AM:
>
> Is there any easy way to turn synchronized into a no-op? I would like  
> to do various (timing) comparisons like against a version with no  
> synchronisation.
>


Since Jikes RVM uses Java synchronization for its own implementation, I think it is fairly unlikely that no-oping all synchronization is likely to yield a working VM.  

Probably your best bet would be to try to modify the optimizing compiler to no-op monitorenter/exit bytecodes for selected application classes.  Won't be perfect, but maybe enough for you to see something.

--dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


Re: [rvm-research] Turning off synchronisation

by Emery Berger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Another possibility - which would allow you to use other JVMs, should
you so desire, and would probably be easier than modifying the Jikes
compiler - would be to use bytecode rewriting. Which raises a good
question - what Java bytecode rewriters are people using these days?

--
Emery Berger
Associate Professor
Dept. of Computer Science
University of Massachusetts
www.cs.umass.edu/~emery



2009/9/8 David P Grove <groved@...>:

> Khilan Gudka <khilan@...> wrote on 09/08/2009 06:36:07 AM:
>>
>> Is there any easy way to turn synchronized into a no-op? I would like
>> to do various (timing) comparisons like against a version with no
>> synchronisation.
>>
>
> Since Jikes RVM uses Java synchronization for its own implementation, I
> think it is fairly unlikely that no-oping all synchronization is likely to
> yield a working VM.
>
> Probably your best bet would be to try to modify the optimizing compiler to
> no-op monitorenter/exit bytecodes for selected application classes.  Won't
> be perfect, but maybe enough for you to see something.
>
> --dave
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Turning off synchronisation

by Filip Pizlo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm an ASM fan (http://asm.ow2.org/).  This would be quite trivial in  
ASM.

-Filip



On Sep 8, 2009, at 13:39 , Emery Berger wrote:

> Another possibility - which would allow you to use other JVMs, should
> you so desire, and would probably be easier than modifying the Jikes
> compiler - would be to use bytecode rewriting. Which raises a good
> question - what Java bytecode rewriters are people using these days?
>
> --
> Emery Berger
> Associate Professor
> Dept. of Computer Science
> University of Massachusetts
> www.cs.umass.edu/~emery
>
>
>
> 2009/9/8 David P Grove <groved@...>:
>> Khilan Gudka <khilan@...> wrote on 09/08/2009 06:36:07 AM:
>>>
>>> Is there any easy way to turn synchronized into a no-op? I would  
>>> like
>>> to do various (timing) comparisons like against a version with no
>>> synchronisation.
>>>
>>
>> Since Jikes RVM uses Java synchronization for its own  
>> implementation, I
>> think it is fairly unlikely that no-oping all synchronization is  
>> likely to
>> yield a working VM.
>>
>> Probably your best bet would be to try to modify the optimizing  
>> compiler to
>> no-op monitorenter/exit bytecodes for selected application  
>> classes.  Won't
>> be perfect, but maybe enough for you to see something.
>>
>> --dave
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports  
>> 2008 30-Day
>> trial. Simplify your report design, integration and deployment -  
>> and focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Jikesrvm-researchers mailing list
>> Jikesrvm-researchers@...
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>>
>>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Turning off synchronisation

by Steve Blackburn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, asm is the popular choice these days.   Furthermore, it is one of  
our build dependencies already (we use it for adding annotations).

--Steve

On 09/09/2009, at 3:44 AM, Filip Pizlo wrote:

> I'm an ASM fan (http://asm.ow2.org/).  This would be quite trivial in
> ASM.
>
> -Filip
>
>
>
> On Sep 8, 2009, at 13:39 , Emery Berger wrote:
>
>> Another possibility - which would allow you to use other JVMs, should
>> you so desire, and would probably be easier than modifying the Jikes
>> compiler - would be to use bytecode rewriting. Which raises a good
>> question - what Java bytecode rewriters are people using these days?
>>
>> --
>> Emery Berger
>> Associate Professor
>> Dept. of Computer Science
>> University of Massachusetts
>> www.cs.umass.edu/~emery
>>
>>
>>
>> 2009/9/8 David P Grove <groved@...>:
>>> Khilan Gudka <khilan@...> wrote on 09/08/2009 06:36:07 AM:
>>>>
>>>> Is there any easy way to turn synchronized into a no-op? I would
>>>> like
>>>> to do various (timing) comparisons like against a version with no
>>>> synchronisation.
>>>>
>>>
>>> Since Jikes RVM uses Java synchronization for its own
>>> implementation, I
>>> think it is fairly unlikely that no-oping all synchronization is
>>> likely to
>>> yield a working VM.
>>>
>>> Probably your best bet would be to try to modify the optimizing
>>> compiler to
>>> no-op monitorenter/exit bytecodes for selected application
>>> classes.  Won't
>>> be perfect, but maybe enough for you to see something.
>>>
>>> --dave
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports
>>> 2008 30-Day
>>> trial. Simplify your report design, integration and deployment -
>>> and focus
>>> on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Jikesrvm-researchers mailing list
>>> Jikesrvm-researchers@...
>>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Jikesrvm-researchers mailing list
>> Jikesrvm-researchers@...
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Turning off synchronisation

by Khilan Gudka-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thanks for the advice. I'm using Soot.

Khilan

--
Khilan Gudka
PhD Student
Department of Computing
Imperial College London
http://www.doc.ic.ac.uk/~khilan/

On 8 Sep 2009, at 21:02, Steve Blackburn wrote:

> Yes, asm is the popular choice these days.   Furthermore, it is one of
> our build dependencies already (we use it for adding annotations).
>
> --Steve
>
> On 09/09/2009, at 3:44 AM, Filip Pizlo wrote:
>
>> I'm an ASM fan (http://asm.ow2.org/).  This would be quite trivial in
>> ASM.
>>
>> -Filip
>>
>>
>>
>> On Sep 8, 2009, at 13:39 , Emery Berger wrote:
>>
>>> Another possibility - which would allow you to use other JVMs,  
>>> should
>>> you so desire, and would probably be easier than modifying the Jikes
>>> compiler - would be to use bytecode rewriting. Which raises a good
>>> question - what Java bytecode rewriters are people using these days?
>>>
>>> --
>>> Emery Berger
>>> Associate Professor
>>> Dept. of Computer Science
>>> University of Massachusetts
>>> www.cs.umass.edu/~emery
>>>
>>>
>>>
>>> 2009/9/8 David P Grove <groved@...>:
>>>> Khilan Gudka <khilan@...> wrote on 09/08/2009 06:36:07 AM:
>>>>>
>>>>> Is there any easy way to turn synchronized into a no-op? I would
>>>>> like
>>>>> to do various (timing) comparisons like against a version with no
>>>>> synchronisation.
>>>>>
>>>>
>>>> Since Jikes RVM uses Java synchronization for its own
>>>> implementation, I
>>>> think it is fairly unlikely that no-oping all synchronization is
>>>> likely to
>>>> yield a working VM.
>>>>
>>>> Probably your best bet would be to try to modify the optimizing
>>>> compiler to
>>>> no-op monitorenter/exit bytecodes for selected application
>>>> classes.  Won't
>>>> be perfect, but maybe enough for you to see something.
>>>>
>>>> --dave
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Let Crystal Reports handle the reporting - Free Crystal Reports
>>>> 2008 30-Day
>>>> trial. Simplify your report design, integration and deployment -
>>>> and focus
>>>> on
>>>> what you do best, core application coding. Discover what's new with
>>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>>> _______________________________________________
>>>> Jikesrvm-researchers mailing list
>>>> Jikesrvm-researchers@...
>>>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>>>>
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> 30-Day
>>> trial. Simplify your report design, integration and deployment - and
>>> focus on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Jikesrvm-researchers mailing list
>>> Jikesrvm-researchers@...
>>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Jikesrvm-researchers mailing list
>> Jikesrvm-researchers@...
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Turning off synchronisation

by Khilan Gudka-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've been looking through the rvm command line flags here: http://www.jikesrvm.org/Running+the+RVM and noticed the flag no_synchro for the optimising compiler. However, this flag doesn't seem to exist anymore or has it been moved somewhere else?

Thanks 
--
Khilan Gudka
PhD Student
Department of Computing
Imperial College London

On 8 Sep 2009, at 21:06, Khilan Gudka wrote:

Hi,

Thanks for the advice. I'm using Soot.

Khilan

--
Khilan Gudka
PhD Student
Department of Computing
Imperial College London
http://www.doc.ic.ac.uk/~khilan/

On 8 Sep 2009, at 21:02, Steve Blackburn wrote:

Yes, asm is the popular choice these days.   Furthermore, it is one of
our build dependencies already (we use it for adding annotations).

--Steve

On 09/09/2009, at 3:44 AM, Filip Pizlo wrote:

I'm an ASM fan (http://asm.ow2.org/).  This would be quite trivial in
ASM.

-Filip



On Sep 8, 2009, at 13:39 , Emery Berger wrote:

Another possibility - which would allow you to use other JVMs,  
should
you so desire, and would probably be easier than modifying the Jikes
compiler - would be to use bytecode rewriting. Which raises a good
question - what Java bytecode rewriters are people using these days?

--
Emery Berger
Associate Professor
Dept. of Computer Science
University of Massachusetts
www.cs.umass.edu/~emery



2009/9/8 David P Grove <groved@...>:
Khilan Gudka <khilan@...> wrote on 09/08/2009 06:36:07 AM:

Is there any easy way to turn synchronized into a no-op? I would
like
to do various (timing) comparisons like against a version with no
synchronisation.


Since Jikes RVM uses Java synchronization for its own
implementation, I
think it is fairly unlikely that no-oping all synchronization is
likely to
yield a working VM.

Probably your best bet would be to try to modify the optimizing
compiler to
no-op monitorenter/exit bytecodes for selected application
classes.  Won't
be perfect, but maybe enough for you to see something.

--dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports
2008 30-Day
trial. Simplify your report design, integration and deployment -
and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
30-Day
trial. Simplify your report design, integration and deployment - and  
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers