Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-07-19

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

All times shown according to UTC.

Time Nick Message
00:01 unicodable6 joined #moarvm
00:25 samcv jnthn, i think I have made all the changes you requested with my PR now
00:25 samcv moved the renormalized_section_graphs = MVM_string_graphs later and added documentation for the return values of should_break
00:29 lizmat joined #moarvm
01:00 greppable6 joined #moarvm
01:00 quotable6 joined #moarvm
01:00 unicodable6 joined #moarvm
01:00 bisectable6 joined #moarvm
01:00 benchable6 joined #moarvm
01:00 coverable6 joined #moarvm
01:00 committable6 joined #moarvm
01:00 evalable6 joined #moarvm
01:00 bloatable6 joined #moarvm
01:00 statisfiable6 joined #moarvm
01:06 stmuk_ joined #moarvm
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
02:00 lizmat joined #moarvm
02:03 Geth_ ¦ MoarVM: c814c79e1f | (Samantha McVey)++ | src/strings/ops.c
02:03 Geth_ ¦ MoarVM: Deduplicate code from MVM_string_indexing_optimized
02:03 Geth_ ¦ MoarVM:
02:03 Geth_ ¦ MoarVM: The code is repeated in collapse_strands so call that function
02:03 Geth_ ¦ MoarVM: instead of repeating the code.
02:03 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c814c79e1f
04:48 Geth_ ¦ MoarVM: samcv++ created pull request #616: Start off collapsing strands as 8bit instead of 32bit
04:48 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/616
05:40 brrt joined #moarvm
06:02 Geth_ ¦ MoarVM/even-moar-jit: df71570c04 | (Bart Wiegmans)++ | 7 files
06:02 Geth_ ¦ MoarVM/even-moar-jit: Make even-moar-jit buildable on MSVC and nmake
06:02 Geth_ ¦ MoarVM/even-moar-jit:
06:02 Geth_ ¦ MoarVM/even-moar-jit: nmake is why we can't have nice things
06:02 Geth_ ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/df71570c04
06:02 brrt so, that makes it at least buildable
06:19 brrt oh, hang on
06:20 brrt wrong define syntax
06:27 TimToady joined #moarvm
06:28 Geth_ ¦ MoarVM/even-moar-jit: af6ba43e9c | (Bart Wiegmans)++ | Configure.pl
06:29 Geth_ ¦ MoarVM/even-moar-jit: Fix define typo in dynasm flags
06:29 Geth_ ¦ MoarVM/even-moar-jit:
06:29 Geth_ ¦ MoarVM/even-moar-jit: Unlike c compilers, dynasm understands -D *space* name=value,
06:29 Geth_ ¦ MoarVM/even-moar-jit: and doesn't understand them otherwise
06:29 Geth_ ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/af6ba43e9c
06:46 brrt joined #moarvm
06:52 domidumont joined #moarvm
07:00 domidumont joined #moarvm
07:09 samcv hey brrt
07:11 brrt ohai samcv
07:12 brrt shall we join in bashing nmake?
07:12 samcv sure
07:12 samcv that's the windows make utility right
07:14 brrt yeah, well, it's the one on the MS toolchain
07:14 brrt it is
07:14 brrt a): non-parallel
07:14 samcv yeah i remember it having "issues"
07:14 brrt b): doesn't support inference in a 'standard' way
07:15 brrt c): doesn't have the $< defined if it *isn't* working on an inference rule
07:15 brrt anyway
07:15 brrt how are you?
07:18 nwc10 good *, *
07:20 Geth_ ¦ MoarVM/even-moar-jit: 838aa30fd7 | (Bart Wiegmans)++ | 3 files
07:20 Geth_ ¦ MoarVM/even-moar-jit: Add 'include:' keyword to expr template compiler
07:20 Geth_ ¦ MoarVM/even-moar-jit:
07:20 Geth_ ¦ MoarVM/even-moar-jit: This is mostly so we don't have to redefine macros when we start
07:20 Geth_ ¦ MoarVM/even-moar-jit: making specialized templates for REPR types.
07:20 Geth_ ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/838aa30fd7
07:20 brrt good hi, nwc10
07:33 zakharyas joined #moarvm
07:39 nine Couldn't we just ship a working make for Windows?
07:45 brrt you know.. that's not actually such a bad idea
07:47 nine I think the one good thing about Windows is that you can ship binaries with a reasonable chance of them actually running on the target system.
07:47 nine And now that I think of it, this would probably be a good idea for Distribution::Builder::MakeFromJSON, too.
07:48 brrt otoh, a pure-perl 'make' would probably not be the hardest program in the world
08:17 samcv brrt, oh i'm good :)
08:38 robertle joined #moarvm
08:38 domidumont1 joined #moarvm
08:40 brrt something is horribly broken about that patch though
08:40 brrt with the macro stuff
08:40 jnthn morning o/
08:41 nwc10 jnthn: origin/spesh-worker^ got all the way through to running the rakudo spectest
08:42 jnthn Yup, because HEAD more fully re-enabled it and now we can see the problems in all their glory :)
08:42 samcv hey jnthn
08:48 domidumont joined #moarvm
08:50 jnthn o/ samcv
08:50 jnthn Your PR looks good, just noted one tiny thing :)
09:03 * jnthn goes to take a look at the guard tree issue
09:06 jnthn wat, it gives two differnet errors and works under valgrind o.O
09:12 Geth_ ¦ MoarVM/spesh-worker: 2a2f0b2bb0 | (Jonathan Worthington)++ | src/spesh/arg_guard.c
09:12 Geth_ ¦ MoarVM/spesh-worker: Fix inverted if/else branches.
09:12 Geth_ ¦ MoarVM/spesh-worker:
09:12 Geth_ ¦ MoarVM/spesh-worker: Should use the safepoint mechanism to release guards when asked.
09:12 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/2a2f0b2bb0
09:15 jnthn Now it reliably explodes in the way I understand. :)
09:17 brrt hehe
09:17 brrt reliable explosions++
09:17 * jnthn ponders the best way to fix this
09:27 nine Also brauch ma ka Angst haben, dass ihm nix mehr einfaellt ;)
09:28 nine oops, ww
09:28 jnthn Nothing to have angst about :P
09:28 jnthn ...is "Also" really German? :)
09:29 jnthn Also, phew, think I found a fix for my problem that is both (a) the easier one to implement without screwing lots with the graph, and (b) potentially more useful too :)
09:30 samcv jnthn, what did you mean by "I wonder to what degree we can take the inputs being 8-bit as an indicator that this is likely to work out? "
09:31 jnthn samcv: Can we use the strings the strands reference all being themselves 8-bit ones as a heuristic up-front?
09:31 jnthn Or do we have so many 32-bit ones floating around that need not be 32-bit that there's no point?
09:32 jnthn Or more generally, can we find a good/cheap heuristic to tell us whether to try the 8-bit thing at risk of having to copy later
09:32 samcv well
09:32 nine jnthn: yes, it means "thus"
09:33 nine or just "so"
09:33 jnthn Ah, so not a modern English loan after all :)
09:33 samcv well 8 bit is done easily, and 32bit it only has to trace through as much as the 8 bit takes to trace through
09:33 samcv so i think it should be faster in most cases. i gave the worst case in my timings with the unicode at the very end of the really long string
09:34 samcv but as far as heuristics hm
09:34 samcv jnthn, how does perl6/nqp create its own strings?
09:35 samcv since i don't know. i know how to do ops to existing strings but like. when it reads a source file how does it create those strings
09:35 samcv with what ops
09:36 samcv i mean we'd have to set a flag when these strands are made or whatever
09:36 samcv and check every codepoint
09:36 jnthn It will just substr the source to get the string text. String literals mostly live in QAST::SVal nodes. These are turned into MAST::SVal nodes.
09:36 jnthn These are in turn stored in the string heap inside of the assembled bytecode
09:37 jnthn Even when we compile "in memory" rather than writing it out, we go through this process
09:38 jnthn Strings are deduplicated here: https://github.com/MoarVM/MoarVM/blob/master/src/mast/compiler.c#L291
09:38 jnthn And then formed into the bytecode string heap here: https://github.com/MoarVM/MoarVM/blob/master/src/mast/compiler.c#L1319
09:39 jnthn Either as UTF-8 or latin-1: https://github.com/MoarVM/MoarVM/blob/master/src/mast/compiler.c#L1343
09:39 jnthn The flag saying which they are is used to pick the MVMString representation (8 or 32) when we load the bytecode
09:40 jnthn Though we also lazily deserialize the string heap
09:40 jnthn Since many strings in CORE.setting are exception messages and so never used, for example :)
09:49 samcv ah
09:56 samcv but the strings themself don't have any flag i guess and we should add one?
10:01 TimToady joined #moarvm
10:02 jnthn samcv: Well, we know what kind of string they are
10:02 jnthn samcv: Question is if we're good enough at sticking at producing 8-bit strings when we get them as input
10:02 jnthn If so, then we could use the kind thing as the flag
10:14 Geth_ ¦ MoarVM/spesh-worker: 9823340640 | (Jonathan Worthington)++ | src/spesh/arg_guard.c
10:14 Geth_ ¦ MoarVM/spesh-worker: Correct a typo.
10:14 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/9823340640
10:14 Geth_ ¦ MoarVM/spesh-worker: c34ce8315b | (Jonathan Worthington)++ | 2 files
10:14 Geth_ ¦ MoarVM/spesh-worker: Handle certain specializations in the guard tree.
10:14 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/c34ce8315b
10:14 Geth_ ¦ MoarVM/spesh-worker: cf35c88bbe | (Jonathan Worthington)++ | src/spesh/log.c
10:14 Geth_ ¦ MoarVM/spesh-worker: Fix duplicate free and mutex destroy.
10:14 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/cf35c88bbe
10:18 jnthn Hm, somewhere it seems we return a real NULL
10:21 jnthn With a local patch for that, things are back on their feet again
10:39 Geth_ ¦ MoarVM/even-moar-jit: 63 commits pushed by (Daniel Green)++, (Jonathan Worthington)++, (Samantha McVey)++, (Stefan Seifert)++, MasterDuke17++, (Steve Mynott)++, lizmat++, (Lucas Buchala)++, (Timo Paulssen)++, (Bart Wiegmans)++
10:39 Geth_ ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/compare/838aa30fd7...3fa4f9d974
10:40 brrt also sprach nine
10:45 Geth_ ¦ MoarVM/spesh-worker: ac895f243e | (Jonathan Worthington)++ | src/spesh/arg_guard.c
10:45 Geth_ ¦ MoarVM/spesh-worker: Cope with result after callsite test.
10:45 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/ac895f243e
10:47 jnthn With that, NQP builds/tests with MVM_SPESH_BLOCKING=1 (which means we never get lucky and avoid a bug by doing less spesh work due to exit)
10:57 Geth_ ¦ MoarVM/spesh-worker: 9e072734f8 | (Jonathan Worthington)++ | src/spesh/log.c
10:57 Geth_ ¦ MoarVM/spesh-worker: Guard against NULL result.
10:57 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/9e072734f8
11:09 Geth_ ¦ MoarVM/even-moar-jit: 0a91534921 | (Bart Wiegmans)++ | tools/expr-template-compiler.pl
11:09 Geth_ ¦ MoarVM/even-moar-jit: Undo a thinko in expr-template-compiler
11:09 Geth_ ¦ MoarVM/even-moar-jit:
11:09 Geth_ ¦ MoarVM/even-moar-jit: The compiled template is flattened into the shared buffer, so we
11:09 Geth_ ¦ MoarVM/even-moar-jit: need the offset before pushing.
11:09 Geth_ ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/0a91534921
11:11 Geth_ ¦ MoarVM/spesh-worker: 740ed95f85 | (Jonathan Worthington)++ | src/spesh/candidate.c
11:11 Geth_ ¦ MoarVM/spesh-worker: Remove now-unused function.
11:11 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/740ed95f85
11:20 Geth_ ¦ MoarVM/spesh-worker: 4811d45bce | (Jonathan Worthington)++ | 7 files
11:20 Geth_ ¦ MoarVM/spesh-worker: Remove hard limit on spesh candidate count.
11:20 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/4811d45bce
11:22 jnthn lunch &
11:36 geekosaur joined #moarvm
11:59 zakharyas1 joined #moarvm
12:01 nwc10 jnthn: Stage parse      : 721.273
12:01 nwc10 was about 1000 on the commit(-before-last) overnight
12:01 nwc10 and about 500 for a regular ASAN build
12:02 nwc10 although I've set your new env variable, so this may not be a fair comparison
12:03 nwc10 into spectest...
12:07 jnthn Yeah, we're still not using a bunch of the logged data yet
12:08 jnthn Now that things seem to be basically working again, I'll integrate the new logging with the graph
12:09 Geth_ ¦ MoarVM/spesh-worker: bc5992ea6b | (Jonathan Worthington)++ | src/spesh/arg_guard.h
12:09 Geth_ ¦ MoarVM/spesh-worker: Fix typo; MasterDuke17++.
12:09 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/bc5992ea6b
12:10 Geth_ ¦ MoarVM: 99cba547f8 | (Samantha McVey)++ | 3 files
12:10 Geth_ ¦ MoarVM: When concat needs normalization only normalize one section
12:10 Geth_ ¦ MoarVM:
12:10 Geth_ ¦ MoarVM: Previously if the last grapheme of string a and the first grapheme
12:10 Geth_ ¦ MoarVM: of string b determined that renormalization was needed to combine these
12:10 Geth_ ¦ MoarVM: codepoints, we were forced to renormalize all of string a and all of
12:10 Geth_ ¦ MoarVM: string b, together into one string.
12:10 Geth_ ¦ MoarVM:
12:10 Geth_ ¦ MoarVM: <…commit message has 22 more lines…>
12:10 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/99cba547f8
12:10 Geth_ ¦ MoarVM: 7044f99eaf | (Jonathan Worthington)++ (committed using GitHub Web editor) | 3 files
12:10 Geth_ ¦ MoarVM: Merge pull request #615 from samcv/concat-magic
12:10 Geth_ ¦ MoarVM:
12:10 Geth_ ¦ MoarVM: Don't re_nfg string a + string b when concatenating in many cases, instead add only the section needing renormalization in as another strand
12:10 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7044f99eaf
12:33 zakharyas joined #moarvm
12:34 Geth_ ¦ MoarVM/spesh-worker: 89e597a201 | (Jonathan Worthington)++ | 3 files
12:34 Geth_ ¦ MoarVM/spesh-worker: Pass planned candidate info into facts.
12:34 Geth_ ¦ MoarVM/spesh-worker:
12:34 Geth_ ¦ MoarVM/spesh-worker: This will be used to find logged values.
12:34 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/89e597a201
12:34 Geth_ ¦ MoarVM/spesh-worker: 60864219a4 | (Jonathan Worthington)++ | 4 files
12:34 Geth_ ¦ MoarVM/spesh-worker: Add logged op annotation.
12:34 Geth_ ¦ MoarVM/spesh-worker:
12:34 Geth_ ¦ MoarVM/spesh-worker: For ops that log something, but that aren't then used as deopt points.
12:34 Geth_ ¦ MoarVM/spesh-worker: Will be used to save a bytecode index annotation in the spesh graph so
12:35 Geth_ ¦ MoarVM/spesh-worker: that we can resolve logged values for static lexicals.
12:35 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/60864219a4
12:48 Geth_ ¦ MoarVM/spesh-worker: d2d7652f9a | (Jonathan Worthington)++ | 3 files
12:48 Geth_ ¦ MoarVM/spesh-worker: Insert logged annotations into spesh graph.
12:48 Geth_ ¦ MoarVM/spesh-worker:
12:48 Geth_ ¦ MoarVM/spesh-worker: Carrying bytecode position of an instruction marked :logged.
12:48 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/d2d7652f9a
12:48 Geth_ ¦ MoarVM/spesh-worker: 5fdf96ddbf | (Jonathan Worthington)++ | src/spesh/graph.c
12:48 Geth_ ¦ MoarVM/spesh-worker: Fix comment grammar.
12:48 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/5fdf96ddbf
13:03 domidumont joined #moarvm
13:21 jnthn language class &
14:08 nwc10 jnthn: it survived to the end of the spectest
14:09 brrt joined #moarvm
14:11 zakharyas1 joined #moarvm
14:21 brrt joined #moarvm
15:10 jnthn nwc10: And failed a handful, perhaps?
15:11 domidumont joined #moarvm
15:23 jnthn bah, my pre-lesson bug hunting was actually bogus, I think
15:24 brrt joined #moarvm
15:30 lizmat joined #moarvm
15:30 brrt wow, jit-bisect works on windows
15:31 brrt all but the comparify
15:31 jnthn Nice :)
15:31 brrt i do have strawberry-perl installed, so that probably explains the pressence of objdump
15:34 Geth_ ¦ MoarVM/spesh-worker: afedbe4092 | (Jonathan Worthington)++ | src/spesh/graph.c
15:34 Geth_ ¦ MoarVM/spesh-worker: Logged annotations should have pre-increment PC.
15:34 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/afedbe4092
15:36 Geth_ ¦ MoarVM/spesh-worker: fef46d93be | (Jonathan Worthington)++ | src/spesh/optimize.c
15:36 Geth_ ¦ MoarVM/spesh-worker: Resolved logged static values.
15:36 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/fef46d93be
15:49 colomon joined #moarvm
15:56 timotimo jnthn: that's a nice infinite loop you have there
15:57 timotimo while (ann) and not changing ann inside the loop
15:59 jnthn heh, nice catch :)
15:59 lizmat joined #moarvm
15:59 jnthn Apparently nowhere do we have multiple annotations on such a node :)
16:03 Geth_ ¦ MoarVM/spesh-worker: 8f0afa0e09 | (Jonathan Worthington)++ | 6 files
16:03 Geth_ ¦ MoarVM/spesh-worker: Ensure spesh log has correct thread.
16:03 Geth_ ¦ MoarVM/spesh-worker:
16:03 Geth_ ¦ MoarVM/spesh-worker: Even when it's created by a thread other than the one its for. Prior
16:03 Geth_ ¦ MoarVM/spesh-worker: to this fix, we filled all the spesh logs, sent them off to the spesh
16:03 Geth_ ¦ MoarVM/spesh-worker: worker thread, which then after specializing created a log with the
16:03 Geth_ ¦ MoarVM/spesh-worker: wrong thread object in it. The upshot was that we never created any
16:03 Geth_ ¦ MoarVM/spesh-worker: more logs after that one for the logging/sending thread.
16:03 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/8f0afa0e09
16:04 Geth_ ¦ MoarVM/spesh-worker: 6e3b3cb9ef | (Jonathan Worthington)++ | src/spesh/optimize.c
16:04 Geth_ ¦ MoarVM/spesh-worker: Fix potential infinite loop; timotimo++.
16:04 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/6e3b3cb9ef
16:13 zakharyas joined #moarvm
16:16 colomon joined #moarvm
16:22 jnthn Seems that at the moment we're managing to consume huge amounts of time making specializations, perhaps due to a lack of limit on how many, perhaps due to some other kind of bug. Will need to dig a bit more.
16:23 jnthn I should re-instate the hotness thresholding too
16:24 jnthn I had thought that maybe since we're on a separate thread then we can just produce specializations without worrying about code size
16:24 jnthn But when things have 500 basic blocks, well, no :P
16:24 jnthn Not unless it's getting really hot
16:39 robertle joined #moarvm
16:47 timotimo ah yeah, there's really big frames
16:47 timotimo i think find_best_dispatchee for example is gigantic
17:04 Geth_ ¦ MoarVM/spesh-worker: 9bcbc02cb4 | (Jonathan Worthington)++ | 2 files
17:04 Geth_ ¦ MoarVM/spesh-worker: Log time that specialization work consumes.
17:04 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/9bcbc02cb4
17:04 jnthn Dinner time; bbl
17:39 domidumont joined #moarvm
17:48 brrt joined #moarvm
17:54 domidumont joined #moarvm
18:10 vendethiel joined #moarvm
18:27 nwc10 jnthn: IIRC yes failed a few, but I'm not totally sure
18:27 nwc10 (which)
19:11 domidumont joined #moarvm
19:34 dalek joined #moarvm
19:44 SourceBaby joined #moarvm
19:48 synopsebot6 joined #moarvm
20:06 tinyurl_comSLASH joined #moarvm
20:08 tinyurl_comSLASH left #moarvm
20:41 timotimo hm. so we have a deopt point in front of a p6oget_o, right? and that keeps the wval for the type object we're accessing an attribute for alive
20:42 timotimo but can the code actually deopt in a way that puts us in front of the p6oget_o in the original code so we actually reqiure the wval still?
21:04 AlexDaniel joined #moarvm
21:15 timotimo i don't know enough about deopt to figure out how we could robustly realize a variable isn't used any more after a given deopt point
21:27 timotimo jnthn: will we have something in place that helps us inline more stuff when the containing frame has already been speshed before the potential inlinees have been speshed sufficiently?
21:27 timotimo we don't really have the "spesh on the way up the callstack" any more, or does the lagging approach still somehow do that? perhaps if we do the log in reverse?
21:37 jnthn timotimo: We sort the plan in order of maximum call depth
21:37 timotimo ah, that makes sense
21:37 timotimo i was wondering why that was there
21:37 committable6 joined #moarvm
21:37 bisectable6 joined #moarvm
21:37 benchable6 joined #moarvm
21:37 coverable6 joined #moarvm
21:37 bloatable6 joined #moarvm
21:37 unicodable6 joined #moarvm
21:37 greppable6 joined #moarvm
21:37 evalable6 joined #moarvm
21:37 quotable6 joined #moarvm
21:38 jnthn On deopt points - they're after a fetch operation, and guard the result of the fetch
21:38 jnthn So anything involved in the fetch that's not otherwise needed, like a wval, can go away
21:39 jnthn They guard is there because something that uses the fetched value expects it to be of a certain type
21:42 timotimo but in this case there isn't a guard?
21:42 timotimo the last steps are wval, getattr_o, return_o
21:43 jnthn Hm, do you have a snippet of spesh log?
21:43 timotimo one sec
21:44 jnthn There is some amount of usage bumping we do in order to make sure stuff is available to deopt'd code though
21:44 timotimo https://gist.github.com/timo/3a3bdd6a6b7c9b319af9e45076eec34f
21:44 timotimo yes
21:44 timotimo that's what i'm blaming here
21:44 timotimo thing is, that the post-deopt code doesn't use the value any more
21:46 jnthn Oh, I see what you meant
21:46 jnthn *mean
21:46 timotimo yeah i still mean it :P
21:47 jnthn I think the mechanism is probably conservative rather than precise, but this does seem like an obvious case
21:47 jnthn It could be off-by-one-ish
21:47 jnthn Oh, also
21:47 timotimo i first thought that, too. that we compare >= the idx of where the deopt is rather than >
21:47 jnthn I wonder if we attach usages to deopt points that bumped them
21:48 jnthn So we can decrement them if the guard goes unused
21:48 timotimo i don't think we store that at all
21:48 jnthn I suspect that needs a good bit of care to get right
21:48 jnthn But I guess the dominance order gives us some good properties there
21:48 timotimo it should, though i don't think we properly restore dominance order when inlining has happened
21:48 timotimo so need extra care there likely
21:50 timotimo i wonder if it'd be worth it at all to turn wval into spesh slot lookup?
21:52 jnthn I don't think so
21:52 jnthn After JIT they are equivalent
21:56 timotimo ah, that's good
21:57 timotimo it's probably not the juiciest target for non-jitted frames, i guess
22:00 jnthn True, though every little helps :)
22:01 timotimo i think we should be able to use "perf script" to get per-opcode stats rather than just "20% time spent in MVM_interp_run"
22:10 jnthn urgh, so warm weather this evening :/
22:10 jnthn Doubt I'll sleep but don't have the energy to do anything either.
22:13 timotimo i know that feeling very well
22:13 timotimo i just installed a fly screen in one of my windows and it's reasonably cool outside
22:22 jnthn Hopefully it'll cool a bit more here...
22:23 jnthn Well, guess I'll go and lie down anyways... Hopefully tomorrow will bring a storm to cool things off
22:23 jnthn o/
22:27 timotimo gnite jnthn!
22:28 timotimo i wish you the best of luck
22:35 samcv timotimo, what would you think about a low memory mode where we don't collapse any of the strands unless we have to
22:36 samcv like optimized indexing operation wouldn't flatten the strands, to avoid spikes of memory usage. Zoffix was saying that he had memory usage concerns when trying to use p6 for the web
22:38 Zoffix s/concerns/problems/;
22:38 Zoffix As in, the app nomed too much RAM is why I switched away from Perl 6 and not that it was too slow
22:39 samcv and also for example when i had to collapse strands, it creates an 8bit string allocates it. and then if it needs to go to 32 bit it allocates the 32bit string on top of the 8 bit.
22:39 samcv there is a way for me to deallocate the 8 bit string. but i did not
22:39 samcv because it has a performance impact that can be somewhat big
22:39 samcv maybe not *that* big. but if you cared more about memory usage then it's a tradeoff the user could make
22:40 samcv but i did that to avoid performance issues with if it finds a unicode character at the very end of a long string. but i'd be open to a low memory mode that would deallocate it to avoid having to have them both allocated at once, and not collapse strands at all unless we reach the max strand limit
22:40 timotimo i was wondering at some point that we could probably start creating an 8bit string and when we hit the first big codepoint we see how far we've come and maybe build two strands instead. the first one 8bits, the second one 32bits.
22:41 samcv yep
22:41 samcv same here. though at the moment uh. where would we do that
22:41 timotimo it'd be cool if we could be smart about "where in this string are we currently 'working'"
22:41 timotimo so we could have an expanded part "in the middle" and strands in front and in the back
22:41 samcv what function creates strings again? is there a general purpose one
22:41 timotimo but mutating a string in-place is very bad
22:42 timotimo all the decode functions from our encoders
22:42 samcv ah
22:42 samcv ok
22:51 samcv timotimo, what other places to we need improvements in memory usage?
22:52 timotimo depends on the workload you're interested in analyzing
22:52 timotimo like, do you want to make the memory usage of perl6 -e '' smaller?
22:53 timotimo or are you trying to parse a 10 gigabyte log text file with a grammar?
22:53 timotimo are you doing arithmetic with numbers with 1m digits?
22:54 samcv i don't know. i just meant it as a general thing if you had anything in mind
22:54 timotimo oh
22:54 timotimo i know of a few things that are mostly really tiny and inconsequential
22:55 samcv :P
22:55 samcv i mean where does our memory go in general
22:55 timotimo fire up heaptrack to figure that out i guess
22:55 timotimo a lot of startup memory usage is from deserializing objects and code
22:56 samcv i mostly meant during runtime
22:56 samcv i think that's what Zoffix was referring to?
22:56 timotimo can't tell without a particular workload i'm afraid
22:57 Geth_ ¦ MoarVM: dwarring++ created pull request #617: attempt at a better error message for RT#126341
22:57 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/617
22:57 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126341
22:59 timotimo i have a little example script here that does some fibonacci and it allocates the majority of stuff in optimize_bb
23:00 timotimo but the backtraces are *weird*
23:00 timotimo maybe the "<unresolved function>" entries are somehow to blame?
23:02 timotimo but the optimize_bb stuff is rather spiky so that's good.
23:04 timotimo hmpf. by running heaptrack against moar as binary instead of bash (because of the launcher script) i get vastly different results
23:04 timotimo oh, i forgot to set the env vars i had in the other one
23:19 timotimo it does look like something upsets heaptrack, perhaps it doesn't work terribly well with exec?
23:28 MasterDuke joined #moarvm
23:42 timotimo will go to bed a little bit earlier today
23:42 timotimo maybe tomorrow i'll add a "spent %x bytes" output to the spesh log, because that interests me
23:43 MasterDuke timotimo: hopefully quick question. could spesh info be added to pre-comp bytecode?
23:43 yoleaux 23:22Z <Zoffix> MasterDuke: This commit isn't working because $error is BOOTException, not a Perl 6 exception and it don't got .message. We need some sort of a different solution. https://github.com/perl6/nqp/commit/859b4441dd3f6fd8816759b3b1f12b2d45a0bfd2
23:44 timotimo what do you mean?
23:45 MasterDuke so it could start out running already speshed
23:46 timotimo oh
23:46 timotimo no, not really
23:47 MasterDuke thought that might be the case. oh well, later then...
23:48 timotimo the "certain" optimizations will get us close, though
23:49 timotimo much of spesh relies on having pointers to type objects and such
23:50 timotimo not sure if we'd be able to properly write stuff like that out, for example by relying on objects that are in a serialization context and haven't been modified in any way? i guess?
23:50 timotimo anyway, seeya!

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