lucasb has quit [Quit: Connection closed for inactivity]
drbobbeaty has quit [Read error: Connection reset by peer]
drbobbeaty has joined #jruby
kiwi_53 has joined #jruby
kiwi_53 has quit [Remote host closed the connection]
voloyev[m] has joined #jruby
<headius[m]>
Field org.jruby.runtime.DynamicScope.staticScope is not present on type java.lang.Object. Error encountered while analysing org.jruby.runtime.DynamicScope.getStaticScope()
<headius[m]>
weird error compiling with graalvm native-image
rusk has joined #jruby
snickers has joined #jruby
snickers has quit [Read error: Connection reset by peer]
shellac has joined #jruby
sagax has quit [Read error: Connection reset by peer]
kith has joined #jruby
sagax has joined #jruby
lucasb has joined #jruby
<headius[m]>
lopex: hey couple questions
<headius[m]>
what was the resolution for jcodings on graal native-image? Did you add a class that touches everything to be pre-initialized?
<headius[m]>
second question: Docker?
<headius[m]>
if you won't have time to take on the docker image that's fine, we just need to get it done
olleolleolle[m] has joined #jruby
sagax has quit [Quit: Konversation terminated!]
sagax has joined #jruby
kith has quit [Quit: kith]
<lopex>
headius[m]: yeah, I'm on vacations till end of the week
<lopex>
headius[m]: jcodings has generated switch for encodings and transcoders, so no reflections is used there
<lopex>
headius[m]: what the deadline ?
<headius[m]>
lopex: yeah I'm trying to iterate all encoding objects and call getClass to make sure they've initialized
<headius[m]>
deadline for docker...well I was hoping it would be done whenever he got back from his vacation, which would be a month ago
<headius[m]>
I'm fine taking it over or handing it to someone else, just need to know
<lopex>
headius[m]: truffleruby doesnt have problem with it I guess
<headius[m]>
they just worked around it too
<headius[m]>
by eagerly loading everything
<headius[m]>
seems like an Encoding.loadAll or similar would be simple enough to add
xardion has quit [Remote host closed the connection]
rusk has quit [Remote host closed the connection]
xardion has joined #jruby
shellac has quit [Ping timeout: 245 seconds]
subbu is now known as subbu|lunch
drbobbeaty has quit [Read error: Connection reset by peer]
drbobbeaty has joined #jruby
subbu|lunch is now known as subbu
jrafanie has joined #jruby
drbobbeaty has quit [Read error: Connection reset by peer]
drbobbeaty has joined #jruby
KeyJoo has joined #jruby
KeyJoo has quit [Ping timeout: 245 seconds]
snickers has joined #jruby
<lopex>
headius[m]: by generating the getClass code or iterating via encoding map ?
<lopex>
doesnt matter right ?
<lopex>
btw static final fields are not eager by default right ?
<lopex>
from what I recall instanceof doesnt trigger class loads etc
<headius[m]>
lopex: probably iterating
<headius[m]>
yeah I think static final still is lazy until accessed
<headius[m]>
hmm seems close to running native-image jruby now
<lopex>
native still equals substrate ?
<lopex>
if so, all calls are mega etc ?
<lopex>
I guess I forgot some things
<headius[m]>
yes = substrate
<headius[m]>
I'm just attempting to get it to run with IR interpreters
<headius[m]>
there's no JIT on substrate unless we backend on Graal or Truffle
<lopex>
er, I mean the callsite optz are statically resolved on substrate right ?
<lopex>
er
<lopex>
so graal can runtime opt that native image ?
<lopex>
I'm lost
<headius[m]>
oh well the Java calls sure
<headius[m]>
only things that can be statically determined at build time
<lopex>
yeah
<lopex>
so not that much
<lopex>
well mostly the core jdk libs it applies to I think
<lopex>
maybe some intrinsics as well ?
<headius[m]>
yeah all of JRuby + deps + JDK stuff we touch
<headius[m]>
any intrinsics it would just inline at build time
<lopex>
intrinsic changes it's meaning a bit here right ?
<lopex>
ok
<headius[m]>
substrate does a very aggressive closed-world optimization, so nothing is left but native code
<headius[m]>
so yeah, intrinsics have no meaning...they'd be inlined during that build process
<lopex>
but lots of poly calls remain
<headius[m]>
it makes an effort to prove all targets up to some threshold
<headius[m]>
I assume it can't handle mega sites
<lopex>
why ?
<headius[m]>
so those must have some other mechanism like a vtable
<lopex>
once jcodings are loaded all calls are mega
<headius[m]>
well in any system there has to be a few methods that have hundreds of impls, like a toString
<lopex>
jcodings methods have many impls though
<lopex>
I think aot is a big looser here
<headius[m]>
could be
<headius[m]>
the limitations of this environment seem likely to restrict it to mostly the smallest Java apps
<headius[m]>
I almost have JRuby compiling but had to disable lots of stuff
<lopex>
that's why jcodings loading is lazy so hotspot can use devirt and bimorphic as most as possible
<lopex>
actually I'm not sure how does C2 handle loaded classes and visited callstites
<lopex>
but the less the better ?
<headius[m]>
yeah I'm not sure how it impacts substrate because ideally it should see only the ones you actually use
<lopex>
how ?
<lopex>
it has pic ?
<headius[m]>
it walks everything
<lopex>
but it cant devirtualize callsites once you load lots of impls right ?
<headius[m]>
it can if a given site is proven to only call one impl
<lopex>
and in case of jcodins it really cant :P
<lopex>
or am I missing something big
<lopex>
most calls in jruby string core are not visible that far
<headius[m]>
well where wouldn't it be able to?
<headius[m]>
some places will be polymorphic sure
<headius[m]>
since we use more than one or two encodings at runtime typically
<lopex>
dunno, length ?
<lopex>
it's used all over the place
<lopex>
I would expact that from JIT yes
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lopex>
but you mentioned graal can jit substrate native code yes ?
<headius[m]>
if a given site calls length against several impls then yeah I assume there's some sort of cache or jump table
<headius[m]>
many sites will only ever actually see one impl
<lopex>
so, there more that three impls loaded anyways
<lopex>
like ascii, utf, ascii8bit etc ?
<lopex>
so like 3 candidates already
<headius[m]>
doesn't matter what's loaded, it matters what's actually called where
<lopex>
oh
<headius[m]>
but this is the same for C2
<lopex>
well
<headius[m]>
if C2 has a call site for length and you only call one encoding impl at that site, it will inline that one
<lopex>
so at runtime most you can get is bimorphic right ?
<lopex>
but assuming we have 3 encodings loaded and all 3 have common callsites in our core lib, what are the chances ?
<lopex>
I can only see a mega one
<headius[m]>
yeah it shouldn't be too common
<lopex>
unless you have code splitting vm
<headius[m]>
well substrate does some of that too but I don't know to what extent
<lopex>
does C2 do splitting ?
<headius[m]>
I don't think so
<lopex>
it was advertized in graal afaik
<headius[m]>
yes, probably not in the crippleware version though
<headius[m]>
enebo: I am finding some minor bugs in JRuby through this process
<headius[m]>
things we initialize for no reason, things we don't initialize at the right times
<headius[m]>
I'll commit fixes that don't impact JVM execution
<enebo[m]>
headius: nice
<lopex>
enebo[m]!!
<lopex>
I think I should switch to riot
<lopex>
something keeps me in though
<headius[m]>
IT WORKS
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lopex>
yeah keeping it on a tab at work
<headius[m]>
enebo: it works
<headius[m]>
trying to enable more of core now
<enebo[m]>
headius: oh yeah
<headius[m]>
magic sauce was getting graal to generate a list of everything we reflect
lucasb has quit [Quit: Connection closed for inactivity]