Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-06-29

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

All times shown according to UTC.

Time Nick Message
01:49 ilbot3 joined #moarvm
01:49 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
06:08 timotimo not sure if sleep went well
06:13 timotimo still getting an explosion when profiling this game i have
06:15 timotimo amazing. Mu's "item" method is being specialized into enterspesh, getarg, prof_allocated, set, set, takedispatcher, prof_exit, return
06:16 timotimo ah, it used to have a param_sn that got kicked out
06:31 brrt joined #moarvm
06:32 brrt ohai #moarvm
06:33 brrt so interesting fact; when I do my infinite loop, i have a 'final entry'
06:39 timotimo that feel when your rr session explodes with a malloc problem when trying to MVM_dump_bytecode(tc) ;(
06:47 domidumont joined #moarvm
06:50 brrt haha
06:50 brrt that feeling when a debugger crashes in general
06:51 brrt okay, i'm seeing i officially don't understand
06:52 brrt why compare an object with the flags of the other
06:54 domidumont joined #moarvm
06:54 timotimo that seems wrong?
06:58 timotimo though that ought to mean you know what the fix ought to be?
07:07 nwc10 good *, #moarvm
07:07 timotimo yo nwc10
07:12 brrt joined #moarvm
07:13 brrt kind of wrong, yes
07:13 timotimo break adjusted to free malloc space  -  why does this happen? :\
07:14 timotimo the ... f?
07:14 timotimo setting "unwindonsignal" off (so that i could debug what's going on) makes it suddenly work instead of crashing with a segfault
07:16 timotimo oh, now it dies again when i started it from a different place in the code
07:16 timotimo just fantastic
07:18 timotimo i can't reverse-step out of the function i called, so even though i was inside "rr replay" i have to restart the rr replay session :\
07:25 timotimo something's not right with the bytecode dumper helpers i wrote; the place it shows my IP to be at doesn't match up with what the interpreter's doing
07:26 brrt hmmm
07:27 timotimo 9 ops further up there's a findmeth, or 10 ops down there's one
07:27 timotimo and the interpreter's currently doing a findmeth op
07:28 timotimo actually, what if it's looking at the wrong frame on the stack?
07:28 timotimo i do see the IP right after an invoke_o
07:35 timotimo well, it's most likely this frame's bytecode i'm looking at
07:35 timotimo i.e. the first few instructions match with the contents of the dump
07:36 timotimo aha i found where the instruction pointer's at
07:42 timotimo i wonder if it's sensible that decont on a low-level null just gives the object itself back rather than asploding
08:53 robertle joined #moarvm
09:43 Voldenet joined #moarvm
09:43 Voldenet joined #moarvm
10:05 jnthn Since there haven't been any complaints yet about https://gist.github.com/jnthn/8ee6dc06edc7cd860059b87ffabb86b5 I figure I'll dig into it somehow :)
10:08 brrt i'm scared but very curious about its reult
10:11 jnthn brrt: What parts of it scare you?
10:12 * jnthn is all for trying to reduce risk :)
10:14 brrt well, the multithreaded bit
10:14 brrt but i guess it should be mostly alright :-)
10:15 jnthn Ah
10:15 jnthn I actually thing it'll be less scary than today
10:15 brrt i suppose it is
10:15 jnthn In that today *every* thread running might be racing to produce specializations
10:15 brrt true
10:15 jnthn So every spesh data structure in MVMStaticFrame has to be desinged to cope with multiple writers
10:15 jnthn Whereas now it'll be single writer, multiple readers
10:16 brrt but i mostly use single threaded applicaitons so i never see that
10:16 jnthn True
10:17 jnthn I think the scheme I suggested for getting predictability will give it, though?
10:17 jnthn I'm wondering a bit about taking on https://gist.github.com/jnthn/8ee6dc06edc7cd860059b87ffabb86b5#guard-simplification-and-decont-type-logging first
10:18 jnthn Since it's kinda orthogonal-ish to the rest
10:18 jnthn Hm, or maybe that's not so wise :)
10:18 jnthn Hah, no, it ain't
10:19 jnthn It'll increase the number of deopt points and hose up the recent argument handling changes, I fear
10:20 * jnthn makes a branch, digs into the new bits
11:01 Geth ¦ MoarVM/spesh-worker: 9c7e6edc7f | (Jonathan Worthington)++ | 6 files
11:01 Geth ¦ MoarVM/spesh-worker: Add MVMSpeshLog representation.
11:01 Geth ¦ MoarVM/spesh-worker:
11:01 Geth ¦ MoarVM/spesh-worker: Holds a log to be passed from an executing thread to the spesh worker
11:01 Geth ¦ MoarVM/spesh-worker: thread.
11:01 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/9c7e6edc7f
11:04 jnthn lunch &
11:11 * brrt nods, that scheme ought to work
11:18 brrt1 joined #moarvm
11:38 nebuchadnezzar joined #moarvm
11:44 JimmyZ jnthn: replied your https://gist.github.com/jnthn/95d0705d225ebfbad5dee0faa337624b, though maybe I am wrong
11:48 jnthn That's somewhat orthogonal to box/unbox
11:48 jnthn Though very much related to escape analysis
11:50 timotimo wow, 32bit for used and alloc :)
11:51 jnthn Not sure how long the logs will want to be :)
11:51 timotimo it's 2x 64bit for every entry
11:51 timotimo m: ((2 ** 32 - 1) * 8) / 1024 / 1024
11:51 camelia rakudo-moar 72e5d6: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "/" in expression "/ 1024 / 1024" in sink context (line 1)␤»
11:51 jnthn Really? :)
11:51 timotimo m: say ((2 ** 32 - 1) * 8) / 1024 / 1024
11:51 camelia rakudo-moar 72e5d6: OUTPUT: «32767.9999924␤»
11:52 jnthn used/limit are in terms of entries, not in terms of bytes :)
11:52 timotimo so, 32 giga-entries?
11:52 timotimo yeah
11:52 timotimo 32 gigabytes in entries per log, i mean
11:52 timotimo m: say ((2 ** 16 - 1) * 8) / 1024 / 1024
11:52 camelia rakudo-moar 72e5d6: OUTPUT: «0.4999924␤»
11:52 timotimo or half a gigabyte of log data per thread if we went down to 16
11:52 * JimmyZ wonders what jnthn's thought about Allocation Sinking Optimization compare to other EA Algorithms :P
11:53 jnthn We could, though given there's one log held per thread :P
11:53 timotimo though of course there's alignment that might force used + limit to be 64bit wide anyway
11:53 jnthn JimmyZ: It's not clear that the AS thing isn't tied to tracing
11:53 jnthn timotimo: Yeah, it seems like an odd place to try and save a few bytes :)
11:53 JimmyZ jnthn: oh, yea
11:53 timotimo true that
11:53 JimmyZ yeah
11:54 jnthn On a 64-bit system an entry is actually 24 bytes
11:54 jnthn kind is 4 (alignment makes it being less not worth it)
11:54 jnthn id is 4
11:55 jnthn Then the biggest union branch is 16
11:55 jnthn (entry, 2 pointers)
11:55 timotimo wow, how'd i miscount that?
11:55 jnthn Not enough lunch? Too much lunch? :)
11:56 timotimo i've only had breakfast and a nap
11:59 timotimo i think now the cat is demanding attention
12:18 AlexDaniel joined #moarvm
12:46 timotimo okay that was almost an hour of neck-scratches and bellyrubs
12:47 Geth ¦ MoarVM/spesh-worker: 465451fab3 | (Jonathan Worthington)++ | src/core/instance.h
12:47 Geth ¦ MoarVM/spesh-worker: Try to organize instance.h
12:47 Geth ¦ MoarVM/spesh-worker:
12:47 Geth ¦ MoarVM/spesh-worker: It has grown a huge amount of state over time. This attempts to group
12:47 Geth ¦ MoarVM/spesh-worker: the related pieces in some way, to get a better sense of what's in
12:47 Geth ¦ MoarVM/spesh-worker: there.
12:47 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/465451fab3
12:48 timotimo haha there was still a reference to APR in there
12:49 jnthn Yeah :P
12:49 jnthn Finally I can see what state spesh actually has :)
13:08 jnthn heh, tempted to do a simialr thing for threadcontext.h too
13:13 jnthn Having just started to do it - yes, 'cus I think I found a dead field and code to go with it too :)
13:17 timotimo the fun i'm having ATM is things asploding in a non-speshed frame, though of course the bad data could come from a wrong-speshed frame
13:20 Geth ¦ MoarVM/spesh-worker: 6ddfcffb12 | (Jonathan Worthington)++ | src/core/threadcontext.h
13:20 Geth ¦ MoarVM/spesh-worker: Organize the mass of state in threadcontext.h some
13:20 Geth ¦ MoarVM/spesh-worker:
13:20 Geth ¦ MoarVM/spesh-worker: So it's easier to see what's in there and what key subsystems are
13:20 Geth ¦ MoarVM/spesh-worker: using.
13:20 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/6ddfcffb12
13:30 Geth ¦ MoarVM/spesh-worker: ac8450a6b5 | (Jonathan Worthington)++ | 3 files
13:30 Geth ¦ MoarVM/spesh-worker: Add/mark spesh log queue and per-thread spesh log
13:30 Geth ¦ MoarVM/spesh-worker:
13:30 Geth ¦ MoarVM/spesh-worker: Currently these are not yet initialized.
13:30 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/ac8450a6b5
14:05 SourceBaby joined #moarvm
14:26 colomon joined #moarvm
14:35 Geth ¦ MoarVM/spesh-worker: 0f1de2d36d | (Jonathan Worthington)++ | 4 files
14:35 Geth ¦ MoarVM/spesh-worker: Remove now-unused cur_usecapture field.
14:35 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/0f1de2d36d
14:35 Geth ¦ MoarVM/spesh-worker: 07b722958b | (Jonathan Worthington)++ | 6 files
14:35 Geth ¦ MoarVM/spesh-worker: Start specialization worker thread at startup.
14:35 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/07b722958b
14:49 timotimo sigh, the internet connection here keeps dying
14:50 timotimo interesting, we don't keep a handle on the spesh thread in the instance object after all?
14:53 timotimo i suppose we don't need any other handle than the queue
14:53 jnthn timotimo: I was trying to think of what I'd need it for and couldn't :)
14:54 jnthn If we get a reason to ahve it we can add it :)
14:54 timotimo yeah, i can't come up with anything either
15:15 Geth ¦ MoarVM/spesh-worker: 3fb2d40d2c | (Jonathan Worthington)++ | 7 files
15:15 Geth ¦ MoarVM/spesh-worker: Set up initial per-thread spesh log, if enabled.
15:15 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/3fb2d40d2c
15:15 Geth ¦ MoarVM/spesh-worker: 937dcb2cb0 | (Jonathan Worthington)++ | src/spesh/worker.c
15:15 Geth ¦ MoarVM/spesh-worker: It helps to actually run the created thread.
15:15 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/937dcb2cb0
15:19 timotimo heh.
15:19 timotimo man you runed it!
15:21 brrt joined #moarvm
15:26 brrt he wants to JIT compile a specialization selector
15:26 brrt okay, we can do that
15:26 brrt but
15:27 brrt if we're going to go that way
15:27 brrt why not compile all specializations in a single frame
15:27 brrt oh, i know why
15:27 brrt because we might not be able to compile all specialized versions
15:35 timotimo whenever we add another specialization, we'd have to recompile the whole thing, no?
15:35 timotimo that could perhaps be expensive
15:35 timotimo and re-use of registers and such will have to be A Thing, as opposed to how we do inlining where we just put the whole work of the inlinee at the end of the inliner's work area
15:37 jnthn It has occurred to me that we might be able to shortcut quite a lot of the invocation work, though :)
15:37 brrt i'm listening
15:37 jnthn And have the selector end up just jumping into the JITted target code
15:37 jnthn Frame creation has quite a few conditionals and calculations and so on
15:38 timotimo ah, yes, interesting
15:38 timotimo making invocation cheaper is something we'll all benefit from
15:38 jnthn Bump-the-pointer'ing the CallStackRegion for example should be easy to compile
15:38 jnthn And sometimes that's all we'll have to do
15:56 brrt joined #moarvm
15:57 * brrt nods
15:57 brrt and suggest that the expr jit should make this kind of thing easy
15:58 brrt because it introduces a layer that the 'C' code can work with to make machine code
15:58 brrt could also be done in dynasm, for sure
16:25 brrt …. oh, wow
16:25 brrt how even does this happen
16:25 brrt my label is off by one....
16:47 AlexDaniel joined #moarvm
17:03 robertle joined #moarvm
17:35 timotimo if i need to make a branch for advanced moarvm-under-gdb stepping functions (step in and out of moar-bytecode-level funcitons and such), i'll probably call it here_come_the_hotsteppa
17:39 jnthn :P
18:16 domidumont joined #moarvm
18:29 zakharyas joined #moarvm
19:09 buggable joined #moarvm
20:38 samcv \o/ yay it's working
20:38 samcv and seems to be working even when i dump all the data into it. not just a partial run
20:38 samcv and also work when there's collation elements attached to a non-terminal node
21:14 HelpBot[perl6] \o/
21:16 lizmat joined #moarvm
21:18 samcv and luckily the code has less paths now as well. so that's a ++ as well :) whenever doing recursion the more code paths really can screw you over
21:20 samcv now it just has ternary operators and maybe one if condition period
21:20 samcv for the code that creates the c code
21:58 nebuchadnezzar joined #moarvm

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