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