Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-06-25

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

All times shown according to UTC.

Time Nick Message
01:09 FROGGS_ joined #moarvm
01:09 jnap joined #moarvm
02:02 vendethiel joined #moarvm
02:10 xiaomiao joined #moarvm
02:59 colomon joined #moarvm
03:19 woosley joined #moarvm
03:34 woosley joined #moarvm
06:49 brrt joined #moarvm
06:53 zakharyas joined #moarvm
06:55 brrt \o #moarvm
06:55 brrt i was planning to get at deopt today
06:56 brrt i just wonder
06:56 brrt how to test it
07:10 lizmat joined #moarvm
07:24 woolfy joined #moarvm
08:21 timotimo throw a role onto something? :)
08:28 brrt joined #moarvm
08:43 brrt hmm
08:43 brrt i might
08:49 timotimo i hope that actually does it
08:50 moritz the question is: what's optimized that might need a deopt?
08:50 timotimo anything that does an invocation will give a deopt point and i think we just deopt a whole bunch as soon as we see such a change
08:54 jnthn Well, that'll be a deopt_all if you mix in
08:55 jnthn A deoptone is less usual, though we hit a bunch of them when building NQP
08:55 jnthn One way is to have an attribute that contains something of a certain type, look it up in some code you call again and again so it ends up guarding against it, maybe call a method on the thing you looked up to make sure the guard gets used for something.
08:55 jnthn And then change the attribute to somehting of a different type and do another invocation.
08:56 jnthn Thing is, I don't think the JIT does attribute lookup stuff yet...which get turned into the various p6oget ops. And only an object attribute is interesting.
08:56 jnthn Return values from things we call are also guarded.
08:56 jnthn But I don't know the JIT does invocation yet
08:57 jnthn getlex of an object may do it
08:57 jnthn so not sure anything that uses guard clauses yet will JIT compile due to it also using another NYI thing.
09:18 brrt JIT doesn't do invocation, no
09:18 brrt not yet
09:19 brrt hmmkay
09:22 jnthn yeah, so may be some other things to do first
09:22 * jnthn suggests attribute binding and looking with the sp_p6o* ops
09:23 brrt yes, i agree
09:23 brrt also bindlex / getlex
09:23 brrt oh i have a question about that, or rather had, and am now trying to renember what it was
09:25 jnthn ok
09:25 jnthn lunch, but bbiab
09:27 * brrt is going to have lunch in a bi too
09:45 vendethiel joined #moarvm
10:02 vendethiel- joined #moarvm
10:12 * jnthn hopes brrt enjoys lunch in a bi... :
10:13 jnthn :)
10:19 nwc10 jnthn: ./perl6-m t/spec/S17-promise/allof.t goes SEGV on ASAN with *and without* spesh
10:20 jnthn I'd tend to expect concurrency related failures to be fairly independent of that
10:20 nwc10 not really in a positionto dig further
10:20 jnthn They're hard to debug, though, and I've not had undistracted chunks of time to look yet.
10:21 jnthn May have some time tomorrow. But in practice...I'm kinda ill :(
10:21 jnthn And 10 hours of sleep last night didn't fix it.
10:34 nwc10 :-(
10:34 nwc10 this3G is pants
10:35 nwc10 #0 0x7f8da51fe111 in MVM_fixed_size_alloc src/core/fixedsizealloc.c:121
10:35 nwc10 #1 0x7f8da51fe211 in MVM_fixed_size_alloc_zeroed src/core/fixedsizealloc.c:144    #2 0x7f8da5189c80 in allocate_frame src/core/frame.c:201
10:35 nwc10 #3 0x7f8da518b221 in MVM_frame_invoke src/core/frame.c:344
10:35 nwc10 #4 0x7f8da52794f8 in invoke_handler src/6model/reprs/MVMCode.c:10
10:37 brrt joined #moarvm
10:46 brrt left #moarvm
10:46 brrt joined #moarvm
10:49 brrt jnthn, here?
10:51 vendethiel joined #moarvm
10:54 brrt did you know that register offsets in x86 memory access may be 32 bits wide?
11:01 brrt i'm opening yet another page to understand the redirection involved in sp_p6oget_o :-)
11:02 brrt bbiab
11:02 vendethiel- joined #moarvm
11:24 brrt joined #moarvm
11:25 brrt left #moarvm
11:32 jnthn nwc10: Oh wow, that is interesting place to explode...
11:34 jnthn nwc10: Do you have the ASAN output describing the problem handy?
11:34 jnthn I'm wondering if it's some kind of freelist corruption...
11:34 jnthn (e.g. the fle->next)
12:02 brrt joined #moarvm
12:03 brrt hmm... so at least sp_p6oget_o compiles
12:03 brrt oh, isn't correct yet
12:04 timotimo do we have a good plan yet to make rakudo itself more inline-friendly?
12:04 timotimo i seem to recall it's about having handlers everywhere
12:04 timotimo i think at one point we said "handlers are ridiculously cheap on moarvm"
12:04 timotimo if that was the case back then, now it's different :)
12:05 colomon joined #moarvm
12:06 brrt why aren't handlers cheap?
12:07 timotimo because (iiuc) they prevent inlining from happening
12:07 brrt i have not enough rakudo-knowledge to consider that
12:07 brrt ooh...
12:07 brrt hmmmm
12:08 timotimo ISTR it's about every sub having a handler for "return"
12:08 timotimo though i think there's a method somewhere called "is_clearly_returnless"
12:08 timotimo maybe in that case we could just not emit the handler? i don't know.
12:08 jnthn timotimo: It's not horribly difficult to merge handler tables for inlining.
12:08 jnthn timotimo: It's just some work that I didn't get around to yet.
12:08 timotimo oh!
12:08 timotimo well, fair enough :)
12:09 jnthn Same with extops.
12:09 jnthn The inline branch was "make the basic inlining and deopt work", not "do everything imaginable" :)
12:09 timotimo fair enough
12:09 jnap joined #moarvm
12:09 jnthn Better to merge branches early provided they don't actually regress stuff knowingly, and get the feedback :
12:10 timotimo what's your plan with extops, btw? is there some way to have multiple "tables" of extops so we can just use the tables from other SC's or so?
12:10 jnthn Also, I'm so getting a repair person out for this laptop...to fix my  key.
12:10 timotimo or do we have to merge them and change the numbers for the extops to match up again?
12:10 jnthn ) key...how ironic.
12:10 timotimo temporarily map printscrn to ) or something? :)
12:10 jnthn Not sure quite how I'll do it yet...
12:12 jnthn moar teaching &
12:12 brrt see you
12:14 brrt left #moarvm
12:14 brrt joined #moarvm
12:15 brrt ugh, empathy doesn't increase font size with the 'big text' button
12:15 brrt oh, does after restart
12:16 brrt (between 3 and 5 levels of indirection for the 'fast path' of sp_p6oget_o. o.O)
12:17 timotimo and those indirections are all going to stay in the jitted version?
12:17 brrt yes
12:17 timotimo well, it'd appear that'd be necessary
12:17 brrt hmmm
12:17 brrt some of these may change
12:18 jnthn 5? :)
12:18 brrt yes
12:18 brrt let me see if i count that right
12:18 brrt in the good case, we'd be able to reduce that to 2
12:19 brrt i think
12:19 brrt but in the bad case, the data of the object has been replaced with something, and is then null and should be replaced with vmnull
12:19 brrt that is where that comes from
12:20 jnthn yeah, 5 if you hit all the slow paths
12:20 jnthn I think just JIT the whole thing, though
12:20 * brrt can count the mov instructions
12:20 jnthn :)
12:20 brrt of which two are necessay load-stores from mvm registers
12:20 brrt or at least somewhat-necessary
12:21 jnthn *nod*
12:23 FROGGS_ brrt's Jnthn Nod Rate® is outstanding, just wanna mention it
12:23 brrt the JNR :-P
12:24 FROGGS_ :o)
12:24 FROGGS_ I'm like below .1% :o)
12:24 brrt but what does it signify?
12:24 dalek MoarVM/moar-jit: 5532c65 | (Bart Wiegmans)++ | src/ (5 files):
12:24 dalek MoarVM/moar-jit: Add support for direct reading of p6opaque fields
12:24 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/5532c65182
12:28 brrt what is the difference between sp_p6ogetvt_o and sp_p6ogetvc_o and sp_p6ogetvc_o
12:30 timotimo are the last two actually different at all?
12:31 brrt i.. think they are
12:31 brrt yes they are
12:31 timotimo :P
12:32 brrt the latter version clones
12:39 * brrt wonders about bbq-ing this evening
12:45 timotimo please don't bbq the evening
12:51 brrt dutch grammar english mistake :-)
12:51 brrt weathermen said it'd be good enough, but i doubt it
12:51 brrt the weather that is
12:52 timotimo :3
13:00 brrt (jit compiling the write barrier is a bit of a pain, but doable)
13:01 * TimToady theorizes that jnthn++ hits the ) harder because he's closing out parenthesized expressions with great satisfaction
13:06 * TimToady also wonders whether brrt's lunch fit him to a t
13:06 brrt my lunch? was fine, thank you :-)
13:07 brrt i was rather starved due to no breakfast
13:10 * brrt bbiab
13:12 colomon joined #moarvm
13:13 jnthn vt = vivify with type object, vc = vivify with concrete object (and thus clone it)
13:14 jnthn mmm...crispy bbq evening
13:31 TimToady well, you had lunch in a bi, and thought you might pick up a t along the way
13:32 TimToady oh, he's no here
13:32 brrt joined #moarvm
13:32 TimToady oh, yes, he is here :)
13:33 TimToady de-elevating &
13:33 brrt haha ok
13:37 carlin joined #moarvm
13:42 jnthn Note that vt often shows up in NQP code where has $!x will be NQPMu by default, and vc in Rakudo where $!foo will be a Scalar by default and thus we need a distinct Scalar.
14:01 btyler joined #moarvm
14:03 carlin joined #moarvm
14:04 brrt oh, ok
14:04 brrt thats ok i guess
14:17 brrt back in segfault land
14:24 cognominal joined #moarvm
14:31 brrt r8, y r u 0
14:33 carlin_ joined #moarvm
14:34 timotimo dat's deep, bru
14:41 brrt (r8 is a register which aint shoudln't be 0)
14:41 timotimo yeah, i thought as much
14:46 brrt what does the 'owner' field in the MVMObject header represent?
14:46 brrt better question
14:47 timotimo which thread it belongs to?
14:47 timotimo hm, not actually sure
14:52 brrt think 7452384 is a reasonable value for it?
14:52 brrt is 0 a reasonable value for st?
14:54 brrt i don't suppose it really is, is it?
14:55 timotimo stables should be set, shouldn't they?
14:56 brrt well, i have something that really should be an object, and has a zero st
15:00 * brrt is unhappy
15:19 vendethiel joined #moarvm
15:26 brrt the fact that integer division without octoword conversion causes an exception is really useful for debugging
15:43 jnthn brother: owner should probably be 1 always in a single-threaded program. And st should certainly not be NULL.
15:43 jnthn uh, brrt
16:22 brrt joined #moarvm
17:03 zakharyas joined #moarvm
17:22 brrt joined #moarvm
17:57 brrt ... that was.. involved
17:57 brrt but it seems that sp_p6obind_o works
17:59 FROGGS_ brrt++
17:59 brrt don't take my word for it :-)
18:00 FROGGS_ I just want to cheer you up :o)
18:06 brrt :-) thanks
18:06 brrt i'm also cheered up by the fact that it works
18:07 timotimo that's cool! :)
18:11 dalek MoarVM/moar-jit: f3423ac | (Bart Wiegmans)++ | src/ (5 files):
18:11 dalek MoarVM/moar-jit: Implement spesh p6opaque bind ops
18:11 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/f3423acdfa
18:13 btyler joined #moarvm
18:16 brrt jnthn :-) thanks
18:16 brrt i'm off for a few minutes :-) (or an evening, don't know yet)
18:17 brrt left #moarvm
18:40 vendethiel- joined #moarvm
18:56 jnap joined #moarvm
19:24 brrt joined #moarvm
19:26 ingy joined #moarvm
19:26 brrt joined #moarvm
19:28 brrt jnthn here?
19:40 timotimo got  something  to  report? 😊
19:41 * jnthn back
19:43 jnthn brrt: Question? :)
19:44 brrt oh, ehm....... yes, i had a question, but i'm not sure what
19:44 brrt (that only happens always)
19:45 brrt ok, have you (perchance) seen that i've added support for sp_p6obind_*
19:45 brrt i'm wondering what to do tomorrow
19:46 brrt i can continue adding ops fine, but which?
19:47 brrt i also want to start cleaning stuff up / moving it about
19:47 brrt i.e graph creation to jit/graph.c or something, compilation to jit/compile.c
19:51 jnthn Well, the funky sp_p6oget_ object ones that vivify would complete that "set"
19:52 jnthn Generally, though, one idea could be to start logging which unavailable ops cause JIT bailout.
19:52 jnthn And then hack a script that ranks them.
19:52 brrt oh, i know that already
19:52 jnthn And that'll tell you what the top blockers are.
19:53 brrt i don't have that, no :-)
19:53 brrt thats a good idea
19:53 brrt i think wval is a big blocker
19:54 jnthn Yeah
19:54 brrt ok, script to read jit log, thats a good idea
19:54 jnthn In the best case, the wval is in gen2 and you can just directly use the memory address of it
19:54 jnthn In the less good case you'll need to do the lookup
19:55 jnthn In fact, I'd factor that out
19:55 brrt hmmm, make it a call?
19:55 brrt (c function call)
19:55 jnthn Works for me
19:55 lizmat joined #moarvm
19:55 brrt yes, i suppose for me too :-)
19:55 jnthn If you do, move the wval impl in interp.c to use that func too
19:56 jnthn There's also wval_wide or so
19:56 jnthn Which I guess won't JIT any different really
19:56 jnthn Just for bytecode space efficiency
19:56 brrt where should i put the 'wval function' anyway?
19:56 jnthn sc.c
19:56 brrt oh, yes
19:57 jnthn I think that you may want a general thing in the JIT like
19:57 jnthn try_emit_gen2_ref(...)
19:57 brrt hmmm
19:57 jnthn That checks if the object you pass it is in gen2, and if it is JITs a direct static access
19:57 jnthn And returns true
19:57 jnthn And if not, returns false
19:58 jnthn Then wval, and sp_getspeshslot, and const_s, and getcode, and probably some things things can all use it
19:58 brrt i see what you mean
19:58 jnthn Of course, the slow path for them is different, but may as well factor out the fast path :)
19:58 jnthn Which will occur very often.
19:58 * brrt agreed
20:04 jnthn Of course, the really big thing to attack still - or one of at least - is invocation.
20:04 jnthn And with it, JITted code retruning to JITted code, and non-JITted returning to JITted, etc.
20:05 jnthn If you'd rather spend this week hammering out a bunch more of the basic ops, that's fine by me.
20:05 jnthn But I don't think we should put invocation off too much further (as in, could be good to be digging into it next week)
20:07 brrt i agree as well
20:09 LLamaRider joined #moarvm
20:17 jnthn Some of the basic objecty ones could be good also
20:17 timotimo objecty, as in fastcreate?
20:18 jnthn sp_fastcreate, yeah... As well as the usual create ones, box/unbox...
20:37 timotimo joined #moarvm
20:38 brrt hmmm yeah
20:38 brrt (ugh, why is string acquiring so involved?)
20:39 timotimo ;(
20:40 * brrt is wondering about the balance of 'make it a function' and 'jit it'
20:41 brrt enough for today :-)
20:41 brrt see you tomorow
20:45 vendethiel joined #moarvm
20:48 vendethiel joined #moarvm
21:02 * jnthn watches drunk swedes on bicycles driving not-quite-straight up the road in front of the hotel singing "sweet home, sweet chariot"... WAT. :)
21:02 FROGGS_ *g*
21:05 timotimo what is the corresponding DWIM, jnthn? :)
21:12 jnthn I...hate to imagine :P
21:13 tadzik drunk swedes? :o
21:14 timotimo they ... they do that?
21:16 jnthn I'm pretty sure the DWIM is *not* the guy with a trumpet he can't really play staggering up the street tooting it... :)
21:16 jnthn tadzik: While the cost may seem prohibitive, it does indeed happen. :)
21:56 cognominal joined #moarvm
22:06 btyler_ joined #moarvm
22:15 lizmat joined #moarvm
22:40 lizmat joined #moarvm
23:02 [Coke] brrt++
23:32 btyler joined #moarvm

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