github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:00 konvertex left
jnthn .tell jnthn When you re-work deopt tomorrow, rather than having to rewrite the whole stack and worry about frame expansions all the way down, you can instead fiddle the frame kind to be a "please deopt me" one, and then the only place deopt has to mess with is the frame on the stack top, which makes your job seriously less awful 00:02
tellable6 jnthn, I'll pass that message to your doctor
jnthn Better cache locality and avoids having to force all the frame to the heap too. 00:04
'night
00:08 harrow joined 01:22 dogbert17 left 02:10 squashable6 left 02:11 squashable6 joined, squashable6 left 02:13 squashable6 joined 06:17 squashable6 left 06:19 squashable6 joined 06:39 patrickb joined 06:55 patrickb left 07:45 Geth left 07:49 Geth joined 07:50 zakharyas joined 08:43 Altai-man_ joined 09:26 konvertex joined
jnthn morning o/ 10:00
lizmat 7 seconds late! :-) 10:03
jnthn :P 10:04
lizmat but yeah, one of those days where you realize you have to replace a bottom piece of your carefully constructed tower
nwc10 \o 10:09
jnthn Looks like last night me read an OSR paper and got an idea (oddly, not one that appears in the paper) about how to make the deopt changes far less painful 10:10
nwc10 "Doctor, doctor, it hurts when I do this" "well, don't do that then" ?
but yes, your summary last night seems very elegant 10:11
10:13 MasterDuke left 10:26 sena_kun joined 10:27 Altai-man_ left 10:29 MasterDuke joined 10:41 MasterDuke left
jnthn lunch, bbiab 11:03
11:08 japhb left 11:55 AlexDaniel joined 11:56 AlexDaniel left, AlexDaniel joined 11:59 AlexDaniel left 12:05 MasterDuke joined
jnthn Mmm, gulaš 12:19
12:24 zakharyas left 12:25 Altai-man_ joined 12:27 sena_kun left
nine Sounds nice. I think I'm gonna grab some lunch as well :) 12:34
jnthn Why does it segv? Ohh...this looks bad... :) 12:41
(gdb) p tc->stack_current_region->alloc
$7 = 0x7ffff5797080 ""
(gdb) p tc->stack_current_region->alloc_limit
$8 = 0x7ffff5796010 "
MasterDuke i'm still not sure why gist.github.com/MasterDuke17/c505c...53c47f048c segvs in MVM_jit_emit_primitive 12:50
timotimo have we double-checked what each register is mapped to? 12:52
at the point of segv, what does "x/i $rip" say? 12:54
or is it %rip?
jnthn
.oO( rest in peace? )
13:00
Geth MoarVM/new-disp: b0ce9e9446 | (Jonathan Worthington)++ | 6 files
Make all frames have a call stack record

Even those that get heap promoted now leave one behind. For now, this doesn't achieve anything particularly new, aside from cleaning up some aspects of call stack region management. However, it also paves the way for putting disptchers and flattening data on the call stack (and having them automatically get dropped when we return from the things that they ... (6 more lines)
13:20
13:24 zakharyas joined
MasterDuke timotimo: => 0x7ffff79c2c29 <MVM_jit_emit_primitive+22008>: mov (%rax),%rdx 13:26
jnthn heh, with spesh disabled it manages to even build Rakudo 13:27
I'm a bit spooked 'cus I'm sure continuations should be really broken, but it's probably just about robust enough to survive
nine MasterDuke: I'm still confused. Is it actually the MVM_jit_emit_primitive function that's segfaulting, or code generated by the JIT? 13:28
MasterDuke gist updated with a gdb backtrace 13:29
nine So it's the compiler that's failing 13:30
MasterDuke: just try removing lines from the assembly until it doesn't break anymore 13:31
Then you know what it's tripping over
MasterDuke heh
dies at `| lea ARG2, MVMDISPINLINECACHE:TMP2->entries[slot];` 13:33
i.e., up until that line is fine
jnthn Amazingly, Rakudo does - spesh disabled - build and pass much of spectest, even before I fix up continuations... 13:34
nine jnthn: how much are continuations actually used? 13:35
jnthn gather/take, await
And the failures I see are largely in list-y and thread-y things
For such a deep change I feared more fallout at this point. 13:36
Granted it probably can get out of sync and get away with it at present.
Yeah, almost all explosions are in concurrency tests 13:37
OK, now for the continuations...
nine MasterDuke: come to think of it, that line doesn't make that much sense anyway 13:39
timotimo MasterDuke: try "info registers" 13:40
nine MasterDuke: what you're doing there is effectively mov ARG2, TMP2 + offsetof(entries) + slot * 8, i.e. TMP2 + a constant
timotimo nine: it's AT&T syntax i think
MasterDuke: `set disassembly-flavor intel`
nine Yeah, set disassembly-flavor intel
MasterDuke i got farther with `| mov TMP3, MVMDISPINLINECACHE:TMP2->entries; | lea ARG2, [TMP3 + slot];`, but still a segv later
but the segv is in nowhereland 13:41
gist updated 13:42
nine Oh, btw. this thing will blow up on Windows, because there ARG1 == TMP1, so you're overwriting ARG1 after setting it
MasterDuke "arg", that problem again. well, easy fix 13:43
nine I'd probably just use ARG* even for temporaries, to make it clear 13:44
jnthn heh, pro tip: GC mark the call stack... :) 14:04
Geth MoarVM/new-disp: 5819f5a00f | (Jonathan Worthington)++ | 4 files
GC mark the callstack, plus assert it's in sync

