github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:44 squashable6 left 00:46 squashable6 joined 00:47 squashable6 left 00:50 squashable6 joined 00:54 Altai-man_ joined 00:56 sena_kun left 02:55 sena_kun joined 02:56 Altai-man_ left 04:53 committable6 left, nativecallable6 left, quotable6 left, coverable6 left, unicodable6 left, squashable6 left, bloatable6 left, sourceable6 left, linkable6 left, tellable6 left, notable6_ left, greppable6 left, statisfiable6 left, reportable6 left, evalable6 left, shareable6 left, releasable6 left, bisectable6 left, evalable6 joined, bloatable6 joined, linkable6 joined, shareable6 joined 04:54 reportable6 joined, committable6 joined, tellable6 joined, Altai-man_ joined, statisfiable6 joined 04:55 nativecallable6 joined, squashable6 joined, bisectable6 joined, greppable6 joined, releasable6 joined 04:56 unicodable6 joined, quotable6 joined, notable6 joined, coverable6 joined, sourceable6 joined, sena_kun left
nwc10 good *, #moarvm 06:36
06:55 sena_kun joined 06:57 Altai-man_ left 07:29 zakharyas joined 07:30 zakharyas left, zakharyas joined 08:39 leont_ joined, leont joined 08:54 Altai-man_ joined 08:56 sena_kun left
jnthn good * o/ 09:19
Altai-man_ o/ 09:20
While it's a nice morning, are there any known MoarVM blockers I should know about? 09:21
jnthn Not that I'm aware of. Pretty much everything I've been doing is off in a branch anyway
nwc10 \o 09:22
10:44 zakharyas left 10:55 sena_kun joined 10:57 Altai-man_ left
jnthn So, where was I with the flattening dispatch stuff... 12:19
Apparently mis-reading output and thinking something didn't work, that does work... 12:21
Oh, or not
nwc10 work coffee or home coffee today?
moritz I don't know, but it sounds very flattening :D 12:22
jnthn Home coffee :) 12:29
Though work coffee soon will gain a new attraction... 12:30
Getting a proper fitting in place for the air conditioning exhaust tomorrow.
Meaning that it should work much better.
It was an off-by-one. It's always an off-by-one... 12:31
Geth MoarVM/new-disp: 89eeb9725b | (Jonathan Worthington)++ | src/core/callsite.c
Fix thinkos in callsite interning
12:33
MoarVM/new-disp: df29f4a881 | (Jonathan Worthington)++ | src/disp/inline_cache.c
Implement monomorphic flattening dispatch

That is, check if the flattening results in the same shape always, and if so, just run the dispatch program that goes with that shape.
12:34 zakharyas joined 12:54 Altai-man_ joined 12:57 sena_kun left
nwc10 still All tests successful 13:07
jnthn: what was supposed to change in test outout? 13:10
jnthn Nothing in the NQP test; I've got a Rakudo one-liner I'm using to exercise this stuff for now, though surely there's spectests it'll hit too 13:11
At least, I'd hope that we have spectests for private method dispatch and qualified method dispatch that do flattening. 13:12
13:12 vrurg left, vrurg joined
Geth MoarVM/new-disp: 15e4f9f96b | (Jonathan Worthington)++ | 3 files
Do first-level polymorphic flattening dispatch

Also, fix a memory leak spotted in non-flattening polymorphic to polymorphic transitions.
13:14
MoarVM/new-disp: 0026a066e9 | (Jonathan Worthington)++ | src/disp/inline_cache.c
Complete polymorphic flattening dispatch handling

At least, for now. We'll have to go a step further once we get to the point of doing something smarter in the megamorphic case.
13:24
jnthn And I guess that's flattening done. 13:25
And the callsite interning improvements
jnthn looks at the todo list 13:27
So, next is "Teach spesh about dispatch and get it to do the rewrite of a dispatch instruction into guards + linking or inlining." 13:28
nwc10 are you sure that's right? Isn't "drink tea" next? 13:29
jnthn Hm, that's a good idea...
nine Speshing dispatch? Sounds like a minuscule item, hardly worth mentioning... 13:30
13:31 lucasb joined
jnthn How hard could it be? 13:33
nine Not much harder than in-process precompilation :P
jnthn Hopefully easier... :) 13:36
At least I in theory know how to do this.
nwc10 jnthn: create an issue; assign it to nine or brrt; step away from the keyboard? :-) 13:39
Geth MoarVM/new-disp: 08dcf55427 | (Jonathan Worthington)++ | src/disp/inline_cache.c
Add missing inline cache GC marking
13:42
jnthn But then nine++ might make *me* a ticket about precompilation ;) 13:44
nine Oh I can do that? :D 13:45
jnthn Oh lovely, the first spesh segfault is in calculating SSA form
nine Confused by variable argument number obs? 13:47
s/obs/ops/
jnthn Presumably, though I don't immediately spot why timotimo++'s changes to handle this aren't sufficient 13:49
nine jnthn: just omitting the repossession entry for the "Test" stash gets me surprisingly far. I actually only wanted to find out what or how exactly it would explode, but it just doesn't. 14:22
nwc10 jnthn: all NQP tests successful. Is this one supposed to be able to get anywhere with Rakduo? (without SPESH)
jnthn nwc10: Yes, it passes most of Rakudo make test for me, so long as MVM_SPESH_DISABLE=1 is in the environment 14:24
That has to be on for the whole Rakudo build too 14:25
nwc10 OK, trying this (had actually alraedy started)
to see if ASAN gets excited
Geth MoarVM/new-disp: ed7865175e | (Jonathan Worthington)++ | src/spesh/graph.c
Fix dispatch op info building

