<bbrowning_away>
headius: rtyler: I'm going to poke around a bit more before submitting a PR, but I see about 25% perf improvement when parsing JSON documents under heavy multithreading with https://gist.github.com/bbrowning/707abba9cf9548c7de31
bbrowning_away is now known as bbrowning
e_dub has joined #jruby
<bbrowning>
basically just avoiding the synchronized code block when parsing every little part of a JSON document and instead taking the hit once when setting up the ParserSession
e_dub has joined #jruby
<bbrowning>
hmm yourkit still shows me quite a bit of contention here, even with my changes. so more progress can be made!
triple_b has joined #jruby
<bbrowning>
or perhaps not - the 25% speedup appears to be all the progress that can be made, despite what yourkit says
<bbrowning>
still, not bad!
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chrisseaton>
headius or enebo: if someone's written some code in a fork of JRuby, and it's 2-clause BSD, copyright Regents of the University of California, can that be merged in? Should I ask them to also license under our licenses?
ryez has joined #jruby
yfeldblum has joined #jruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #jruby
dabradley has joined #jruby
pietr0 has quit [Quit: pietr0]
DomKM has joined #jruby
Neomex has quit [Ping timeout: 245 seconds]
deobalds has quit [Quit: Computer has gone to sleep.]
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #jruby
anaeem1 has quit [Read error: Connection reset by peer]
anaeem1 has joined #jruby
johnmuhl has quit [Quit: Connection closed for inactivity]
fidothe_ has quit [Ping timeout: 244 seconds]
chrisseaton has quit [Ping timeout: 244 seconds]
asarih has quit [Ping timeout: 244 seconds]
DomKM has quit [Ping timeout: 244 seconds]
amdprophet has quit [Ping timeout: 244 seconds]
asarih has joined #jruby
fidothe__ has joined #jruby
DomKM has joined #jruby
chrisseaton has joined #jruby
amdprophet has joined #jruby
mcclurmc has quit [Remote host closed the connection]
nirvdrum has quit [Ping timeout: 244 seconds]
nirvdrum_ is now known as nirvdrum
colinsurprenant has joined #jruby
havenwood has joined #jruby
e_dub has quit [Quit: e_dub]
e_dub has joined #jruby
deobalds has joined #jruby
colinsurprenant has quit [Quit: colinsurprenant]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton created truffle-hash (+6 new commits): http://git.io/i8JOSA
<JRubyGithub>
jruby/truffle-hash 9810a50 Chris Seaton: [Truffle] Basic new implementation of large hashes.
<JRubyGithub>
jruby/truffle-hash 0eee052 Chris Seaton: [Truffle] Fix default block in buckets hash.
<JRubyGithub>
jruby/truffle-hash 3e82545 Chris Seaton: [Truffle] Pull out some hash classes to the top level.
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton opened pull request #2328: [Truffle] New implementation of non-small hashes (master...truffle-hash) http://git.io/YSMAXw
JRubyGithub has left #jruby [#jruby]
deobalds has quit [Quit: Computer has gone to sleep.]
towski has joined #jruby
etehtsea has joined #jruby
etehtsea has quit [Max SendQ exceeded]
rsim has joined #jruby
rsim1 has joined #jruby
pchalupa has joined #jruby
noop has joined #jruby
rsim has quit [Ping timeout: 265 seconds]
ryez has quit [Ping timeout: 246 seconds]
Neomex has joined #jruby
mcclurmc has joined #jruby
mcclurmc has quit [Ping timeout: 240 seconds]
Neomex has quit [Read error: Connection reset by peer]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to truffle-hash: http://git.io/xTGLOw
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
jruby/truffle-hash 18593e6 Chris Seaton: [Truffle] Fix a couple of hash bugs.
havenwood has quit [Remote host closed the connection]
havenwood has joined #jruby
havenwood has quit [Remote host closed the connection]
dumdedum has joined #jruby
purplefox has joined #jruby
yfeldblum has quit [Ping timeout: 240 seconds]
mister_solo has joined #jruby
pchalupa has quit [Quit: Leaving]
frobs has joined #jruby
towski has quit [Quit: goodbye friends I am gone]
Hobogrammer_ has quit [Ping timeout: 265 seconds]
towski has joined #jruby
josh-k has joined #jruby
yfeldblu_ has joined #jruby
josh-k has quit [Read error: No route to host]
josh-k has joined #jruby
mister_solo has quit [Ping timeout: 265 seconds]
yfeldblu_ has quit [Ping timeout: 244 seconds]
pchalupa has joined #jruby
robbyoconnor has joined #jruby
yarker has quit [Excess Flood]
marr has joined #jruby
josh-k_ has joined #jruby
yfeldblum has joined #jruby
yarker has joined #jruby
josh-k has quit [Ping timeout: 258 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
elia has joined #jruby
mccraig is now known as mkkraeg
mister_solo has joined #jruby
reto_ has quit [Ping timeout: 256 seconds]
reto_ has joined #jruby
claudiuinberlin has joined #jruby
noop has quit [Ping timeout: 245 seconds]
noop has joined #jruby
vtunka has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian pushed 1 new commit to test-jossl-0.9.6: http://git.io/hbdmaQ
<headius>
chrisseaton: it would have to be submitted by original author(s) under our licenses
<headius>
we incorporate bits of other-licensed code but generally try to limit that to external libraries
mitchellhenke has joined #jruby
mitchellhenke has quit [Client Quit]
<nirvdrum_>
headius: codefinger opened a small PR to add a 2.0 method into 1.7.x. I wasn't sure if you were merging any of those any longer: https://github.com/jruby/jruby/pull/2327
anaeem1 has quit [Remote host closed the connection]
purplefox has joined #jruby
johnmuhl has joined #jruby
Aethenelle_ has joined #jruby
Aethenelle has quit [Ping timeout: 264 seconds]
Aethenelle_ is now known as Aethenelle
anaeem1_ has joined #jruby
anaeem1_ has quit [Remote host closed the connection]
Aethenelle_ has joined #jruby
Aethenelle has quit [Ping timeout: 264 seconds]
Aethenelle_ is now known as Aethenelle
Aethenelle has quit [Client Quit]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian pushed 1 new commit to master: http://git.io/KtSNsw
<JRubyGithub>
jruby/master 20b95a5 Christian Meier: [build] omit the Properties Maven Plugin if there is no build.properties [skip ci]
JRubyGithub has left #jruby [#jruby]
vtunka has quit [Quit: Leaving]
mitchellhenke has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to truffle-hash: http://git.io/JDAR5A
<JRubyGithub>
jruby/truffle-hash 35c1350 Chris Seaton: [Truffle] Make the bucket chain singly linked.
JRubyGithub has left #jruby [#jruby]
e_dub has quit [Quit: e_dub]
<headius>
bbrowning: oh yeah, I was going to look at the patch
<bbrowning>
headius: I wasn't able to find any other simple perf improvements, so I went ahead and submitted that PR
<bbrowning>
that patch removes almost all the RuntimeInfo.forRuntime contention - enough of it that the little remaining contention (when initializing Parser instances) isn't a problem
<bbrowning>
and, the actual change is very trivial - regenerating the .java file for the Parser makes the diff bigger because of all the line number comment changes
<JRubyGithub>
jruby/test-jossl-0.9.6 cc4b32a kares: we can not guarantee extension ordering using Java APIs (otherwise this rolls fine)...
<bbrowning>
probably a lot more libraries out there with similar contention issues - I really need to get my hands on some real-world apps that aren't IO bound
<JRubyGithub>
jruby/test-jossl-0.9.6 b68db6c kares: WiP - do not exclude those that no longer fail ... (at least on 1.9)
JRubyGithub has left #jruby [#jruby]
<headius>
bbrowning: for sure...makes me want to do some profiles of json to see what else is in there
yfeldblum has joined #jruby
<bbrowning>
nothing else obvious stood out - once I removed that contention the rest of the time was mainly spent in parseString
<headius>
I think this must have been introduced later than my last perf work, because this should have shown up
<headius>
ok, that's what it looked like last time I tried
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to master: http://git.io/BeL4tw
<JRubyGithub>
jruby/master 233fad8 Chris Seaton: [Truffle] Make it clear what in our Ruby code is just there as a shim.
JRubyGithub has left #jruby [#jruby]
yfeldblum has quit [Ping timeout: 258 seconds]
<bbrowning>
headius: org.jruby.RubyContinuation$Continuation exceptions are very lightweight? And meant to be thrown throughout the lifetime of a program? Various other exceptions like NextJump and ReturnJump stopped getting thrown once things have JITted, it appears.
enebo has joined #jruby
<headius>
hmmm
<headius>
well the old NextJump and ReturnJump should not be used anymore...IR has different ones
<bbrowning>
oh sorry - this is under 1.7
<headius>
they should all be lightweight though
<headius>
ahhh
<headius>
there will be more jump exceptions in interpreter because it can't do a direct branch as in bytecode
<headius>
it has to unroll interpreter back to e.g. nearest while loop
<bbrowning>
right, and I see the jumps tapering off once things have compiled
<bbrowning>
but the Continuation sticks around forever
<bbrowning>
getting throw thousands of times per second on this app
<bbrowning>
thrown*
<bbrowning>
while under load, that is
<headius>
that's used for catch/throw
<headius>
it's a concern but not as much as a full exception with a trace
<bbrowning>
ok - I'm trying to figure out why I can't get the app to use more than about 40% of my CPU, even with that json contention fixed
<headius>
could be allocation rate
<headius>
memory pipeline
<bbrowning>
oops it was my bad - I forgot to disable yourkit's agent
<headius>
hah well that would do it too
<bbrowning>
with their agent enabled it can't use up the CPU but with it disabled now the process is using it all :)
Aethenelle has joined #jruby
tenderlove has joined #jruby
noop has quit [Ping timeout: 250 seconds]
tenderlo_ has joined #jruby
<headius>
much better
subbu is now known as subbu|away
tenderlove has quit [Ping timeout: 264 seconds]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 2 new commits to truffle-hash: http://git.io/TbhF4Q
<JRubyGithub>
jruby/truffle-hash b2a89e6 Chris Seaton: [Truffle] We don't need HashSearchResult as a DSL type at all.
<JRubyGithub>
jruby/truffle-hash 639ecf6 Chris Seaton: [Truffle] Change hash guard terminology to PackedArray or Buckets
JRubyGithub has left #jruby [#jruby]
<bbrowning>
headius: does jruby JIT things that are executed via instance_eval?
<bbrowning>
seems like Cuba does an instance_eval on every request as its primary way of dispatching requests
<bbrowning>
I see some ast and interp stuff as well as some jitted stuff in the stack so it's not obvious to me if everything inside that instance_eval is actually jitted or not
<headius>
bbrowning: if it's a string, no, never
mcclurmc has quit [Remote host closed the connection]
<headius>
if it's a block, it is subject to method JIT...if the method surrounding it doesn't JIT, the block won't either
<bbrowning>
in this case it's instance_eval(&@blk) where @blk is a block passed in earlier
<headius>
that will change in 9k
<headius>
mmm
<headius>
I'm betting it never jits
<headius>
block-granularity jit was too hard to wire into 1.7 compiler
<bbrowning>
so if I run it under 9k it would be more likely that the block gets jitted?
mkristian has joined #jruby
<headius>
I don't know if I have it wired in there yet either, but only because we haven't decided on heuristics for it (when to JIT, what to do if containing method has not compiled)
<bbrowning>
ahh ok
<headius>
if the &blk was actually a method.to_proc it would work, with a little wrapper overhead
mcclurmc has joined #jruby
<nirvdrum>
headius: I just tested. Something in master is still causing the JVM to crash.
<headius>
grrr...gist me a repro if you can, as well as current dump
<nirvdrum>
I don't think it's easily reproducible. I'll see if I can distill it, but it may very well be dependent on compiling a bunch of stuff first.
pchalupa has quit [Quit: Leaving]
benlovell has joined #jruby
<nirvdrum>
I can privately share the repo if that'd help.
<headius>
that would help...but I may need to get a JVM person involved
<headius>
I can learn a lot from the dump though
<nirvdrum>
Do you have a bitbucket account?
<nirvdrum>
Feel free to move to PM, too.
<headius>
I do, headius
<headius>
same everywhere
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to truffle-hash: http://git.io/V7saGg
<JRubyGithub>
jruby/truffle-hash 2bb0e15 Chris Seaton: [Truffle] Make the packed array guard for hash, which is complicated by covariance, just the negation of the other two.
JRubyGithub has left #jruby [#jruby]
mcclurmc has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
yfeldblum has joined #jruby
<headius>
enebo: those crashes appear to be IR eval blowing up
<enebo>
oh yeah?
<headius>
crashing in travis too
<enebo>
ok well that is both good and bad. weird since I ran long travis spec job and test:mri
havenwood has joined #jruby
subbu|away is now known as subbu
<enebo>
ok test:compiler
<headius>
spec:compiler
mcclurmc has joined #jruby
<headius>
it runs against both IR and JVM now
<enebo>
yeah
<enebo>
indy and ir?
<enebo>
heh indy and jvm6?
<headius>
interpreter and JIT
<headius>
it runs against both
<headius>
jvm6 by default
<enebo>
ok
cpuguy83_ has quit [Remote host closed the connection]
<enebo>
IR to me sometimes only means interp and sometimes also JIT. Sort of confused in my head
yfeldblum has quit [Ping timeout: 240 seconds]
cpuguy83 has quit []
cpuguy83_ has joined #jruby
cpuguy83 has joined #jruby
cpuguy83 has quit [Client Quit]
cpuguy83_ is now known as cpuguy83
cpuguy83 is now known as Guest88881
mcclurmc has quit [Remote host closed the connection]
<headius>
yeah I know...and "compiler" can mean our jit or IR compiler now
benlovell has joined #jruby
drbobbeaty has quit [Ping timeout: 240 seconds]
<enebo>
headius: reproduced locally. I would like to not revert this so I will try and figure this out
<headius>
ok
Neomex has quit [Ping timeout: 272 seconds]
e_dub has joined #jruby
mcclurmc has joined #jruby
Guest88881 is now known as cpuguy83
drbobbeaty has joined #jruby
cpuguy83_ has joined #jruby
cpuguy83_ has quit [Client Quit]
jimbaker` is now known as jimbaker
mcclurmc has quit [Remote host closed the connection]
graphex has quit [Read error: Connection reset by peer]
anaeem1_ has joined #jruby
anaeem1_ has quit [Remote host closed the connection]
graphex has joined #jruby
mcclurmc has joined #jruby
Neomex has joined #jruby
mcclurmc has quit [Remote host closed the connection]
Hobogrammer has joined #jruby
frobs has quit [Quit: Leaving]
jumex has joined #jruby
<jumex>
This might be a n00b question, but does anyone here know if it is possible ot set the rails.env (or Rails.env) at deploy time instead of compile time in a warbler-bundled WAR?
<bbrowning>
jumex: I'm not warbler expert, but I do believe you can configure this via config/warble.rb
<bbrowning>
oh wait - that's compile time
<bbrowning>
jumex: so you want to be able to set the rails env for each deployed app separately without having to open up the .war file and edit it, right?
<jumex>
bbrowning: That would be ideal.
<bbrowning>
hmm - it would be quite trivial if you wanted all apps running under the same process to use the same rails env
<bbrowning>
you could just set $RAILS_ENV for that process before booting the server
<jumex>
Hmm, I wonder if I
<jumex>
have access to do that.
<jumex>
I have the ability to set -DRAILS_ENV=blerg on the java commandline that runs the container, but that doesn’t seem to work.
<bbrowning>
jumex: you can modify config/warble.rb to check a jvm system property if you'd like
<bbrowning>
jumex: well, the example they give shows adding a jetty-web.xml to your compiled war that then looks for an override-web.xml outside of the war
<bbrowning>
so the override-web.xml sits on disk outside the .war
<jumex>
Ah. I was reading it wrong, then. That could work, perhaps
<bbrowning>
it looks like you could use that to override the rails.env parameter that gets passed in via the warbler-generated web.xml
pietr0 has joined #jruby
yfeldblum has joined #jruby
phrinx has joined #jruby
yfeldblum has quit [Ping timeout: 245 seconds]
josh-k has quit [Remote host closed the connection]
<JRubyGithub>
jruby/master ae8e0aa Thomas E. Enebo: Revert until I figure this regression out
JRubyGithub has left #jruby [#jruby]
tenderlove has joined #jruby
mcclurmc has joined #jruby
mcclurmc has quit [Remote host closed the connection]
_elia has quit [Quit: Computer has gone to sleep.]
cprice_ has joined #jruby
cprice has quit [Ping timeout: 265 seconds]
<chrisseaton>
enebo headius: you could call the bit from AST to IR the 'translator' - what's what we do
<chrisseaton>
then the only 'compiler' is the JIT
<chrisseaton>
plus AOT maybe
<headius>
chrisseaton: well, IR is compiled from AST
<headius>
I dunno
<chrisseaton>
headius: yeah - but you could decide to call it 'translation' instead of compilation
<enebo>
we call the AST -> IR a builder
<headius>
I think we've been referring to it as compilation for so long it would be more confusing
<headius>
if subbu wants to call it "build" or "translation" then I'll fall in line :-)
<enebo>
yeah I think we just need to say JIT vs Interp and not use IR at all
<enebo>
Saying we have an IR bug should refer to both ultimately
<enebo>
Like builder is generating wrong instrs
<enebo>
compiler shold probaly not be used at all as a term too
<subbu>
yes, translation is the right term from ast -> ir .. i called it ir builder to not conflate it with the JIT compiler .. since in most people's minds compiler indicates the final executable target.
rimenes has joined #jruby
<headius>
bleah, google guava is so big
<headius>
I keep wanting to use it but seriously, 2.3MB is bigger than all of Clojure
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to master: http://git.io/Ii6vBw
<JRubyGithub>
jruby/master 8d38b3e Chris Seaton: [Truffle] Work on Struct.
JRubyGithub has left #jruby [#jruby]
<headius>
bbl
<rtyler>
bbrowning: fix json yet? :P
<bbrowning>
rtyler: CC'd you on a PR
<headius>
yet more evidence that if JRuby's slow, it's a bug
imperator has joined #jruby
yfeldblum has quit [Remote host closed the connection]
<rtyler>
bbrowning: we were looking through that code this morning that you linked
<rtyler>
somebody I don't think fully understood what synchronized {} in java does
<bbrowning>
some of that RuntimeInfo synchronization may need to change, but I was able to avoid most of it entirely by just calling RuntimeInfo.forRuntime far less often when parsing JSON
jeremywoertink has joined #jruby
<jeremywoertink>
Anyone have any luck using RoboVM by chance? :D
yfeldblum has joined #jruby
<jeremywoertink>
I just want to run a simple "hello world" and it's proving to be a lot more difficult than I thought. Although, I really don't know java at all, so I'm sure it's something simple with my jrubyc that I'm missing
mister_solo has joined #jruby
e_dub has joined #jruby
yfeldblum has quit [Ping timeout: 250 seconds]
skade has joined #jruby
<headius>
jeremyevans: oh neat
<headius>
er sorry
<headius>
jeremywoertink: oh neat! :-)
mcclurmc has joined #jruby
<headius>
so what are the restrictions on robovm-compiled stuff?
<jeremywoertink>
I don't know that there are any restrictions yet
<jeremywoertink>
using jruby 1.7.16.1 (1.9.3p392) 2014-10-28 4e93f31 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_65-b17 +jit [darwin-x86_64]
<jeremywoertink>
if that makes a difference
<headius>
oh!
<headius>
oh hah
<headius>
you need jruby.jar in the classpath too
<headius>
-cp classes/:path_to/jruby.jar
<jeremywoertink>
that's what I figured, which is why in my first example, I did $CLASSPATH << 'path to jar'
<jumex>
bbrowning: I resolved my issue with one of your initial suggestions: Adding RAILS_ENV=blerg before the java command on the command line. I had forgotten that my configuration gave me control of what goes before “java.”
<jumex>
thanks for the help!
<bbrowning>
jumex: great - glad that worked :)
<jumex>
you and me, both. :D
<jeremywoertink>
when I do the -cp is that with the `jrubyc --javac -cp path/to/jruby.jar hello.rb` ?
<headius>
jeremywoertink: but the robovm compiler needs to see it too
<headius>
it is basically only seeing your compiled ruby script, and "phantom class" means it can't see any of the JRuby core
<headius>
so your robovm command line -cp needs to include jruby.jar
<headius>
at a minimum
<jeremywoertink>
OH. ok
<jeremywoertink>
I see what you mean
<headius>
this is exciting
<headius>
I kept meaning to try it
<jeremywoertink>
omg, it's doing new stuff!
<jeremywoertink>
lots of new stuff O_o
<headius>
I applied for beta
<jeremywoertink>
I have that game I wrote with jruby. I'm curious to see if I can get it to run in the ios simulator :)
<headius>
jeremywoertink: this will be a good test...if it supports what android supports, it may work pretty well
<headius>
and it may avoid some startup time due to dalvik
<headius>
I wonder if donv has tried ART for Ruboto
<jeremywoertink>
looks like it's compiling jruby stuff
<jeremywoertink>
I am seeing a few random Warning: java.lang.management.RuntimeMXBean is a phantom class! still
<jeremywoertink>
but I guess I can figure out where those come from and add them to the classpath
<jeremywoertink>
lol. lightbulb. -cp stands for "classpath" huh? ~_~
<jumex>
oh. I never realized that. classpath DOES make sense.
<headius>
most of the phantom classes I saw are JDK classes that it probably doesn't support
<headius>
well yeah, but that isn't a particularly *useful* trace :-)
<jeremywoertink>
lol. agreed
<headius>
hmmm
<headius>
that's a jruby trace
<headius>
so jruby was at least able to boot
<headius>
do the docs say anything about passing JVM properties to it?
<enebo>
OMFGZ I pushed forward and spec:compiler just started working again :)
<headius>
this is breaking when it tries to run the jrubyc-compiled main
<headius>
enebo: the way out is through!
<headius>
jeremywoertink: how did you compile that script?
<jeremywoertink>
not sure. I'll look
<enebo>
I went down the rabbit hole and realized I was in fact in a fantastic space ship
<jeremywoertink>
I just did `jrubyc hello.rb`
<headius>
remove the classpath line also, that's not necessary
<headius>
ahh ok
<jeremywoertink>
and the hello.rb just has a puts in it
<headius>
so that's the plain script compile...it would boot jruby and run the script as a normal command line, rather than generating a normal-looking Java class
<headius>
ok right
<headius>
so not the java_signature version
<headius>
hmm
<headius>
looking at what bytecode I spit out for main
<headius>
it's probably getClassLoader
<headius>
I bet that's returning null for the main class on RoboVM
<jeremywoertink>
I can try the java_signature style
<jeremywoertink>
does that return a different bytecode set?
<headius>
jeremywoertink: can you build jruby 1.7?
<headius>
I have a patch to try
<jeremywoertink>
1.7.0 ?
<headius>
1.7 branch, I mean
<jeremywoertink>
oh, from github?
<headius>
yeah
<jeremywoertink>
yup
<headius>
I'm just guessing at that NPE but this might get it farther