Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-11-11

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

All times shown according to UTC.

Time Nick Message
01:28 ShimmerFairy joined #moarvm
02:05 diakopter joined #moarvm
04:01 stmuk joined #moarvm
05:14 vendethiel joined #moarvm
06:07 d4l3k_ joined #moarvm
08:36 zakharyas joined #moarvm
08:58 domidumont joined #moarvm
09:03 domidumont joined #moarvm
09:48 stmuk_ joined #moarvm
10:06 vendethiel joined #moarvm
10:17 brrt joined #moarvm
10:17 brrt good *
10:44 brrt i just found out that in fact several frame handler boundaries and deopt points do not, in fact, start at basic block boundaries
10:44 brrt this is.. painful
10:45 jnthn Oh?
10:45 jnthn depot points - I'd only really expect deopt all points to be such boundaries
10:46 brrt no, for instance, iirc, the sp_guard things, they are in the middle of blocks, but they carry a deopt_all annotation
10:46 brrt hmm, not sure that is correct
10:46 jnthn They're a deopt one, no?
10:46 brrt yes
10:47 brrt right
10:47 brrt :-)
10:47 brrt i don't handle deopt_one at all yet in the expr jit, so let's not worry about that
10:47 brrt but i've seen at least one case of a set followed by a fh start
10:47 brrt fh end, these have been end of basic-blocks iirc
10:48 jnthn Yeah, we never jump to the start of a handler
10:48 jnthn Or more like
10:48 jnthn It being a handler doesn't mean we'll jump there
10:48 brrt fair enough
10:49 brrt hmmm
10:49 brrt maybe it's simpler than i though
10:49 brrt t
10:58 brrt i'm just wondering how to fit it into the tree
10:59 brrt for instance, a deopt osr point in the middle of the expression means i have to break the expression (flush all computed values)
11:03 jnthn Think is, we introduce deopt-one points
11:04 jnthn *Thing
11:04 jnthn During optimization, after having formed the CFG
11:04 zakharyas joined #moarvm
11:05 brrt uhuh
11:05 jnthn But really
11:05 jnthn There's nothing to stop you assembling a JIT BB graph
11:06 jnthn So you can have whatever view you want for the purpose of JITting.
11:06 brrt that is true
11:06 brrt that would have some advantages
11:06 brrt i'm just not sure how to do it
11:06 jnthn The current BB choices are ideal for what spesh does
11:06 brrt uhuh....
11:07 brrt well, i'd think the jit bb 'view' would be largely a view of smaller bb's than the spesh bbs
11:07 jnthn Is there a case where JIT BB view wouldn't simply take the spesh BBs and then break some of them up?
11:09 brrt no, there is no such case, i think
11:10 brrt well, there may be in the future, when we're going to do jit-specific optimizations
11:10 jnthn Aye, though let's make it work first :)
11:11 * brrt is wondering about it
11:13 brrt ok, one of the more significant challenges is that it is not a-priori (without knowledge of template structure) possible to determine where the blocks are 'split'
11:13 timotimo why is this so hard :P
11:14 jnthn Compilers have hard parts :P
11:14 brrt e.g. bindat_o may (usually) call MVM_repr_bindat_o or whatever it is called; breaking the basic block; it may also not do so
11:15 brrt sp_p6oget_i breaks the basic block because it contains a conditional, although the conditional is 'value-conditional'
11:15 timotimo bindpos, probably
11:15 brrt i've so far dealt with this by ignoring it
11:15 brrt :-)
11:16 brrt so, my point is, i get an instruction, and only after i read the template, i could split the tree into 'basic blocks'
11:16 brrt yes, this is all a sick perversion of compiler logic
11:16 brrt bear with me
11:17 brrt if i did want to split the thing into basic blocks, or something like that, i might better do that in an analysis phase
11:17 brrt .... which is, ultimately, i guess, my point
11:18 brrt the whole idea of translating basic blocks into expressions was because basic blocks are supposed to be uninterrupted flows of values
11:20 brrt only for so far that this is impossible - which is in no way true of the 'broken' flows in individual templates, do we need to break the tree
11:28 brrt it may nevertheless be a good idea to divide, or number, the 'blocks' in the tree
11:29 brrt as a way to help in optimization and/or register allocation
11:31 jnthn Essentially, just 'cus something has no control flow at a the Moar op level doesn't mean the JITted result won't have internal control flow due to things like deopt and C calls.
11:32 brrt right :-)
11:33 jnthn So yeah, the best you can say about a BB before applying templates is that the only types of control flow you'll end up with is the sorts that a template can introduce.
11:33 brrt but the question (for me) is which of these are problematic and which are not
11:33 * brrt nods
11:37 jnthn grmbl
11:37 jnthn So charrange actually ord's the chars
11:37 jnthn Right before the NFA engine ever gets to see them
11:38 jnthn *Before
11:38 jnthn otoh, synthetics are kinda meaningless there
12:12 dalek MoarVM: 7bd9176 | jnthn++ | src/6model/reprs/NFA.c:
12:12 dalek MoarVM: Provide a way for NFA to be given synthetics.
12:12 dalek MoarVM:
12:12 dalek MoarVM: We now accept a string (and take its first grapheme, which may be a
12:12 dalek MoarVM: synthetic) as well as an int (always a non-synthetic codepoint).
12:12 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7bd917620c
12:22 dalek MoarVM: 79c5dc8 | jnthn++ | src/6model/reprs/NFA. (2 files):
12:22 dalek MoarVM: Clarify what's graphemes and not in NFA.
12:22 dalek MoarVM:
12:22 dalek MoarVM: No functional changes, just brings a little more clarity.
12:22 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/79c5dc8292
12:40 dalek MoarVM: a5b14eb | jnthn++ | src/6model/reprs/NFA.c:
12:40 dalek MoarVM: Serialization of synthetic graphemes in NFA.
12:40 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a5b14ebdee
12:40 jnthn OK, that plus an unpushed NQP patch fixes one of the two NFA bugs I wanted to take on today :)
12:41 brrt \o/
12:41 brrt what... is NFA again?
12:42 jnthn Nondeterministic Finite Automaton
12:42 jnthn The thingy we used for Longest Token Matching in grammars
12:43 timotimo do we have a clever thing for scanning with NFAs? probably not. but also, how common is scanning a regex that starts with an alternation?
12:45 brrt ah, that was logical
12:46 jnthn timotimo: not yet
12:46 jnthn lunch; bbiab
12:48 timotimo i think other things may be much more helpful for improving our regex performance
12:54 brrt in soviet russia, regex performance improves you!
13:06 jnthn .oO( Regex performance is just like doping )
13:12 brrt too much of it kills?
13:13 brrt everybody wants it but nobody will admit to it?
13:54 jnthn nqp: /<[\r\n..\r\n]>/
13:55 jnthn o.O
13:56 camelia joined #moarvm
13:57 camelia nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 193.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤Server error occurred! Closing Link: ns1.niner.name (Quit: camelia)␤Lost connect…»
13:57 camelia ..nqp-moarvm: OUTPUT«Illegal range endpoint in regex: \n..\r at line 2, near ">/"␤   at gen/moar/stage2/NQPHLL.nqp:521  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQPP6QRegex.nqp:1182  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQ…»
13:57 camelia ..nqp-jvm: OUTPUT«(signal ABRT)#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤# An error report file with more information is saved as:␤# /tmp/jvm-10882/hs_error.log␤»
13:59 jnthn nqp: say("D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]")
13:59 timotimo you should really not use "nqp:" :)
14:00 jnthn yeah, apparently not :)
14:00 jnthn d'oh
14:00 camelia joined #moarvm
14:00 jnthn nqp-m: say("D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]")
14:01 camelia nqp-moarvm: OUTPUT«Ḍ̇␤»
14:01 camelia ..nqp-jvm: OUTPUT«#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤# An error report file with more information is saved as:␤# /tmp/jvm-11837/hs_error.log␤»
14:01 camelia ..nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 193.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤Server error occurred! Closing Link: ns1.niner.name (Client Quit)␤Lost connectio…»
14:01 camelia nqp-moarvm: OUTPUT«Ḍ̇␤»
14:02 jnthn nqp-m: /<[Ḍ̇..F]>/
14:02 camelia nqp-moarvm: OUTPUT«Illegal reversed character range in regex: Ḍ̇..F at line 2, near ">/"␤   at gen/moar/stage2/NQPHLL.nqp:521  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQPP6QRegex.nqp:1202  (/home/camelia/rakudo-m-inst-2/shar…»
14:02 jnthn nqp-m: /<[Ḍ̇..\xFFF]>/
14:02 camelia nqp-moarvm: OUTPUT«Illegal reversed character range in regex: Ḍ̇..\xFFF at line 2, near ">/"␤   at gen/moar/stage2/NQPHLL.nqp:521  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQPP6QRegex.nqp:1202  (/home/camelia/rakudo-m-inst-2/…»
14:02 jnthn nqp-m: /<[Ḍ̇..\x2FFF]>/
14:02 camelia nqp-moarvm: ( no output )
14:03 timotimo what does it even mean to have a character range with a synthetic included as an endpoint
14:04 jnthn timotimo: Nothing useful, which is why I've just written a patch to explicilty forbid it :)
14:05 timotimo good!
14:05 timotimo my patch runs cleanly through the spec tests
14:05 timotimo and it's pushed
14:05 brrt \o/
14:07 jnthn OK, now for the actual bug I wanted to fix...
14:15 diakopter joined #moarvm
14:15 sivoais joined #moarvm
14:17 sivoais joined #moarvm
14:49 dalek MoarVM: c79bd27 | jnthn++ | src/6model/reprs/NFA. (2 files):
14:49 dalek MoarVM: Teach NFA about ignoremark charrange case.
14:49 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c79bd27cc4
15:39 Ven_ joined #moarvm
15:57 psch jnthn: what i don't see at the moment is how i can check if a given arg is actually a container in MVM_multi_cache_{add,find}
15:58 psch jnthn: as in, calling MVM_6model_container_iscont_i segfault if i give it .arg.o of an actual native
15:58 psch +s
15:58 jnthn psch: A native ref is an object
15:58 psch that's assuming i'm not misunderstanding that *_lex_refs are still containers...
15:58 psch ooh
15:58 jnthn psch: They are, but you won't be in the native path there
15:58 psch right
15:59 jnthn So yeah, you're likley passing a plain old int along tos omething expecting a pointer :)
15:59 jnthn *to something
15:59 psch yeah, IS_CONCRETE(0x1)...
16:00 psch ah, right, it already checks for != MVM_REPR_ID_NativeRef...
16:07 zakharyas joined #moarvm
16:11 hoelzro o/ #moarvm
16:16 Ven_ joined #moarvm
16:16 harrow joined #moarvm
16:17 zakharyas joined #moarvm
16:24 zakharyas joined #moarvm
16:25 pyrimidine joined #moarvm
16:41 Ven__ joined #moarvm
16:47 domidumont joined #moarvm
16:56 Ven_ joined #moarvm
18:33 kjs_ joined #moarvm
19:02 TimToady m: loop (my ($i, $j); $i < 3; $i, $j Z+= 1, 0.1) { say "$i $j"; if $++ > 10 { say "oops"; last } };
19:02 camelia rakudo-moar 79b68b: OUTPUT«Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/6GkHUMk3Yw:1␤Use of uninitialized value $i of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block  at /t…»
19:03 TimToady woohps
19:03 TimToady ww
19:28 camelia joined #moarvm
19:44 Ven_ joined #moarvm
19:55 Ven__ joined #moarvm
20:15 Ven_ joined #moarvm
20:17 kjs_ joined #moarvm
20:30 Peter_R joined #moarvm
21:32 Ven_ joined #moarvm
21:34 colomon joined #moarvm
21:45 hoelzro nwc10: how do you run the address sanitizer on roast tests? I want to pick up that callsite ownership stuff I was doing before I left for Japan, but your paste demonstrating the double free I caused is no longer active =/
21:47 zakharyas joined #moarvm
21:59 timotimo hoelzro: you just build moarvm with --asan and the address sanitizer will "be on" for everything moar does
21:59 timotimo if i understand your question right
22:00 hoelzro timotimo: that doesn't look familiar; will that detect double frees? that's really what I'm going for
22:01 hoelzro although valgrind will probably catch it too
22:03 timotimo it ought to catch double frees, yeah
22:04 timotimo basically, asan is valgrind but faster (and not quite as thorough)
22:04 hoelzro ahhh
22:04 psch and clang instead of any cc
22:04 hoelzro I need clang for asan?
22:04 psch i thought so at least, isn't it a clang extension?
22:04 hoelzro and how does asan report double frees? abort()?
22:05 psch ah, gcc 4.8+ has it too
22:09 kjs_ joined #moarvm
22:23 kjs_ joined #moarvm
22:43 psch hm, either i'm not hitting spesh with my multicache changes or it doesn't need any changes to support them...
22:49 kjs_ joined #moarvm
22:52 psch ah, but Scalar.WHICH now segfaults... :l
22:55 colomon joined #moarvm
22:59 lizmat joined #moarvm
23:10 psch it apparently segfaults when having a contspec for Scalar and trying to call the can_store of that contspec..?
23:11 psch https://gist.github.com/peschwa/34d7f556fa56580c3ddc is an mvm and rakudo diff, as well as the FAILing roast tests with both applied, in case anyone has an idea what i might be doing wrong...
23:42 Ven_ joined #moarvm

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