A str literal operand is of width 4, not 2, which was why we ended up doing bogus callsite reads. Also remove debug output, now it's seemingly building the right thing.
MoarVM/new-disp: 71ebb95b99 | (Jonathan Worthington)++ | src/spesh/graph.c
Dispatch instructions should end a basic block
nwc10 Abort. Restart! 14:27
14:33 klapperl_ left
timotimo ooh that's a good catch, i didn't think of different-sized arguments 14:50
14:50 greppable6 left 14:52 greppable6 joined 14:54 klapperl joined 14:55 sena_kun joined 14:56 Altai-man_ left
nwc10 jnthn: only reads of NULL pointers from the rakduo tests 15:44
all 4 seem to be
#0 0x7ff935c8997e in optimize_bb_switch src/spesh/optimize.c:2951
... SEGV on unknown address 0x000000000028
jnthn That'd imply you have spesh enabled? :) 15:45
nwc10 oh wait
other window
yes
got: "multi meth disp in new dispatcher NYI\n in block <unit> at -e line 1\n\n" 15:47
OK, that one makes sense :-)
same again 15:48
jnthn Yup, that's "expected" (in so far as, I really didn't implement that yet)
nwc10 t/02-rakudo/15-gh_1202.t is ASAN but it's ASAN in master
unclear why t/05-messages/10-warnings.t 15:50
is failing but it's not ASAN or SEGV
Geth MoarVM/new-disp: 44791bcf33 | (Jonathan Worthington)++ | 5 files
Mark dispatch ops with attrs, stub sp_dispatch_*

These sp_dispatch_* ops will be used when we cannot rewrite the dispatch op into something better.
16:02
MoarVM/new-disp: 13e702254f | (Jonathan Worthington)++ | 5 files
Factor out and fix dispatch op info calculation

It needs to take special care of longer argument sequences too, which would otherwise overrun the buffer for arg info.
MoarVM/new-disp: 687eefd300 | (Jonathan Worthington)++ | 3 files
Analyze dispatch instructions, prepare for opts

This look at the statistics for a given type tuple and decides if the dispatch is never hit, monomorphic, or polymorphic. Note that this is not the same thing as looking at the callsite state, since that is not correlated with particular incoming type tuples. With this, we also know we can't properly handle dispatch, meaning the SEGVs are replaced with panics.
16:17 MasterDuke joined
MasterDuke jnthn: it looks like new-disp is about at the point where github.com/MoarVM/MoarVM/pull/1286 is relevant? 16:18
jnthn MasterDuke: Yup, *and* if you're up for doing sp_dispatch_* too (once I've done the interpreter ones, of course...) :-) 16:28
Though those can be another PR 16:29
Geth MoarVM/new-disp: 5f61deb194 | (Jonathan Worthington)++ | 2 files
Rewrite dispatch_* into sp_dispatch_*

The latter aren't yet implemented, but glancing the spesh log suggests the transformation is either correct or at least somewhat close to correct.
16:30
16:31 leont_ left
jnthn Also, the plugin guard logging ain't quite right yet, 'cus it thinks that these things are all unhit... 16:33
But that's not today's problem
Geth MoarVM/new-disp: a063da44fc | (Jonathan Worthington)++ | src/core/interp.c
Implement sp_dispatch_* instructions

Which are like dispatch_*, expcet the slot and static frame for the inline cache entry are predetermined.
16:45
16:54 Altai-man_ joined
Geth MoarVM/new-disp: a8bfd1605b | (Jonathan Worthington)++ | 2 files
Cope with inlining sp_dispatch_* instructions

They were designed to be possible to inline from the start, so really this is just fixing up a couple of places to not get confused in the various situations presented by inlining.
16:56
jnthn So, now we do alright (not perfectly) at `make test` with spesh enabled
Wonder if we get through the build with it enabled...
Of course, we're not doing anything really nice yet; this is just about making sure we understand/do enough to survive. 16:57
16:57 sena_kun left
jnthn Hah, yes, I get through `make` of Rakudo (well, it's only CORE.setting onwards that matteres) with spesh enabled 16:59
That's quite nice 17:00
nwc10 woohoo
that's going to fail faster (in that it will get to the tests in less elapsed time)
jnthn Next need to figure out the various explosions (that aren't just NYIs) in make test are
Alas, some aren't reliable failures 17:03
nwc10 my ASAN hasn't got there yet
prod them with valgrind? 17:04
unlikely to be "your" problem here, but Address Space Layour Randomisation can have some fun effects. Including that it's used to "seed" the parts of the hash randomisation
jnthn Hm, no luck provoking it with valgrind either, alas 17:11
17:13 zakharyas left
jnthn Time for some rest/dinner, I think. 17:16
17:26 zakharyas joined 17:36 zakharyas left
nwc10 Stage optimize : This representation (MVMCode) does not support attribute storage (for type BOOTCode) at <unknown>:1 (/home/ghdev/Perl/rakudo1/blib/Perl6/Optimizer.moarvm:optimize_call) 17:48
(the setting. 3 lots of pain in ENV vars, 5 things #defined in headers) 17:49
18:21 vrurg left 18:22 vrurg joined
nwc10 OK, that's a spesh thing. Into tests 18:24
18:26 vrurg left 18:31 vrurg joined 18:36 vrurg left 18:55 sena_kun joined 18:57 Altai-man_ left 19:01 zakharyas joined 19:14 vrurg joined 19:46 vrurg left 20:07 zakharyas left 20:46 vrurg joined 20:47 patrickb joined 20:48 patrickb left 20:50 vrurg left 20:54 Altai-man_ joined 20:57 sena_kun left 21:03 vrurg joined 22:25 murman joined 22:26 murman left 22:55 sena_kun joined 22:57 Altai-man_ left 23:00 leont left