Thanks Remi, the extra comments really helped
You also mentioned
There is another way to do something similar,
you can call invokedynamic, use the bootstrap arguments to send
the primitive values composing the object value and when the
BSM is called returns a ConstantCallSite with as
are discarded so it seems any
of the above would work. Any thoughts on which might be the least
overhead? ( or best optimized?).
I was guessing permute ( as you suggested)
thanks
mark
On 01/06/2011 05:42 PM, Mark Roos wrote:
Thanks to all for the suggestions on providing live
Sorry for not being clear. In my Smalltalk implementation all objects are
of type
RtObject so the types ( classes ) are always RtObject. return and args
alike. So if
I know the airity I know the type array. It just seems like more work for
the jvm in a path
which I hope will be fast.. Or
Thanks Steve
I am using your builds as well and appreciate the effort
mark roos
mlvm-dev-boun...@openjdk.java.net wrote on 01/11/2011 07:29:02 PM:
From:
Stephen Bannasch stephen.banna...@deanbrook.org
To:
Da Vinci Machine Project mlvm-dev@openjdk.java.net
Date:
01/11/2011 07:29
From:
Rémi Forax fo...@univ-mlv.fr
At least it will be easier to debug with a Java Debugger.
If this works I hope to be using the smalltalk debugger (-
So are convertArgs and invokeGeneric expensive vs nothing and
invokeExact?
I don't follow you here.
My question had to do with run
Thanks Kirill
My plan is to use invokeExact so this matches my use case.
mark
My question had to do with run time overhead. Do you think that
invokeGeneric
is slower than invokeEaxct at run time? If not then that removes one
of the
reasons for not using java classes.
Hi Mark,
From:
Rémi Forax fo...@univ-mlv.fr
Mark, it's an Eclipse bug.
MethodHandle.invokeExact and MethodHandle.invokeGeneric aren't
compiled correctly by Eclipse.
The compile works correctly its the run that fails. The .class files
generated
run fine using bash.
On Eclipse 3.5 on mac the
Getting closer to running Smallalk on Java. We are at the point of
importing the
ST methods into the java side to use with invokeDynamic.
We are planning on one java class per ST method ( and its blocks ) and so
would
have about 45000 classes. During a typical development session about 1%
of
Not critical but I would like to plan my tasks around it.
I am using the late Feb build by Stephen and it is not compatible with
b131 (exception changes )
BTW its working great
thanks
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
I have been working with method lookup and caching using gwt which seems
to work well.
However to get it to work I had to set up the casting in a way which was
not obvious to me.
In my Smalltalk implementation all ST objects are instances of a single
java class ( RtObject )
so I was thinking
I am at the point where I need to plan for the insitu replacement of
methods. For this I need to relink the call sites
which reference the selector of the method being replaced. Looking over
the latest api I don't see the old methods
which one could use to force a callsite to an unlinked
, Mark Roos wrote:
I am at the point where I need to plan for the insitu replacement of
methods. For this I need to relink the call sites
which reference the selector of the method being replaced. Looking over
the latest api I don't see the old methods
which one could use to force a callsite
FWIW Go with invoke. The use of the modifier 'generic' was confusing to
me, which led me to
selecting invokeExact as I assumed it would be faster than something
which
was potentially doing unnecessary conversions.
regards
mark
From:
John Rose john.r.r...@oracle.com
To:
Da Vinci
I am ready to make the change myself, go for it.
Where will the anonymousClassLoader end up?
mark
From:
John Rose john.r.r...@oracle.com
To:
Da Vinci Machine Project mlvm-dev@openjdk.java.net
Date:
03/28/2011 01:03 PM
Subject:
the fate of java.dyn
Sent by:
mlvm-dev-boun...@openjdk.java.net
Thanks, ti really helps alot
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
In reading John's blog I saw a mention about changing dropArguments,
perhaps providing a simpler version?
I would like that.
In my code dropArguments is used to drop all but the first argument before
a bind and test for the
test branch of guardWtihTest. Mine is a special case where all of the
I know you are all working hard to bring 292 to a release so I thought I
would take a moment
to thank you all for your work and to tell you how much that work helped
with our Smalltalk
porting.
We have about 500K lines of Smalltalk code which we want to run on the
JVM. The approach we
picked
John wrote
If the desired MethodType is available, you can also use
MethodType.parameterList to get a List of the parameters (at O(1) likely
allocation cost). From thatlist you can also subList to
specify the desired dropped parameter types.
Interesting thought. Upon
Hi Christian,
I've always liked your enthusiasm
So far we are running on OSX and the latest win7 build. both work fine.
Now that we have the core running we need to move to java.lang.invoke (
which should be trivial).
What is it you like to look at? Once we make the move I could package up
I ran into this error today and was wondering if was not allowed as
the name string for an invokeDynamic instruction?
An if there are restrictions where might I find the definitive reference?
I was using it for the Smalltalk method name and
as a template for constants.
Thanks
mark
Thanks Rémi
Yes my Java is about as good as my French
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Of course I would love to see the low level infrastructure in jdk7
binaries.
You can hammer out the java syntax for 8
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Lukas wrote
I'll soon fork of a version that only supports lots of coroutines,
because this makes a lot of things much easier (it doesn't require the
whole copy to/from stack logic).
My thought was to use coroutines to emulate Smalltalk processes. For this
I need to convert the
machine stack
Now that the core works I thought I would take a quick look at the
execution speed. For this I
executed the same code in our current environment (OS/2 and a mid 90's
Smalltalk) and again using
our invokeDynamic based vm translation. The code gets a string, parses in
into commands and
it can be fixed in ASM soon, since the code in question is being
generated by a particularly gnarly part of JRuby's compiler.
- Charlie (mobile)
On Apr 29, 2011, at 15:58, Mark Roos mr...@roos.com wrote:
I have seen a stack map issue with ASM 4 as well. In my case it was dead
( unreachable
In the Smalltalk I am porting the solution they use is to just drop the
entire chain and let it
reform. The assumption would be that for any short time period in the
life of a program no sites
are megamorphic. the metric they use is the total amount of active code.
Since they actually
drop
high polymorphic dispatch costs?
Sent by:
mlvm-dev-boun...@openjdk.java.net
On 05/01/2011 11:01 PM, Mark Roos wrote:
In the Smalltalk I am porting the solution they use is to just drop the
entire chain and let it
reform. The assumption would be that for any short time period in the
life
Hi Rémi
Covering constants using method handles is minor but I found it important
for my work.
And If you are covering the gamut of VM requirements then some discussion
of mapping
non java objects to java objects would be helpful. Especially the few
type constraints the
jvm ( or class
Rémi said
I try for that talk to be not too close to the API but more use case
oriented.
So instead of constant mh, do you agree that the UC is lazy initialization
?
or do you have another UC in min
The case I ran into was one of needing non java constants ( objects of my
own types)
and thus
I am at the final task in implementing Smalltalk using 292 which is
implementing a live debugger.
In Smalltalk the debugger works by suspending the current thread,
inspecting and perhaps modifying
the frame and then allowing the thread to proceed. The basic operations I
need are to inspect the
Not that I am the expert here but...
In the Smalltalk we are porting the typical call site supports only a few
actual classes. So the method look up ( which is based on the object
class )
only chooses from a small set ( mostly a single choice). This set is
built up during run time by
John Rose stated
See section 5, Case Study: Inline Caches and invokedynamic.
Thanks John, I have read that several times and it is very helpful
A small (non-megamorphic) polymorphic cache can be represented as
a cascade or decision tree of GWT combinators,
I am using jvmti along with jdi to build a debugger for our Smalltalk on
292 implementation.
Most of it works but when I do stepping it hangs when it gets to one of my
methods. Either due
to the invokeDynamic instruction or perhaps due to it being in an
Anonymous class. Stack frames
look
I have been loading the jvm using a recursive Hanoi and am seeing random
errors when the
number of disks exceed 10 ( see below ). They occur at the same callsite
( a constant call site
followed by an inviokeDynamic) and at a consistent ( about 12) frame depth
but on different passes.
Tried
John stated
Like performance tuning, debugger support is something we will be
addressing after FCS.
No problem. I did notice that creating arrays on the target side ( to
hold objects found by
instances) is very slow ( about 1 ms per object ). Is there a mailing
list where I can ask
Hi John
Sorry for not quickly responding ( as I am sure that Stephen's 6/09
version did not have the patch)
As for the work around I have been doing the bootclasspath for some time
and it did not help.
Oscar tried in the both b138 and b146 windows version and the problem does
not occur there.
Tom mentioned
I think you are seeing 6990212.
Sounds like a fit, thanks
and
I think serviceability-...@openjdk.java.net is probably the best
place to start.
I am on my way there
thanks
mark___
mlvm-dev mailing list
John requested
Yes, please. We especially love stress tests.
Oscar is putting it together. Where should we put/send it ( its not very
large)
regards
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
Ok here is is, a test case for our port of Smalltalk to the JVM using
292. Let me know if you can run it as this is our first outside attempt.
Its a simple test, towers of Hanoi done in a recursive manner. This
version only uses
20 disks as it is much slower than expected ( about 1 sec /
An good question
Oracle's proxies give me a hard time here. What protocol is this
connection using?
The simple answer is that its a binary TCPIP stream which uses 6 byte
headers for message splitting.
Non standard of course.
The longer response is that as part of our plans to become platform
Christian wants work
Now that we are done with 7 I'm looking into performance issues we
have.
My first one is the example Hanoi I sent you
On Oscar's windows machine using invoke dynamic it takes 1 second, on
yours 300ms.
But on
oscar's in pure java the same code is 1.6ms
I just upgraded to the latest OSX version and no longer see the errors.
Add added benefit is that it runs in 65ms on my mac with this.
Looking good
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
From John
Perhaps I can defer my heart-attack after all. :-)
This is a very elusive bug,
In reality its been quite bug free for me. I have been running quite a
few more normal tests without any issues.
The heavy recursion in this test was the only failure.
thanks again
Hi Christian
Now that I have a current working jdk I took a look at the timings and
gave some thought to what I would expect ( or want ).
First with a consistent test bed using my simple Hanoi test I found the
following: ( 64 bit server on a mac with b147)
using int prims 1.8ms
Hi all
I have be using sun.invoke.anon.AnonymousClassLoader for generating my
classes with
no issues until now. With the 6/30 MacOs version from google code I find
that my code runs fine but when
I go to recompile it I get the package not found error. I see the
package in the rt.jar using a
Hi John, Thanks for the plug. I feel that I have taken more than I have
contributed. Hopefully I'll return
some next week.
As for your comments
the anonymous class loader is a purely experimental feature, with
no standard API. For this reason, you can only use it reliably with MLVM
We are using the JVMTI api FollowReferences to collect object information.
In this
api we can set a klass which limits the objects reported. For some reason
we get instances of the
klass we set and BoundMethodHandle instances.
Are they somehow masquerading as a different class ( they are
Thanks to all of the jvm summit feedback we decided to go with an C++
jvmti agent to get the
vm info for our Smalltalk debugger. Stack vars, instances and references
are working.
Pretty small C code ( 400 lines total ) so all in all not bad.
The next step is to step a suspended thread. I
I have be interested the using SwitchPoints for the invalidation phase of
my call sites. As you may
recall I collect sites into an array as they are created. When they reach
some quantity I invalidate them
all and start over. It seems that using a switch point for this is
perfect except that
Well that does explain why I have references to BoundMethodHandles but it
did not explain why I see them.
When I use FollowReferences I set the Klass filter to my desired result
class 'myClass'. But what I see after
the filter is myClass objects, arrays of myClass and BoundMethodHandles.
Not
Rémi asked
About reordering the chain of GWT, what do you want exactly ?
Well until the chain gets long enough to change to some form of table
lookup it
would be nice if the GWTs which have the most 'fast' path test successes
were moved
to the front of the chain. In this case the 'fast' path
Rémi, A message from our glorious ASM leader.
I seem to recall some discussion on the mentioned class names ( MethodType
and MethodHandle).
I assume this means that asm no longer has these types? And thus I no
longer need the full class names
for the java.lang versions?
thanks
mark
From Charlie
* If we encounter a new type at a call site and have not exceeded our
GWT cascade limit, we add it to the chain.
* If we exceed the limit of GWT chaining, wipe out the site and switch
it permanently to an inline cache
Charlie, what is the depth limit you set and how did you arrive
I am getting this error again but its not repeatable. Can you give me any
idea of how I might stress it to make a
test case that happens all of the time? Or is it nothing to worry about?
This is the stack trace. This sequence is the main event handler in my
user io stream so at this point
So it happens with Windows XP server and OSX server but not XP client. I
enabled the print compilation
and the only thing I see that is consistent is the 'made not entrant' on
java.lang.Class::GetName. This happens
the same for each time the error occurs but it happens after the error is
Hi John
The thought experiment is that I have a long GWT chain and two threads are
racing down it.
Each is looking for the same missing class.
The end fallback/lookup is synchronized and so there is only one update at
a time, but the
new GWT is added to the start of the chain and the second
I do have a test case that repeats the resource mark error. We are
trying a new packaging so you should be able to run it
without an external connection.
Hopefully later today
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
Thanks for the quick look. (glad to see it ran for you)
By the 'runtime' to add to the bootclass path do you mean rt.jar or my
runtime (RtalkTest.jar)?
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
From Jeroen
I took the liberty of downloading it as well, to test on IKVM.NET
:-)
Glad it helped
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Thanks Rémi
I tried to put just the offending class on the boot path but that was not
enough.
The entire app worked so I guess the solution is somewhere in between
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
Charles
Does this script get all of the latest mlvm patches or is there another
step to pull those?
What about the conditional stuff like coro?
thanks
mark
mlvm-dev-boun...@openjdk.java.net wrote on 08/19/2011 12:12:28 PM:
From: Charles Oliver Nutter head...@headius.com
To: Da Vinci
Thx Christian,
Is there any efforts to update the build instructions on the wiki? It
seems as if we no longer
need to do the full JDK build, only the hotspot part, in order to test
mlvm updates. It also seems
like you are close to integrating the OSX/BSD requirements into the
standard hotspot
Very interesting, I see that I need a hint for the class/method name. (
it is the source file name but that doesn't print here)
getNIl/true and false are currently a probe into a hash map but should be
a static var. I can
see that it could get pretty large to inline. There are some other
Is that your GWT chains? If so, these are either a little too long or we
have a bug somewhere.
I don't think so ( I think this is a constant look up )
The test part of gwt looks like
public static boolean test(RtObject oldClass, RtObject receiver) {
//System.out.println(test);
From John Rose
indy: first cut of support for new classfile features in JDK7
Where would I look for the features being added? In general is there a
place where pending
changes are listed? One of the 'bug' lists perhaps.
thanks
mark___
From Thomas
(e.g., they could
use the Java expression stack as their own expression stack
implementation).
I believe that this is both used and necessary to create reasonable
performance implementation
of Smalltalk on the jvm. I do this in Rtalk today mapping the Smalltalk
From Christian
The optimistic optimization for MutableCallSite and VolatileCallSite
invalidate compiled methods on every setTarget. This possibly results
in a recompile. For ever-changing call sites this is a performance
hit.
What is the use model of callsites which drives this?
In my case
Hi Rémi
you mentioned
After 10 flushes, you will see
a performance degradation because your hot code will be
no more JITed.
But I also have to setTarget on the callsites when the method code
changes. The easy (most efficient)
way is to reset them all. So after 10
In looking at my code.
In general 98% of the callsites are 3 targets.
Those that are larger I can catch and use a different lookup. I also
believe that Charles Nutter limits his
depth to 5.
So the general case I see will not exceed the 10.
But I do have some cases where 10 is not the right
Hi Christian
You requested:
Mark, could you try that patch with your implementation?
I am at a conference this week but I will set up a test case when I get
back.
regards
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
From Remi
Moreover, are you sure the code that contains these callsites is JITed,
No, but then how would I know and what would I do if I did know. If its
JITed
and I do the 10th ( or whatever) invalidate in three months because of
uploading a patch
and because of that the app slows down
Just wondering if anyone is working on this. Particularly breakpoints and
stepping
thanks
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
From Tom
That was fixed a while back, at least as far our tests say. It was
6990212. Are you still seeing problems? The only JVMTI feature still not
working is class redefinition and that will be fixed for 7u4.
Would that have been fixed in b147? or in one of the updates?
I think I still
Thanks Tom
I'll set it up on a later version, will take a few days as i have to redo
my side
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
This is a pretty cool use of coroutines.
I am trying a similar approach for a web browser base UI and was looking
for
a pattern do handle the time out case. So I send something to the UI, say
open
a dialog box, and suspend the coroutine. but the UI never responds so I
have to
have a loop
Hi Stephen
Any plans to post a JDK8 mlvm build?
thanks for all of the past versions
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
From Stephen
Here's one I built today with fastdebug enabled:
Thanks, got it and it runs my benchmark fine, no runtime errors
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
From Remi
I try use the same coroutine (named uiCoroutine in the code) for
all UI events.
The main coroutine, the one which is implicit do the event
pumping,
when an event is received, I yield to the uiCoroutine with the UI
event
as argument, the uiCoroutine do
This may help
http://www.java.net/external?url=http://blog.joda.org/2011/08/printcompilation-jvm-flag.html___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
From Christian
And a heads-up: soon we will push changes to HS23 that makes it
impossible to drop HS23 into JDK 7.
I hope there will be a preview build of 8 soon.
I am using Stephen's compile of 8 which seems to work
regards
mark___
My installation reports
openjdk version 1.7.0-ea
OpenJDK Runtime Environment (build 1.7.0-ea-b211)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)
regards
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
As always thanks ( I was just about to look for a new one)
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
From Henri
All done.
cd bsd_amd64_compiler2/fastdebug ./test_gamma
openjdk full version 1.7.0-b147-20110923
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
I get the noclassdef found error when I run my code tests using b147 due
to a bug
in the vm.
From Henri
So, I could disable fastdebug in build ?
To charles
Do we need the fastdebug to get the asm listing? And is it slower
to run or just start up?
It seems to run my benchmarks about 30% slower.
Since we have Stephen's with fast debug Henri's could be whatever gives
the
Hi Rémi
Thanks for the comments. I like the idea of using switchPoints and have
been thinking about them both
for this and for the general purpose of method invalidation. Right now I
keep a list of all callsites and
when necessary I dump them all. I thought of replacing this with a
on 11/27/2011 01:07:50 AM:
From: Helmut Eller eller.hel...@gmail.com
To: mlvm-dev@openjdk.java.net
Date: 11/27/2011 01:24 AM
Subject: Re: Implementing a Smalltalk debugger with JSR292
Sent by: mlvm-dev-boun...@openjdk.java.net
* Mark Roos [2011-11-27 06:16] writes:
The approach we took
Hi Charles
Interesting results. Is your code for the coro implementation available
somewhere
to look at?
thanks
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
I just loaded about 250K lines of Smalltalk code into my jvm
implementation so now I can start
some real benchmarks using our application. All of this was done on a
Mac.
My first try was a object load which takes about 20 files and creates a
pretty complex object set. This
takes 100 seconds
Thanks
Adding
-XX:-TieredCompilation
made the run time consistent at 21ms. Still not as fast as b20 ( 5ms )
but faster than 7u4
which is 29ms.
mark
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
...@headius.com
To: Da Vinci Machine Project mlvm-dev@openjdk.java.net
Date: 02/01/2012 12:43 PM
Subject:Re: Benchmarking Smalltalk on JVM
Sent by:mlvm-dev-boun...@openjdk.java.net
On Tue, Jan 31, 2012 at 6:52 PM, Mark Roos mr...@roos.com wrote:
For the initial JDK7 I get 400ms
This may be a little much to ask but... These bytecodes take about 20ns
per cycle to run on
my 2.8 GHz mac using jdk8-B23 without TieredCompile. Does this seem
reasonable given the number of indy calls?
The GWT depth on the method sends is 1
thanks
mark
LABEL 56 LABEL 1
From Rémi
Without the descriptors of invokedynamic and the code of the BSM,
it's
hard to tell.
Yes but they have no invoke dynamics and I was just wondering if my indy
part was causing the
issue. Your answer told me that I should be OK so that was helpful. This
same code was
From Rémi
Anyway, you can optimize the last instructions, = should return a
boolean
so the sequence should be:
ldc 4100
aload 1
indy = (ILObject;)Z
if_eq LABEL 1
I am not sure how to handle this in a Smalltalk envrionment. All of the
objects
Some nice comments from Rémi
So if one call is not inlined in
the middle of the body of the loop, then the VM will
not remove your MutableInteger.
This could be what is causing the difference in time. I have seen some
mails that indicate indy
GWT depth ( methodHandle
So I ran some tests using a simple benchmark using the jdk8-b23 from the
Openjdk google code.
Without tiered compile I get: ( times in nanoseconds )
52101000
53973000
20932000
with tiered on
493788000
521448000
513287000
34293
15048000
But if I invalidate all call sites before the
So I thought I could get away with 64bit ints and not implement the
Smalltalk automatic conversion
to BigIntegers. Bad plan.
So I went ahead and did it while I waited for the super bowl to start. Not
too difficult. Just wrappered
java BigInteger and added some simple overflow detection.
But
Hi Rémi
Just a clarification on the switchpoint usage to invalidate sites.
The switch path would still do a setTarget correct? So I am still sending
lots of
setTargets just based on switch point state?
It also seems that if the switch point is in series with the target that
the callsite
Hi Rémi
I think I am starting to get it.
My normal fallback creates a GWT and does a getTarget + setTarget on the
root callsite to put this GWT at the
head of the chain. I assume that this use of setTarget is as expected and
causes no problems. I think I
found this technique in some of your
Since Smalltalk is usually single threaded I have not been focused on
concurrency issues. Now that I have
that working I have been looking at extending Smaltalk to a concurrent
approach.
One issue that immediately came to the forefront is the invalidation of
call sites when a setTarget is
Rémi your comment
The idea is just to propagate the type you need if you can.
So
for a = 2 = 3, '=' will return a RtObject but
for if (2 = 3), '=' will return a boolean because it's called in
an if.
Ah yes,
this is something that ST compilers do and I think is a good idea.
Basically
1 - 100 of 219 matches
Mail list logo