Charlie said
or
finer, like switchpoint-per-class-and-method-name, which I am playing with
now
Did you ever come to a conclusion here?
And also
polymorphic
caching, with each entry being a GWT (to check type) and a SP (to check
modification)
What happens when the SP triggers? D
Thx John.
I was looking for boot strap args to
allow byte[] constants from the constantPool.
Is that planned?
mark
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Hi John,
Does this allow the use of a byteArray
as one or more of the bootstrap constants?
I seem to recall that was something
I wished for when I did a similar effort with
constant call sites.
mark
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
John mentioned
There's a fiber frame
system struggling to emerge here.
This is interesting. The approaches
I have looked at involve lots of code
rewriting especially to capture the
stack as its unwound. Are you thinking
of some approach where the exception
could capture the stack as it w
My expectations would be for faster load
time and a simpler implementation. In my application
I do think that the need to use a tool
like ASM to handle the complexity of class file generation is
the primary bottleneck.
Getting rid of computing the various
data structures and placing them in the co
Good to see this.
What is the philosophy for code annotations,
line numbers and stack maps?
Would they be some form of constant
entry?
regards
mark
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-d
With respect to general data in constant pools
Adding raw bytes as a constant type would be a good
thing. I currently
have to encode my object serialization as hex utf8
which is not nice.
As for the use of a MH to instantiate the constant.
Would this be done
at load time or would it just insert
as target, thus, the first
> time the PIC is called the deopt lambda is called. This lambda takes
> a Control object that takes a test method handle and a target method
> handle as discussed with Mark (Roos), when the control object is
> called, it changes the target of the current m
In my perfect world a pic looks like this
at the lowest level
mov
object field ==> eax
je
eax=test1 to implementation1 " the special GWT you mention
"
je
eax=test2 to implementation2
...
handle
miss
I would want to move the testN order
to optimize, rep
sure it can be applied to Magik due
>> to the ability for methods to redefined and hence our PICs to be
>> invalidated. I¹ll have a look though, there might be a couple of places I
>> could try prototyping this.
>>
>> Duncan.
>>
>> On 23/07/2016, 0
A few questions on implementation.
My old prototype looks like:
private
RtObject[] _mDicts
= new
RtObject[8]; // array
of method dicts
private
MethodHandle[] _methods
= new
MethodHandle[8]; //
the code MH
MethodHandle lookupSelf(RtObject rcvr,
RtCal
t; From: John Rose
> To: Da Vinci Machine Project
> Date: 07/22/2016 04:26 PM
> Subject: Re: InvokeDynamic PIC Slowdown (deopt
issue?) need advice
> Sent by: "mlvm-dev"
>
> On May 31, 2016, at 12:41 PM, Mark Roos wrote:
> >
> > It looks like
Thx Vladimir
Turns out this was self inflicted by
the means I was using for PIC invalidation. There
is an interesting case when only one
class returns false and all others true ( isNil). Since
this is often in a loop the impact is
severe. I see how to handle this corner case but
it does reopen
I have been implementing a Smalltalk on
the JVM (Rtalk) which has gone quite well. But recently
I was told that one of our key benchmarks
had suffered a large slowdown, from a few hundred
mS to seconds. And strangely it
gets slower the more its executed until we reset all of the call sites.
Lo
Hi Jochen
On why I am looking at projections for
behavior determination.
In my case I use an object reference
in the receiver to determine the method to execute. One
could say that this is a projection
from the class to an address which is an integer. So in this
case computing the projection is
Summary, I would like to consider a projection based PIC along with a
highly
optimized GWT based one.
After a short discussion, some reading and a reexamination of my use
model I
feel like there are two designs for a PIC api which I would like to hear
suggestions
on. I am planning a comparis
Jochen writes
So far I have avoided using projections since I am not sure about
how to
do this. Basically I am missing a way to project a Class to an
usable
int.
After this discussion, reading Rémi's suggested paper and some more
analysis of my code base
I am beginnin
Rémi your suggested paper and comments caused me to take a look at my code
base some more. What I found was that for a given selector+arity 93% of
them
have 5 implementations or less ( across 2000 classes and 25K methods).
Combining
this with my prior observations that 99% of the call sites have
Jochen
The comment on the test part of the pic is interesting. Since I am looking
at multimethods
I would like to have a better understanding of how you decide which code
to dispatch at a site.
My pic suggestion assumes that one test method is applied to the arguments
and its result
used to
Thanks Rémi, I was looking for a paper like that. Not for multimethods
but for a way to
improve code reuse across a hierarchy. Will savor it later with a fine
pinot :)
What I was thinking about for multi methods was a simpler tree like
approach.
http://dl.acm.org/citation.cfm?id=28732
In m
Hi Rémi,
I assume you want me to be more specific about my concerns on:
taking into account invalidation, multi core memory model and
volatile state.
My model is that I have a GWT chain, a cache, and a fallback which is
updating the chain, and more
than one core using the same callsit
Hi Jochen
I have to think about yours some more but I thought I would share mine. I
condensed it to
make it easier to explain.
regards
mark
I extended callsite to hold a bunch of values one of which is the depth.
And my model for the cache is up to 10 chained GWTs after that I drop the
chain
Remi commented
I think you can adapt this code to implement what Mark want quite easily
I don't disagree that pics are easy to code, my premise is that with a
construct such I
I proposed the jvm would do a better job of optimizing. Especially taking
into account
invalidation, multi core memory
>From Jochen
Do I also understand right, that your test for checking if the current
target is still valid is limited to only the receiver?
Well yes and no. In my case the test examines all of the arguments on the
stack and computes
an 'behavior' reference. This reference is the head of a link
Hi Jochen
uses basically guardWithTest, so the order of the handles is never
changed to for example trying the last one first or the one with the
most hits recently. Is it not worth the trouble?
In my case I always add the new gwt to the head of the chain. This fits
my use case where
the most
>From Julian
That being said performance of the PIC construct is very good in our
case.
Do you have any quantitative data on your call site performance vs number
of targets?
thx
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://ma
>From Julian
How is it different from Rémi's construct?
Performance would be the hope.
My position has been that with a decent pic api the jvm would be able to
optimize the
pic to a few test/branch instructions for the large majority of callsites.
For your use case do you have the same situa
I was thinking about a generic pic, easy to use but flexible and came up
with the following concept api.
By passing the callsite and the testValue around with allowing an optional
pic update I can envision
this as a nice building block for several caching strategies. Of course
this is all based
Spread arguments would have been nice to have.
Another related messy argument issue, which took me a while to deal with,
was handling
the receiver (this) object being on top of the stack. Since my GWT test
needs to act on
the receiver I ended up caching an airity specific drop MH. While is
wor
>From Valdimir
We don't want to make Unsafe.defineAnonymousClass() part of public API,
but consider moving forward on that front providing lightweight code
loading machinery.
While I used defineAnno for awhile currently I just use defineClass in my
own class loader.
My only concern is that pe
Julian wrote
An open question that I have is that of facilitating the support
of overloaded methods.
It's typically something dynamically-typed languages struggle
with, and doing it
correctly *and* efficiently is not that pretty.
Overloaded and multi methods have always
John posed two questions on stating points for PICs in jsr292. The first
referenced Charleies method handle binder as an
example. While interesting this tool is aimed at making it easy to
generate MH chains not at improving performance.
And performance is really what I would like to see. For t
New could would mean adding a {MethodHandle, ConstantPoolData}
tuple to a particular callsite?s representation.
Now if we could add a item for the object reference used for the
comparison in the test part of a GWT we would have a structure which could
be used
in a PIC (polymorph
I would like to see some form of PIC (polymorphic inline cache ) support
that
jits (inlines) well and transitions from mono to bi to multi(4,5) to mega
nicely.
The main thought would be to inline two or three with some way to reopt
as the types/counters change.
Of course my types are not java
Thx Attila, it was more a philosophical rant anyway.
I have heard rumors of your dynamic plans and look forward to hearing
about the details.
Perhaps you would consider a workshop like talk at this years jvm summit
regards
mark
___
mlvm-dev mailing l
A statement from Remi defined the reason for my original question very
well.
the ASM packages are only
re-exported [1] for nashorn
Like the Nashorn folks I am building a language using the jvm for which it
would
be helpful if there was a standard api for bytecode writing. One
Thx
Sent from my iPhone
> On Feb 17, 2015, at 11:59 AM, Remi Forax wrote:
>
>
>> On 02/17/2015 08:30 PM, Mark Roos wrote:
>> I see that jdk8 now includes a copy of ASM (jdk.internal.org.objectweb.asm).
>>
>> Is it recommended to use that instance vs suppli
I see that jdk8 now includes a copy of ASM
(jdk.internal.org.objectweb.asm).
Is it recommended to use that instance vs suppling a copy with my
application?
thanks
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mai
>From Morris
All that assert laden code is nice to see.
I just finished watching a video from Doug Lea where he mentioned that
having asserts can
inhibit inlining due to the additional byte codes. So he sadly does not
use them due to
performance issues.
Does anyone have any insights
Thomas, Thanks I did read Chris' note and it sounds promising.
Is there some reading on this?
regards
mark
p.s. I am still wondering why Ruby was the target, not why there was
a target.___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.op
Duncan
I have looked on and off at using the class hierarchy for method lookup.
What drives that
is noticing that most methods only have one implementation and so my PICs
can get
overloaded with receivers which all dispatch to the same method. This is
one on my
main sources of megamorphic call
--PURE OPINION---
Thomas
you state:
Overall, I still believe that sometimes a larger step is needed
when current
techniques start to reach local maxima.
Which, as you mention in other posts, only time will tell if your beliefs
are correct.
I have learned that when proposing suc
Thomas
You state
...a new language implementation platform.
and then
I strongly believe that Truffle is the best currently available
vehicle to make
Ruby competitive in terms of performance with node.js.
If the goal is to create a 'new language' platform then why not c
Comment on Jochen's long stack traces.
The difference must be in how our languages expect the call site to
resolve.
In my case I compile all of the target methods to match the callsite stack
structure.
So the fast path adds no additional manipulations ( binds etc ) between
the callsite
and the
Moving from the startup thread.
Thomas has been wondering why using Truffle as a solution is not getting
immediate
traction. I was initially, and continue to be, quite interested in
Truffle. So how could
Truffle help out us non Java on the JVM developers to the point where we
could be a
drivi
Thanks for the stack traces Jochen, interesting.
I really have no place to complain but I can see your point.
regards
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Thomas stated
A successful research project should ultimately also advance the
state
of the art of what is used in production.
Thomas one of the reasons many of us are building on the JVM is to take
advantage of the entire
universe of Java code available. Truffle, to me at leas
Hi Jochen,
you wrote:
I also see potential for cases in which the MethodHandle gets
overly
complex. In Groovy we have for example up to N+1 guards for a
method
call with N arguments plus a catchException part and a
switchpoint. Most
of them ending up in select
Thanks John, it does bring up a topic I have wanted to ask about
Hotspot's specialization
for Java and how I could take advantage of it. Particularly in the area
of PIC optimization.
You mention:
And we expect to get better at capturing the call-site specific
types,
values, an
>From Charles
This is how JRuby has survived for years. A classloader-per-class has
a big memory load (ClassLoader has a lot of internal state, classes
have a lot of metadata) but with permgen bumped up (or replaced with
metaspace as in 8) and a few reuse tricks, it hasn't been a major
issue for u
I am more of the side that invoke dynamic is awesome for enabling dynamic
languages on the
JVM. Given that there are two areas where I can see some help for my use
case which
is a true Smalltalk on the JVM.
First like Charles I do have a few dependencies on plain old Java methods
during startu
In answer to Charles question on what others do to help the startup.
Smalltalk is like Ruby in that we always start from source code. In our
case
there are a few hundred classes and a few thousand methods that would
be considered minimal ( we call these the base ) and around a thousand
classes a
Hi Charles
Just out of curiosity and a desire to compare my times to yours,
how long is it from the time of launch until the ruby code can
execute? Any how long in time until you see the peak performance?
I always run 64bit and mainly on a Mac so I have been using server
mode from the start.
Fo
>From Florin
I don't think this is really an issue for an already written massive
application such as yours. We have a similarly large Smalltalk application
that we successfully translated to Java (source-to-source, that's yet...
When we looked at it we decided that it would be easier to develop a
example about a simple Groovy program being able to run in about 40MB
memory, but needing quite a bit more with indy. Since I can observe the
memory drain with a small program already, and since I know that handles
are not that reusable yet...
I see about the same, about 2X larger in jvm than n
Hi Again
Just did a quick non scientific look at the memory growth when running an
Rtalk application. 30K methods generated for 15K callsites gave 2-3K
bytes per method
generated. Part of this is that jvm bytecodes which are also generated on
the
fly (starts from Rtalk bytecodes). Lambda form
Hi Raffaello,
Sharing one class as a holder for many methods would be worth looking at
if
the class overhead became significant. Concerns would be in making sure
replaced methods are collected and in housekeeping.
If John moves to providing a 'method loader' then this would be something
to look
Related to the overhead of Lambda forms from Mark Reinhold on the Hotspot
list.
Looks like some efforts to improve them.
New JEP Candidate: http://openjdk.java.net/jeps/210___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net
Hi John
Just to keep my use case visible. For my use I convert each Smalltalk
method to a
Java class ( inheriting from Object ) which only includes static methods.
Due to
how I handle blocks there is often more than one method in each class. I
do invoke
static methods from my support classes.
Hi Raffaello, Mark of RTALK here.
Thanks for the references. Unfortunately, some of them seem
dormant
projects, others seem more experimental than production-ready.
It sounds like you are at the place we were four years ago. A mission
critical
application written in Smalltalk
The Java folks will have to answer this, but I have heard that there are thoughts on how to make unsafe safe and portable. You might ask on the jigsaw list.
-Mark
> On Aug 15, 2014, at 5:03 AM, "Florian Weimer" wrote:
>
> On 08/14/2014 10:15 PM, Mark Roos wrote:
> >
Is there an end-user accessible way of defining anonymous classes
(by
which I mean classes which are kept alive only by explicit
references or
their instances, and not their class loader)?
Searching for the term "anonymous classes" isn't particularly
revealing
Both the Waratek and IBM multi Tenant JVMs demonstrate that the options of
one app per jvm
or many apps per jvm can be efficient and isolated. But I believe that
both of these require that
objects be serialized in order to be sent between apps. My question was
about avoiding the cost
of this
Thanks for the suggestion on Waratek, not sure how it would address the
process to process
messaging issue. It did lead me to another very interesting read though,
http://osv.io. Again
not an answer for the messaging but something that I have always thought
would be interesting to
try, a str
>From Charles
I forgot to mention: more and more users are going with exactly
one
JRuby runtime per app, and most Ruby folks deploy one app in a
given
I have been pondering the merits of apps with a shared jvm ( protection is
provided via a
sandbox) vs independent jvms per app.
Thanks Christian, that seems to fix it ( the exact math ).
Will pummel it some more.
regards
mark
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
So I updated to b119 and changed some callsite signatures from using
Object[] to Object...
// public static RtCallSite bootStrapSelf(MethodHandles.Lookup
callerLookup, String name, MethodType type, Object[] arg) {
public static RtCallSite bootStrapSelf(MethodHandles.Lookup
callerLookup,
I just got back to my Smalltalk efforts and tried to run some code against
114 ( that worked in 103).
I see lots of these errors and I seem to recall that changes are being
made and wonder if someone
could point me towards the changes I need to make.
java.lang.BootstrapMethodError: call site in
I would prefer a spring time event in Europe. I have seen quite enough of
winter in Europe.
regards
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Just for my learning, what is the use model for this form of method
handle inspection?
Is there some cool technique that this facilitates?
regards
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/ml
Duncan suggested:
return the parts that remain (both method handles and bound objects) as I
would guess that would be enough for debugging purposes and resource leak
hunting.
I think that if I could just get a collection of the bound objects in the
chain that
would be enough to do what I want as
>From John
Simple example: Suppose you have a tree of GWTs that a clever
implementation compiles into a big hunk of bytecode
Actually that would be my dream, that hotspot is clever and I can just
let it do the work. Is it?
mark___
Hi John,
Looks like its intended to get some better information for the stack
traces?
Any chance that one could walk the GWT chain from a call site in order to
build
a different look up structure or maybe even some specialized code?
Currently I
keep this in the call site but it seems redundant
FYI, I just ran into this method handle library and masters thesis( in
the doc dir).
https://github.com/ericbodden/dynamate
regards
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Thanks for the interest.
I added this workshop to my proposal. Inputs are welcome on how to
make it a good workshop.
mark
Improving the performance of InvokeDynamic
Now that we have some experience with InvokeDynamic its time
to discuss strategies and efforts for performance improvement.
We ex
Ok Charles is one expert, how about some folks doing the jvm
implementation?
Any thoughts on who that could be
regards
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
:59 PM, Charles Oliver Nutter wrote:
I will volunteer to be an expert.
On Mon, Apr 8, 2013 at 2:53 PM, Mark Roos wrote:
> I would love to put it together, but my knowledge is minimal. I don't
mind
> the
> organizing part but I think we need some folks from the jvm side to
hat's working, what's not, and where to go
from here. Consider me in.
I'm sure it would be accepted, so a proposal would probably be a
formality...but do you want to throw something together, Mark?
- Charlie
On Mon, Apr 8, 2013 at 2:03 PM, Mark Roos wrote:
> It seems like quite
It seems like quite a bit of work is going on around improving the
performance of invokeDynamic.
It would be interesting ( at least to me ) to have an in depth discussion
of what is being done and
how I should adjust my usage to get the best performance for a dynamic
language.
I'll buy the drin
I would be interested as well
mark
From: Eric Bodden
To: Da Vinci Machine Project
Date: 02/19/2013 05:39 AM
Subject:Looking for comments on paper draft "DynaMate: Simplified
and optimized invokedynamic dispatch"
Sent by:mlvm-dev-boun...@openjdk.java.net
Hi all
Thanks Charlie
I will give it a spin.
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>From Jochen
How many targets do you usually keep in the chain before dropping?
I currently set the max to 10. As most( > 98%) of my callsites are 10 or
less most of the
time there is no effect. I have not looked into if this is too deep for
the inliner or not. I have
been told that between 5
>From Jochen
If I understood right, then the call site in foo will become
megamorphic, making it impossible to inline bar into the place from
where foo is called. foo becomes like a inlining barrier so to say.
I see the same for my Smalltalk implementation. In looking at my problem
it seems t
Hi Duncan, Here is what I have been using to profile.
Some notes.
I create all of my Smalltalk methods in an intermediate byte code format
and then use ASM
to create the Java class JIT. Each of my methods results in a single Java
class which may have
more than one method if there are blocks.
I see an interesting discussion here on value types. I assume that at
least part of the
intent is to solve the performance hit by using boxed integers. As such I
was thinking
about how that would affect my Smalltalk implementation.
A simple case for me is the boxing of longs. I use longs ever
...@openjdk.java.net
fastdebug build of hotspot-comp + perf patches:
https://s3.amazonaws.com/openjdk/openjdk8-osx-hotspot-comp-fastdebug-patched.tar.bz2
On Wed, Oct 17, 2012 at 1:54 PM, Mark Roos wrote:
> If you do a fastDebug build I will use it (and buy you a few beers
> sometime).
>
Thanks
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
If you do a fastDebug build I will use it (and buy you a few beers
sometime).
I seem to recall that Henri Gomez has had some issues building a fastDebug
jdk8 fyi.
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mai
Thanks for the build Charles.
For my rtalk benchmarks
jdk7 10.1 secs
jdk812.8
your build 10.7
Looking good. Also no evidence of the class not found error.
Is this a fast debug build?
mark___
mlvm-dev mailing list
ml
>From Charles
Have you taken a look at jnr-x86asm?
No, but I just bookmarked it to talk a look. I had been looking at JNA
as a way to connect to native
libs. Is there some way for me to locate/search for the jRuby native
handler code that uses jnr?
I was looking at LLVM with the thought of
Charles made an interesting comment
Now what we need is a way to inject new intrinsics into the JVM, so I
can make an asm version of something and tell hotspot "no no, use
this, not the JVM bytecode" :)
Of course unless one wants to take on the efforts of Zero Assembler or
Grail and write one's o
I understand your bad luck in micro benchmarking a method that happens to
be intrinsic.
I was just sharing my experience in creating a non Java recognized 'boxed'
primitive and that it did not
on the whole suffer the extreme degradation you see.
As you said 'micro benchmarks are bad'
regards
m
>From Raffaello
are java.lang classes better served by the JVM than other classes?
Here's a small experiment.
I created a MyInteger class that exposes the very same
implementation
of Integer.numberOfTrailingZeros(int), copied verbatim.
We did similar micro benchmar
>From Charlie
The builds there did not work for me on OpenJDK8 for some reason.
I don't have an openJdk 8 fastDebug so I used an jdk7u10 fastDebug from
http://code.google.com/p/openjdk-osx-build/
I used the dylip
hsdis-amd64.dylib from
http://kenai.com/projects/ba
Ok got the hsdis to work, looks like asm. Now on to see what is
happening.
thanks
mark
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Moving along. I tried the printOptoAssembly but that is pretty hard to
follow so
I found a built hsdis dynlib for my mac
http://kenai.com/projects/base-hsdis/downloads/directory/gnu-versions
But I must not have something correct as it reverts to printOpto. Perhaps
cannot fin
>From Charles
Mark: Can you post the assembly output for a simple inlined
dynamic
call? It would probably tell us a lot.
OK, so i got a fastDebug build, added printOptoAssembly and have lots of
data.
How do I pick out a simple inlined call?
thanks
mark___
I am looking closely at the test portion of my guard with test method
handle.
On entry my call stack has zero or more arguments plus the object I wish
to
test on top. Currently I drop all of the arguments ( leaving the test
object ),
bind the value to compare (reference) with and then attach t
>From Charles
then could it simply be that your
indy guard logic and arbitrary precision logic adding all that
overhead? It seems like a lot indeed.
I had not thought about this in a while so perhaps my call site handling
is an issue. I went
for simple in that I use a var
On JRuby fib, it's around 0.44s for fib(35) versus jdk7's 0.33 and
fastruby's 0.19. So that's easily 2x slower, which isn't far off
from
what you're seeing..right?
So for Rtalk ( Hanoi which is the one I have all three for) its
294/629/754 java Static/ JDK7 / JDK
1 - 100 of 282 matches
Mail list logo