github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:13 MasterDuke left, MasterDuke joined 03:26 MasterDuke left 03:27 kawaii left 03:30 kawaii joined 08:10 domidumont joined 08:28 MasterDuke joined 08:35 patrickb joined 08:59 zakharyas joined
nwc10 good *, #moarvm 09:33
jnthn o/ 10:08
nwc10 \o 10:09
11:11 kawaii left, kawaii joined 11:15 MasterDuke left 11:17 MasterDuke joined 12:09 kawaii left 12:10 kawaii joined 12:21 zakharyas left 12:43 sena_kun joined 13:28 zakharyas joined 14:38 patrickb left 14:40 patrickb joined 14:46 patrickb left 14:54 domidumont left 15:18 patrickb joined 15:48 MasterDuke left 15:49 MasterDuke joined 17:16 domidumont joined 17:17 patrickb left 19:00 domidumont left 19:07 zakharyas left 19:14 patrickb joined 19:21 MasterDuke left 19:39 domidumont joined 19:44 domidumont left 19:57 MasterDuke joined
nine quiet day it seems 20:23
MasterDuke i've been distracted from debugging remove_spesh_candidate by --profile-compiling the rakudo build 20:26
don't think there's anything particularly new or exciting though in the output though 20:27
nine so at least no negative surprise 20:28
MasterDuke don't think so 20:29
lots of complaints in a spesh log about missing templates for (bind|get)attrs?_(i|n|s|o) github.com/MoarVM/MoarVM/blob/mast...1985-L2172 any reason they couldn't be templated? 20:35
jnthn has a sore arm (trapped nerve, happens now and then), so hasn't had the most productive of days...
nine jnthn: ouch
jnthn Though it's less bad now than it was in the morning, so hopefully it clears up soon.
nwc10 this is good. And my (sorry rather) flippant comment is "But with the new coffee machine, as it's push button, you don't even have to pump your beverage" 20:36
nine MasterDuke: the reason we don't do that is because those ought to be optimized to spesh variants (which then are JITed)
MasterDuke: so for the best result we should figure out why they aren't
jnthn nwc10: It's certainly lower effort than what it replaced, yes 20:37
It eats the ground coffee rather faster, however. On the upside, that means I'll be feeding it beans soon...
MasterDuke i see a bunch of `JIT: not devirtualized (type unknown)` near bindattr_os in the spesh log 20:38
jnthn And then it's even less effort (the ground type has to be put in per cup, the beans it can probably hold enough for a week or more)
MasterDuke that message is the `else` of this `if` github.com/MoarVM/MoarVM/blob/mast...#L886-L887 20:42
jnthn MasterDuke: What are the facts on the invocant? 20:43
MasterDuke jnthn: is the invocant the first r123(4) thing right after the op name in the log? 20:44
jnthn Yes 20:45
For bindattr, anyway
For getattr the second thing 20:46
('cus the first is the result register)
MasterDuke `r127(2): usages=1, flags=0`
jnthn Oh. So it knows nothing about its type 20:48
MasterDuke `getattr_oĀ Ā Ā Ā Ā Ā Ā  r129(2),Ā  r127(2),Ā  r128(2), lits($!dispatch_cache), liti16(13)Ā  # [261] JIT: not devirtualized (type unknown)` is the gettattr_o i was just looking at. i see `$!dispatch_cache` in there, is this going to change with new-disp?
jnthn Ye
*yes
MasterDuke oh, nm, i see lots of other things referenced too
jnthn But "type unknown" is the case there too
The $!dispatch_cache attr will go away 20:49
MasterDuke lots of $bstack, $cstack, @!named_names, $!type, @!post_constraints, etc 20:50
jnthn Hm, the first two are a bit annoying, since they could be quite hot in the regex engine 20:51
MasterDuke `r51(11): usages=1, deopt=71, flags=0` for one of the $bstack ones
`r9(12): usages=1, deopt=22, flags=0` for a $cstack 20:52
jnthn Yeah, means it knows pretty much nothing about them 20:53
There's many potential reasons, including being in a branch that was never taken, so there's no type stats recorded
Though if that's the case then it's also not a very important miss 20:54
MasterDuke any way to find important misses?
jnthn Hm, not sure. I mean, one can try and match up the instructions to the HLL code and see if it looks reasonable that it'd not be executed much 20:55
Can also see if you can trace back where that value comes from 20:56
That is, which instruction writes the register
MasterDuke github.com/Raku/nqp/blob/master/sr...#L422-L447 20:58
$!shared, $!braid, $!regexsub, $!restart, $!from, $!pos, $!to, $!cstack, $!bstack all get some `JIT: not devirtualized (type unknown)` for bindattr_o, bindattr_i, getattr_o, etc 21:03
21:04 zakharyas joined
jnthn Can you find the instruction that goes with: 21:04
my $new := nqp::create(self);
MasterDuke !cursor_start is called 397,825 times, but it is 99.9% jit according to moarperf
jnthn What are the facts on both the result and the type?
MasterDuke `createĀ Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  r1(2),Ā Ā  r3(2)` 21:05
jnthn I think the message didn't say JIT failed, so much as expr JIT failed?
MasterDuke `r1(2): usages=14, deopt=37,36,35,34,33,32,31,29,28,27,25,24,22,21,20,19,18,17,16,14,13,12,10,11,6,5,4,3,1, flags=8Ā Ā Ā Ā  Concr`
`r3(2): usages=1, deopt=0, flags=0` 21:06
jnthn Hmmm, so it doesn't know the type of self. Does it say if it's a certain specialization or an observed type specialization?
I guess it may have specialized it in a bunch of ways and then decided there were too many and gone for a generic one
MasterDuke Certain specialization of '!cursor_start' (cuid: 82, file: gen/moar/stage2/QRegex.nqp:1485) 21:07
The specialization is for the callsite:
jnthn Aha, that explains it
MasterDuke Callsite 0x7f3afd04a840 (1 args, 1 pos)
Positional flags: obj
It was planned due to the callsite receiving 572 hits.
The maximum stack depth is 102.
jnthn Hm, can you trace back to the stats before it? Did it think it was too morphic? 21:08
(Stats it used should be just before the plan)
well, the list of plans
I guess the other thing to look back and check is if it did other specializations in the past 21:09
I guess there can be quite a few types of cursor (main language, regex language, various quote languages)
MasterDuke i don't see the word morphic 21:10
there are 4 type tuples
jnthn oh, it won't appear; I mean are there lots of type tuples that are about balanced in appearance, or one that dominates, or? 21:11
MasterDuke Hits: 227, Hits: 15, Hits: 91, Hits: 172, Hits: 69 21:12
oh, 0-based counting. there are 5 type tuples
jnthn Hm, yeah, quite distributed
There's a percentage threshold somewhere (I think it's 25%) that controls if it considers something worth a specialization
gotta afk a bit 21:13
MasterDuke hm, so if spesh is legitimately not able to do anything with these, does that make creating templates worthwhile? 21:15
21:16 patrickb left 21:47 zakharyas left 23:03 MasterDuke left
jnthn Well, it's the same trade-off either way: do we want to use more memory for more speed? 23:29
We can pick a lower percentage for "worthwhile". We could also make it conditional on absolute number of hits. 23:30
Although in this case we aren't seeing them be much over the baseline threshold, iirc