The assertion revealed the forgotten marking. Now, the assertion only fails in the continuations tests in NQP, which is what it was expected to detect.
14:08
14:26 sena_kun joined 14:28 Altai-man_ left 14:29 Kaiepi joined
Geth MoarVM/new-disp: 5235e4d503 | (Jonathan Worthington)++ | 2 files
Fix a naming inconsistency
15:00
MoarVM/new-disp: b54a047112 | (Jonathan Worthington)++ | 3 files
Refactor marking of frames living on call stack

They're now handled as part of the call stack walking, so we don't have to traverse it in two places. This will also ease continuation handling.
15:43 patrickb joined 16:25 Altai-man_ joined 16:27 sena_kun left 16:52 Altai-man_ left 16:56 MasterDuke left 17:08 MasterDuke joined
MasterDuke nice, nqp and rakudo now both build, with lego jit bails from sp_getlexstatic_o gone. not sure what the testing situation is though, were they clean at any point? 17:12
looks like the same tests fail with that non-jitted 17:15
17:16 sena_kun joined
Geth MoarVM: MasterDuke17++ created pull request #1286:
Lego JIT implementation of sp_getlexstatic_o
17:22
MasterDuke not quite sure what a template for ^^^ would look like 17:26
17:27 japhb joined
Geth MoarVM/new-disp: baa27a97c1 | (Jonathan Worthington)++ | 12 files
Mostly move continuations to new callstack model

This is required for dispatchers because we shall also needs to save their state when taking a continuation. The new approach is to always have continuations allocate stack frames within a fresh region (so a reset is a region base). This means that we can avoid looking through every frame, and just look through the (much smaller number of) regions ... (23 more lines)
17:50
jnthn Rakudo manages to get through its build with this. Tests are explosive, though with one of the known todo panics. :) 17:54
Home time.
o/ 17:55
(Oh, and also: only with spesh disabled, 'cus I didn't update deopt yet.)
18:25 Altai-man_ joined, zakharyas left 18:27 sena_kun left 18:40 Kaiepi left, Kaiepi joined 18:41 Kaiepi left 18:59 Kaiepi joined
nwc10 \o 19:05
beer!
MasterDuke this morning i just bottled the stout i'm brewing 19:08
nwc10 ooooh 19:18
19:49 zakharyas joined 20:25 sena_kun joined 20:27 Altai-man_ left 20:36 zakharyas left 21:31 hoelzro left 21:42 hoelzro joined 21:44 Kaiepi left 21:47 Kaiepi joined 21:48 Kaiepi left, Kaiepi joined 22:01 dogbert17 joined
dogbert17 I get test failures in t/spec/S32-io/io-cathandle.t 22:01
get native descriptor requires an object with REPR MVMOSHandle (got Scalar with REPR P6opaque) 22:02
lizmat github.com/rakudo/rakudo/commit/f33ce01c11 22:04
dogbert17 ^^
github.com/rakudo/rakudo/commit/61046d7695 probably caused it 22:05
22:25 Altai-man_ joined 22:27 sena_kun left 22:44 Altai-man_ left 23:12 squashable6 left 23:14 squashable6 joined 23:48 patrickz joined 23:52 patrickb left