<headius>
kares: yeah optimizing super call paths is at the top of my list... it shows up in every profile and if it's showing up then it also means these are heavily hit methods that aren't inlining either
<headius>
I am interested in seeing this megamorphic site
<headius>
we may need to move toward some method splitting to avoid megamorphic sites like that, if it's truly mega
<headius>
(but splitting can only do so much... we can't split dozens or hundreds of ways)
<headius>
donv: Best option now would be to check in what you have and I will look at the guide. It sounds like you have done a lot of great work!
<donv[m]>
<headius> "donv: Best option now would be..." <- Thanks! I will check in what I have for JRuby 9.4 on a `jruby_9_4` branch. Master works with JRuby 9.2.
<donv[m]>
<headius> "catching up messages" <- I will be working on this today for the next few hours.
<headius>
ok I am just putting together slides but I could give this a shot in a few minutes
<headius>
if you will be around for a while then I'll refocus on that for a bit
<headius>
pulling now
<donv[m]>
headius: Not pushed, yet...
<donv[m]>
headius: Pushed now.
<donv[m]>
<headius> "pulling now" <- org.jruby.util.io.ModeFlags is using com.sun.nio.file.ExtendedOpenOption.NOSHARE_DELETE which is missing. Catching `java.lang.NoSuchFieldError` looks like the solution for this.
<donv[m]>
Added the missing files and added the catch. I believe this is not the long term solution. Just trying to get it to work :)
<headius>
ok
<headius>
yeah that's fine
<headius>
I have run into that being problematic elsewhere too
<donv[m]>
headius: ```
<headius>
it's not a public API
<headius>
I think we may only be using that for Windows so it could be masked
<donv[m]>
java.lang.NoSuchMethodError: No virtual method setFile(Ljava/lang/String;)V in class Lorg/jruby/parser/StaticScope; or its super classes (declaration of 'org.jruby.parser.StaticScope' appears in /data/app/~~V8EUUBTMIR9QR_uVy44DOA==/org.ruboto.jruby9k_poc-Pp_Gk4iyVaIe8GJi6DJahg==/base.apk!classes8.dex)
<headius>
is this pushed work in ruboto or jruby9k_poc
<headius>
that seems to be a mismatched version... we would not be able to build if that method were missing
<donv[m]>
OK, I'll update it.
<headius>
I see your pushes on Ruboto master, is this the right place?
<donv[m]>
I am working on JRuby9k_POC to get that to work, then backport to ruboto.
<headius>
ok
<donv[m]>
Good plan?
<donv[m]>
Oh, I have a meeting. AFK for half an hour.
<headius>
ok I'll be here
<headius>
yes good plan
<headius>
goal was always to get the 9k poc to be Ruboto proper anyway
<headius>
heh IntelliJ start up Gradle right way when I opened the project
<headius>
so that's a good sign for it fitting into Android build world
<headius>
ok working through the guide
<headius>
can you build it for 12 and have it run on 13? or does that security issue stop it?
<headius>
ok I assume the guide you mean is the one in the ruboto repo
<headius>
and JRuby9k_POC is just an app that uses Ruboto and updates some stuff, am I remembering the structure right?
<headius>
ok I managed to gradle assemble after updating target SDK
<headius>
oh of course it won't load on my phone though :-)
<headius>
how are you reproducing these issues with 13? I can try to hack on it a bit
<headius>
I should say now I know almost nothing about building Android stuff, but I want to learn and make this work for me and others
<donv[m]>
headius: I'm back.
<headius>
hi there!
<headius>
I'm working through this... it has been a long time since I did anything with android
<donv[m]>
<headius> "and JRuby9k_POC is just an app..." <- Yes.
<headius>
I just bumped target SDK to 33 to see if I can get it to load or error on my phone
<donv[m]>
<headius> "how are you reproducing these..." <- I use the emulator in Android Studio.
<headius>
right, I figured that's the way to avoid phone security issues but I want to try anyway :-)
<headius>
I have the POC up in Android Studio now
<donv[m]>
Running?
<headius>
sorry no, just up :-) I realized I was still in intellij
<headius>
getting emulator running now
<donv[m]>
java.lang.invoke.WrongMethodTypeException: Expected (org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope)org.jruby.runtime.scopes.DynamicScope0 but was (org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope)org.jruby.runtime.DynamicScope
<donv[m]>
at org.jruby.parser.StaticScope.construct(StaticScope.java:192)
<donv[m]>
at org.jruby.runtime.DynamicScope.newDynamicScope(DynamicScope.java:54)
<donv[m]>
at org.jruby.runtime.DynamicScope.newDynamicScope(DynamicScope.java:97)
<donv[m]>
Sorry, forgot to clean the project.
<headius>
gradle complains about needing 17, where do I set that in the IDE?
<donv[m]>
A fresh version of StaticScope.java got me past the previous error.
<headius>
ok good
<headius>
oh I found it in gradle settings
<headius>
yay I got it to run and crash
<donv[m]>
java.lang.invoke.WrongMethodTypeException: Expected (org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope)org.jruby.runtime.scopes.DynamicScope0 but was (org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope)org.jruby.runtime.DynamicScope
<donv[m]>
at org.jruby.runtime.DynamicScope.newDynamicScope(DynamicScope.java:54)
<donv[m]>
at org.jruby.runtime.DynamicScope.newDynamicScope(DynamicScope.java:97)
<donv[m]>
at org.jruby.parser.StaticScope.construct(StaticScope.java:192)
<headius>
oops I was on master... now on jruby_9_4 and repeating
<donv[m]>
Maybe old DynamicScopeGenerator ?
<headius>
that should only be used at build time now
<headius>
"should"
<headius>
I'm getting a duplicate class failure during build
<headius>
on the branch
<donv[m]>
digest?
<headius>
yeah
<donv[m]>
clean project.
<donv[m]>
Build => Clean Project in the menu
<headius>
aha
<headius>
so it is picking up old stuff from master build
<donv[m]>
Yeah, I wish it didn't.
<headius>
we can come up with a better way, probably hook gradle clean into scrubbing temp files from jruby update?
<donv[m]>
I think we can, but will take some digging.
<donv[m]>
Hey: Found a cleanup line in app/update_jruby_jar.sh Will add removing digest there.
<headius>
nice
<headius>
that clean did not seem to work but I saw a rogue digest.jar in git status
<headius>
I'm guessing they just didn't audit these changes when they started locking down access to these APIs. This commit basically expands MethodHandles.identity across all primitive types and then uses a MethodHandles::Lookup object to get a reference to them. They need to allow that operation, or else acquire those references some other way. This is definitely their bug.
<donv[m]>
ok
<donv[m]>
Are you hopeful it will be fixed?
<donv[m]>
If we fix the AR class name issue, I think the POC is complete for API 27-32. I would love to merge that into master.
<headius>
I am hopeful yes
<headius>
ok I'll pivot and look into that naming
<headius>
not sure what part it hates most
<headius>
I will see that if I just run the AR demo yes?
<donv[m]>
yes
<headius>
I don't think the formatting of the name has any importance, like it does for jitted Ruby methods (I have to embed enough info to create a Ruby stack trace)
<headius>
hmm I get a different error in my env
<headius>
LoadError: no such file to load -- jar:/data/app/~~G7X9n93b4ObagfZxM4IUPg==/org.ruboto.jruby9k_poc-CH2fFUdpkZ9m9WaSQPl-7w==/base.apk!/active_model/validations/absence.rb
<headius>
the = and , in that name are valid in JVM spec and are how we encode some special characters
<headius>
ah, it's how we encode a . character
<headius>
well the good news is we just have to adjust this mangler to use less exotic characters
<headius>
debating whether this is worth filing a as a bug, because it's pretty deep in the dex spec
<donv[m]>
Can't hurt, can it?
<headius>
yeah just not sure how eager I am to fight for it :-)
<donv[m]>
:)
<headius>
I think we should just replace this mangler with some higher multilingual plane characters unlikely to come up in identifiers
<headius>
according to this down they allow U+10000 to U+10FFFF so we have some options
<headius>
s/down/doc/
<donv[m]>
Sounds good.
<headius>
I think I got past that by encoding it with Klingon characters (really just using the ConScript area of Unicode that's set aside for private uses) but something else seems to break when loading the activity now
<headius>
not sure if I broke it
<headius>
nope, I broke it
<donv[m]>
I checked in a couple of small changes. Better layout for the buttons. It should not affect you.
<headius>
ok
<headius>
donv: getting late here for me so I will give you this patch... it seems like it should be ok, but something I'm doing here now breaks the child activities (json, activerecord, etc) so that they don't even launch properly
<headius>
I probably screwed something up here needed to load the new subclass once it has been created