Re: A simple PIC api

2015-03-12 Thread Mark Roos
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

Re: A simple PIC api

2015-03-11 Thread Mark Roos
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

Re: A simple PIC api

2015-03-11 Thread Mark Roos
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

Re: A simple PIC api

2015-03-30 Thread Mark Roos
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

Re: What can we improve in JSR292 for Java 9?

2015-03-03 Thread Mark Roos
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

Re: What can we improve in JSR292 for Java 9?

2015-03-04 Thread Mark Roos
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

Re: What can we improve in JSR292 for Java 9?

2015-02-25 Thread Mark Roos
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

Re: InvokeDynamic PIC Slowdown (deopt issue?) need advice

2016-06-04 Thread Mark Roos
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

InvokeDynamic PIC Slowdown (deopt issue?) need advice

2016-05-31 Thread Mark Roos
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.

Re: EXT: Re: InvokeDynamic PIC Slowdown (deopt issue?) need advice

2016-07-25 Thread Mark Roos
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,  

Re: InvokeDynamic PIC Slowdown (deopt issue?) need advice

2016-07-24 Thread Mark Roos
 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,

Re: EXT: Re: InvokeDynamic PIC Slowdown (deopt issue?) need advice

2016-07-25 Thread Mark Roos
ld try prototyping this. >> >> Duncan. >> >> On 23/07/2016, 00:25, "mlvm-dev on behalf of John Rose" >> <mlvm-dev-boun...@openjdk.java.net on behalf of john.r.r...@oracle.com> >> wrote: >>>> On May 31, 2016, at 12:41 PM, Mark Roos <mr

Re: Isolated Methods JEP

2016-08-14 Thread Mark Roos
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

Re: Isolated Methods JEP

2016-08-05 Thread Mark Roos
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

Re: EXT: Re: InvokeDynamic PIC Slowdown (deopt issue?) need advice

2016-07-29 Thread Mark Roos
t; It works that way, when a PIC is first created, it's just a mutable > callsite that has the the deopt lambda 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

Re: FTR: JSR 292 RFEs from yesterday's Indy Support Group

2016-08-04 Thread Mark Roos
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

Re: Fwd: constant-dynamic specification, updated

2017-06-25 Thread Mark Roos
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

Re: the End of History in the constant pool

2017-05-18 Thread Mark Roos
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

Re: series of switchpoints or better

2017-10-14 Thread Mark Roos
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?  

<    1   2   3