Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-07-09

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:05 jnap1 left #moarvm
01:58 FROGGS joined #moarvm
02:59 btyler joined #moarvm
06:09 bcode_ joined #moarvm
06:10 flussence joined #moarvm
06:31 sergot morning o/
07:28 FROGGS joined #moarvm
08:14 brrt joined #moarvm
08:15 brrt \o moarning
08:18 FROGGS morning brrt
08:18 FROGGS brrt: you are excited?
08:18 brrt morning froggs :-)
08:18 brrt yes
08:18 brrt about what, actually?
08:18 FROGGS looks like I'm becoming a soccer fan on my ol' days
08:19 brrt haha ok, i see
08:19 FROGGS :o)
08:19 brrt there's a difference between a soccer fan who watches world cups and a soccer fan
08:20 * brrt can't find his glasses
08:20 brrt found them
08:20 FROGGS hehe
08:20 FROGGS I'm just the former for sure :o)
08:48 brrt yay, sigsegv
08:52 FROGGS \O/
09:01 nwc10 .tell jnthn I made you a cut down test case: http://paste.scsys.co.uk/407344
09:01 nwc10 botfail
09:03 FROGGS nwc10: do it in #perl6
09:09 brrt ok, trampolining now works
09:10 jnthn morning
09:11 jnthn brrt: bouncy bouncy
09:11 brrt morning jnthn :-)
09:11 brrt you shot a nice hole in my 'lets return whether we the jit code is done' theory
09:12 brrt because when optimizing jit-jit calls, that is not a good idea
09:12 FROGGS brrt: now you can put it on the wall and watch it :o9
09:12 FROGGS :o)
09:12 brrt :-D
09:13 jnthn Well, yeah, you may need to fall back into the JIT again when returning...
09:13 jnthn If you're doing the "always returns" model
09:14 brrt the always returns model isn't viable
09:14 brrt returns-is-coupled-to-return-instruction is probably better
09:17 jnthn bbi5
09:23 brrt hmm.. when are frames constructed?
09:24 brrt oh, found it, fixed it
09:25 * brrt has the feeling that x64 is much more sensitive to segv than x86 was
09:31 brrt ok, now i'm at infinite looping
09:35 jnthn segv at least gives a point that's a problem :)
09:42 brrt that is quite rare, in my case, since most of the time the point doesn't represent any code
09:42 jnthn ah, true :)
09:43 brrt hmm.. i thought conditional jumps could take registers
09:46 brrt but they can't
09:46 jnthn aww
09:48 brrt no matter, an unconditional can
09:51 brrt whut, a set with equal source and destination operands
09:52 jnthn That can happen
09:53 jnthn spesh may do decont dest, src ==> set dest, src
09:53 jnthn If it doesn't need to decont
09:53 jnthn But it doesn't clear up the sets yet
09:54 jnthn Which sounds like an easy optimization except you can't quite just make it fall out of usage analysis because if you take away a set (or other instruction) that puts something that's used across a deopt boundary, and you deopt there, then the data could be missing post-deopt...
10:00 dalek MoarVM/moar-jit: 63e201a | (Bart Wiegmans)++ | src/ (9 files):
10:00 dalek MoarVM/moar-jit: Add support for fastinvoke.
10:00 dalek MoarVM/moar-jit:
10:00 dalek MoarVM/moar-jit: There are several weaknesses with the current approach,
10:00 dalek MoarVM/moar-jit: and I'll get to them in due course. Note that this is only
10:00 dalek MoarVM/moar-jit: visible if you disable inlining first.
10:00 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/63e201a335
10:01 jnthn brrt: hehe, otherwise it will JIT-compile the inlined frame?
10:01 brrt yes, that's complex, and we'd have to find a way to have 'data restoration' aside from just frame restoration during deopt
10:02 jnthn Well, spesh knows where deopt boundaries are
10:02 jnthn So it can just factor that into it's analysis
10:02 jnthn I came up with a way to do that the other day
10:02 jnthn And now I seem to have forgotten it. tssk
10:02 brrt no, because the inliner wants too move the integer->object conversion to the frame instead of it being done by the return instruction
10:02 jnthn I'm sure it involved the dominator tree...
10:02 jnthn ah, yeah...
10:02 * brrt can't really help there
10:03 jnthn np :)
10:03 brrt i've got to go run errands :-)
10:03 brrt bbi3h
10:03 jnthn ok
10:03 jnthn o/
10:03 brrt left #moarvm
10:04 jnthn nwc10: OK, sadly it doesn't blow up under anything here.
10:04 jnthn (anything I have)
10:04 cognominal joined #moarvm
10:05 nwc10 jnthn: it's like this: http://paste.scsys.co.uk/407365
10:08 jnthn m: say 6400 / 8
10:08 camelia rakudo-moar 41574a: OUTPUT«800␤»
10:09 jnthn oh...
10:09 jnthn m: say 6400 / (8 * 4)
10:09 camelia rakudo-moar 41574a: OUTPUT«200␤»
10:17 nwc10 jnthn: try valgrind? http://paste.scsys.co.uk/407369
10:24 jnthn m: say 796 * 8
10:24 camelia rakudo-moar 41574a: OUTPUT«6368␤»
10:27 jnthn nwc10: Don't suppose you could try it with this patch: https://gist.github.com/jnthn/71d9084a495494f5bf2f
10:28 jnthn (and send me the output)
10:28 jnthn The data I get from it here doesn't add up to an overrun...
10:45 nwc10 from someone at work: https://pbs.twimg.com/media/BsEBVyPIYAEiFaQ.png - look, a scrollbar
10:46 jnthn lol
10:47 teodozjan joined #moarvm
10:48 timotimo :D
10:50 jnthn The other clue I have on this is that there are some cases where we leave the routine before OSR logging is completed.
10:51 jnthn Then it's meant to degrade to normal logging.
10:52 nwc10 I'm redoing it with fprintf(stderr, ...) to get the output in the right order
10:52 nwc10 OK, I thought that I was...
10:55 nwc10 http://paste.scsys.co.uk/407382
10:55 nwc10 logging at 796
10:55 nwc10 logging at 800
10:55 nwc10 ==24858== Invalid write of size 8
10:55 jnthn huh, the 800 never happens here o.O
10:55 nwc10 that's probably the important poart
10:55 nwc10 oh, curious
10:56 jnthn The highest I ever see is 796
10:56 nwc10 most strange
10:58 jnthn Things diverge after "logging at 796"
10:59 jnthn Seems your next entry is "OSR set up with 37 log slots"
10:59 jnthn Mine isn't that
11:00 jnthn I don't get the mass of 1s output either...what...
11:01 nwc10 yes, "what" ?
11:04 jnthn But...what in the script is meant to output those?
11:06 nwc10 say @b;
11:06 jnthn um...are we looking at the same script?
11:06 nwc10 that's in a block that was cut down from something longer in the original test
11:06 nwc10 oh
11:06 nwc10 I'm looking at the one in the URL on #perl6
11:06 jnthn There's no say @b in http://paste.scsys.co.uk/407344
11:07 nwc10 http://paste.scsys.co.uk/407345
11:07 nwc10 that was the update
11:07 jnthn oh...
11:07 jnthn I'd assumed you'd linked me the same two...
11:07 nwc10 no, sorry
11:12 jnthn I get the 1s out now, but still it diverges a bit later
11:21 jnthn nwc10: I still struggle to replicate it, but I did find an off-by-one: https://gist.github.com/jnthn/f2538f88a794a1ca4516
11:33 nwc10 still have an invalid write :-(
11:34 jnthn :/
11:56 jnthn nwc10: I'm betting https://gist.github.com/jnthn/90e65072fad8a978776f will fix it, but it's kinda a band-aid rather than hitting the root cause...
11:58 jnthn I think I mighta figured out the scenario where things go awry, though...
12:07 jnthn nwc10: https://gist.github.com/jnthn/206760395498553d4407 is latest
12:07 nwc10 OK, was going to finish the build & test of the previous
12:07 jnthn OK.
12:07 jnthn I need to eat :)
12:07 nwc10 this is a good plan.
12:07 jnthn So no hurry :)
12:08 nwc10 which reminds me to remind ilmari
12:08 jnthn Especially given the shop is an eating pre-req :)
12:11 cognominal joined #moarvm
12:22 jnap joined #moarvm
12:28 dalek MoarVM/moar-jit: 8d16619 | (Bart Wiegmans)++ | src/ (8 files):
12:28 dalek MoarVM/moar-jit: Simplify JIT reentry (and renamed the label value)
12:28 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/8d16619970
12:34 brrt joined #moarvm
12:39 * jnthn back
12:39 * brrt too
12:40 brrt i'm in need of sage advice again
12:40 brrt the perennial question
12:40 brrt 'now what'
12:40 jnthn Invocation and returning now works? :)
12:41 jnthn Including the non-spesh invoke?
12:42 brrt no, non-spesh invoke doesn't work yet
12:42 jnthn OK, that's probably a good target while invocation is swapped in to your brain :)
12:45 cognominal joined #moarvm
12:54 ggoebel111117 joined #moarvm
13:00 jnthn nwc10: Any results, or tied up with other things? :)
13:01 nwc10 ASAN clean
13:01 nwc10 building with ASAN to see what valgrind thinks
13:02 nwc10 that is, ASAN is clean on the "bodge" version, and your believed-actual-fix
13:02 jnthn ok :)
13:02 nwc10 has not fixed the other ASAN error (the 3 threads in the lock test)
13:03 * jnthn hunts the browser tab with that one
13:06 jnthn grr...can't find it :/
13:07 nwc10 can regenerate, with current line numbers
13:08 nwc10 ==30944== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 9 from 9)
13:08 jnthn ok, thanks
13:08 nwc10 PASS. Or Score!
13:08 jnthn \o/
13:08 nwc10 or whatever it is
13:09 nwc10 yes, \o/ I think is best
13:10 dalek MoarVM: 8b777f5 | jnthn++ | src/ (3 files):
13:10 dalek MoarVM: Fix OSR issues when we didn't reach finalize.
13:10 dalek MoarVM:
13:10 dalek MoarVM: Harden the logging increment check to make sure it never logs too
13:10 dalek MoarVM: much; this is more robust than the exit counter. If we are leaving
13:10 dalek MoarVM: an OSR'd frame without doing enough iterations, complete optimization
13:10 dalek MoarVM: anyway, since we know it's hot; this as a side-effect also avoids a
13:10 dalek MoarVM: number of potential races with bad behavior. nwc10++ for helping to
13:10 dalek MoarVM: track this one down.
13:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/8b777f5989
13:11 brrt brb :-)
14:12 ilbot3 joined #moarvm
14:12 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
14:12 jnthn nwc10: I'm pretty sure that'll nail it. :)
14:13 nwc10 # FUDGED!
14:13 nwc10 seems to. Will do full test
14:13 nwc10 (takes a bit longer than a MoarVM rebuild)
14:15 synopsebot joined #moarvm
14:18 lizmat so not time to bump MOAR_REVISION yet ?
14:26 brrt joined #moarvm
14:27 carlin joined #moarvm
14:37 nwc10 jnthn: yes. zero ASAN barf failures.
14:37 nwc10 t/spec/S06-advanced/wrap.rakudo.moar fails actual tests
14:43 btyler joined #moarvm
14:51 lizmat nwc10: that's a known one, and probably unrelated
14:58 jnthn Nice to be clean again. :)
14:59 lizmat I guess I'm gonna mark them as todo
14:59 [Coke] (please open a ticket for them, so I don't have to. :)
15:01 lizmat [Coke]: will do
15:03 nwc10 well, clean apart from that one
15:06 jnthn I meant ASAN-wise...
15:06 nwc10 yes, ASAN is barf-free
15:06 nwc10 jnthn++ # taming ASAN
15:09 [Coke] lizmat++
15:28 brrt much rejoice?
15:39 brrt ok, i'm seeing a sp_getspeshslot between prepargs and invoke
15:40 jnthn ohhh
15:40 jnthn uh, yeah, those can sneak it.
15:40 jnthn By spesh
15:40 jnthn *in
15:40 brrt hmm
15:40 brrt are they correct if they sneak in?
15:40 jnthn I *think* you can always pretend the thing happened before prepargs
15:40 jnthn Yes
15:41 jnthn It's done by the thingy that statically figures out what to call
15:41 jnthn Like, if it resolves a multi-dispatch
15:41 jnthn You'll typically find they come hand in hand with sp_fastinvoke
15:41 jnthn In theory we could try and make spesh shove them right before the prepargs...
15:42 brrt that would be ideal for my case
15:42 brrt where would i find the source for this?
15:42 jnthn optimize.c
15:42 brrt i supposed so
15:42 jnthn Of note, optimize_call
15:43 jnthn line 529 is the money shot, I guess
15:44 jnthn arg_info will also let you locate the prep_args
15:44 jnthn *prepargs
15:44 brrt ok, very nice
15:44 jnthn So you'll want something like MVM_spesh_manipulate_insert_ins(tc, bb, the_preparg_ins->prev, ss_ins);
15:45 brrt uhuh
15:46 brrt i'm checking it out :-)
15:46 brrt thanks :-)
15:54 FROGGS[mobile] joined #moarvm
16:00 dalek Heuristic branch merge: pushed 16 commits to MoarVM/moar-jit by bdw
16:00 brrt dalek++
16:05 brrt ok, dinner&
16:05 jnthn nom well :)
16:13 FROGGS joined #moarvm
16:22 cognominal joined #moarvm
17:25 [Coke] bdw?
17:32 jnthn [Coke]: ?
17:34 brrt joined #moarvm
17:34 brrt tnx
17:43 nwc10 jnthn: disable fixed size allocator and ASAN barfs on t/spec/integration/advent2010-day11.t
17:43 nwc10 http://paste.scsys.co.uk/407476
17:44 [Coke] 12:00 < dalek> Heuristic branch merge: pushed 16 commits to MoarVM/moar-jit by bdw
17:48 FROGGS [Coke]: that's brrt
17:48 brrt bdw is the name of my github account, yes
17:57 woolfy1 joined #moarvm
18:06 jnthn nwc10: If you set the env var MVM_SPESH_OSR_DISABLE, does it go away?
18:09 brrt moving sp_getspeshslot to before prepargs doesn't seem to cause any problems (as i expected it shouldn't :-))
18:11 brrt hmm
18:11 jnthn yeah, I'd have been very surprised if it did.
18:12 brrt i do get an error building rakudo, but that may be unconnected
18:16 FROGGS brrt: what error?
18:16 brrt let me see until it makes the error
18:17 brrt Error while compiling op cleardispatcher: No registered operation handler for 'cleardispatcher'
18:17 brrt FROGGS: is this a known error?
18:18 FROGGS brrt: this was added to nqp four days ago
18:18 FROGGS brrt: looks like you just need to pull and build nqp and rakudo again
18:28 nwc10 jnthn: MVM_SPESH_OSR_DISABLE=1 and it still bargs
18:28 nwc10 barfs
18:28 brrt seems so
18:28 brrt (wrt to the nqp install)
18:29 brrt (yay, JIT compiles no fewer than 326 fragments in the nqp compilation process)
18:29 timotimo hey, that's pretty good
18:30 timotimo do you have any data on how long these fragments end up being?
18:30 brrt not yet, should check the log
18:30 timotimo sounds very good, in any case :)
18:31 brrt yes, and apparantly, all fragments work, too
18:31 jnthn nwc10: Hm, OK. And, separately, MVM_SPESH_INLINE_DISABLE=1?
18:31 nwc10 pass
18:32 jnthn Aha.
18:32 brrt 249 bits in rakudo now
18:32 * brrt expects that will be a greater number once invoke proper works
18:32 jnthn Still doesn't help me guess what's up, though...
18:32 jnthn OSR woulda narrowed it more.
18:33 timotimo d'aaw, the kitteh just let me pet 'is belly :3
18:34 dalek MoarVM/moar-jit: 66a7d29 | (Bart Wiegmans)++ | src/spesh/optimize.c:
18:34 dalek MoarVM/moar-jit: Move sp_getspeshslot before prepargs in optimize_call
18:34 dalek MoarVM/moar-jit:
18:34 dalek MoarVM/moar-jit: The optimizer sometimes inserts sp_getspeshslot node between
18:34 dalek MoarVM/moar-jit: the args instructions and the invoke instruction, which is
18:34 dalek MoarVM/moar-jit: annoying as it confuses the JIT, which likes to treat the
18:34 dalek MoarVM/moar-jit: sequence between prepargs and invoke as a single node.
18:34 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/66a7d2972e
18:37 timotimo brrt: afair our regex parsing code would end up not getting jitted at all because it'd invoke so many times, right?
18:39 brrt ehm... i'm not sure i parse that correctly, but if it is called many times then i expect it to be jitted (eventually)
18:39 timotimo i meant the other way around :)
18:39 * jnthn was confused too :)
18:39 timotimo regexes use invocations a bunch of times, in my recollection
18:39 jnthn I'm confused which bit was meant to be the other way around :P
18:40 timotimo but also there's a whole bunch of opcodes you probably didn't even look at yet, like "iscclass" and "findcclass" and the uniprop codes
18:40 timotimo though these could all be handled with C function calls i believe
18:40 brrt well, right
18:40 jnthn I think that regexes won't be getting JITted yet 'cus of...yes, all those.
18:40 brrt there is still plenty to do
18:41 timotimo if you give me a short template i could copypaste and tell me how to build and test my changes, maybe i can help with that at some point ...
18:42 brrt hmmm
18:42 brrt that is a really good idea
18:43 timotimo if you write that as a guide rather than as a conversation with me, it'd benefit more people and my laziness wouldn't be so terrible :)
18:43 brrt that is an even better idea
18:43 timotimo going to commute around a bit now
18:44 brrt see you
18:51 dalek MoarVM/moar-jit: a36616c | (Bart Wiegmans)++ | / (6 files):
18:51 dalek MoarVM/moar-jit: Add fast invoke flag to JIT invoke node
18:51 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/a36616cfb4
19:00 btyler_ joined #moarvm
19:14 brrt ok, invoke seems to work
19:15 jnthn \o/
19:15 jnthn brrt++
19:15 FROGGS O.o
19:15 FROGGS \o/
19:15 rurban brrt++
19:16 dalek MoarVM/moar-jit: b672fa1 | (Bart Wiegmans)++ | src/jit/emit_ (3 files):
19:16 dalek MoarVM/moar-jit: Add support for 'proper' invoke calls
19:16 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/b672fa1b72
19:16 brrt please try it out :-) (and let me know if i'm wrong)
19:17 brrt anyway, i'm off for tonight :-)
19:17 brrt left #moarvm
19:23 dalek MoarVM: bc4bb42 | jnthn++ | src/spesh/facts. (2 files):
19:23 dalek MoarVM: Cope with cross-deopt-point usage analysis.
19:23 dalek MoarVM:
19:23 dalek MoarVM: If a register gets used after a deopt point, give its usage an extra
19:23 dalek MoarVM: bump. This means we won't kill a write to it when doing dead code
19:23 dalek MoarVM: elimination. Even if we don't actually read it later in the optimized
19:23 dalek MoarVM: code, we still need things set up right for if we deopt. This extra
19:23 dalek MoarVM: care will allow us to be a little more aggresive in decrementing usage
19:23 dalek MoarVM: in various other situations.
19:23 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/bc4bb42888
19:33 jnthn walk; bbiab
19:36 moritz jnthn: it seems like you're having great fun hacking on moarvm
19:37 FROGGS moritz: at least he can show his skills :o)
19:48 timotimo suh-weet!
20:20 hoelzro hup holland hup
20:23 jnthn Don't think this'll be another 7-1 :)
20:23 jnthn moritz: Yes, it's fun, though certain categories of bug are quite a pain to hunt.
20:24 hoelzro jnthn: I hope not
20:29 nwc10 All tests successful.
20:29 nwc10 Files=903, Tests=31840, 566 wallclock secs (16.60 usr  4.54 sys + 10375.63 cusr 510.58 csys = 10907.35 CPU)
20:29 nwc10 Result: PASS
20:29 nwc10 jnthn: ^^^
20:29 nwc10 (that's master/master/nom, back to the usual fixed sized allocator)
20:30 nwc10 haven't had PASS in ages
20:30 nwc10 jnthn++
20:30 jnthn nice :)
20:30 nwc10 "We have normality. I repeat, we have normality. Anything you still can't cope with is therefore your own problem."
20:31 jnthn Time to write more optimizations :P
20:31 nwc10 :-
20:31 nwc10 )
20:35 teodozjan joined #moarvm
20:40 FROGGS *g*
20:44 jnthn I'm not kidding, I'm working on two of them :P
20:45 FROGGS meh
20:45 FROGGS :P
20:46 jnthn I think I mighta finally got lex2loc branch clean...
20:46 FROGGS ohh, I guess that feels good :o)
20:46 FROGGS I am hacking on v5 to gain some motivation
20:51 itz__ joined #moarvm
20:54 itz__ does bdw use irc?
20:54 jnthn Yes, he's brrt here
20:55 jnthn Though gone for the day, probably watching the foottie... :)
20:55 itz__ ah :)
20:55 brrt joined #moarvm
20:55 brrt itz__: o/
20:56 brrt and yes, was watching, but its' commercial break
20:56 itz__ brrt: pull request to fix a simple typo .. two chars wrong way around
20:56 FROGGS here: https://github.com/MoarVM/MoarVM/pull/112
20:57 brrt oh, thanks for that
20:57 jnthn Nice to know folks are following the commits :)
20:57 brrt i'll pull it
20:57 dalek MoarVM/moar-jit: 22678c6 | (Steve Mynott)++ | src/jit/stub.c:
20:57 dalek MoarVM/moar-jit: fix typo
20:57 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/22678c6166
20:57 dalek MoarVM/moar-jit: ca998ba | (Bart Wiegmans)++ | src/jit/stub.c:
20:58 dalek MoarVM/moar-jit: Merge pull request #112 from stmuk/moar-jit
20:58 dalek MoarVM/moar-jit:
20:58 dalek MoarVM/moar-jit: fix typo
20:58 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/ca998ba2ce
20:58 itz__ ty
20:58 brrt no, thank you :-)
20:59 brrt also, if you want to try the actual jit compiler, you should configure with --enable-jit :-)
21:01 itz__ ah :)
21:02 teodozjan joined #moarvm
21:05 brrt (soccer again :-))
21:55 brrt left #moarvm
22:32 jnap joined #moarvm
22:53 dalek joined #moarvm
23:13 dalek MoarVM/set-removal: 61ce13a | jnthn++ | src/spesh/optimize.c:
23:13 dalek MoarVM/set-removal: First pass at removing unrequried set ops.
23:13 dalek MoarVM/set-removal:
23:13 dalek MoarVM/set-removal: This makes it all the way through the NQP build and test suite, all
23:13 dalek MoarVM/set-removal: the way through the Rakudo build...then somehow manages to cause a
23:13 dalek MoarVM/set-removal: bunch of Rakudo sanity tests to fail.
23:13 dalek MoarVM/set-removal: review: https://github.com/MoarVM/MoarVM/commit/61ce13ae69
23:15 * japhb wonders how something can cleanly build the setting and fail large portions of sanity ....
23:18 jnthn I really have no idea!
23:18 jnthn And it's 1:20am so I'm not planning to find out right now :)
23:18 japhb Heh
23:19 japhb Sleep well.  :-)

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary