Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-03-21

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

All times shown according to UTC.

Time Nick Message
03:15 colomon joined #moarvm
03:58 vendethiel joined #moarvm
04:02 FROGGS_ joined #moarvm
04:25 vendethiel joined #moarvm
05:39 vendethiel joined #moarvm
06:26 vendethiel joined #moarvm
06:51 vendethiel joined #moarvm
08:08 lizmat joined #moarvm
08:26 vendethiel joined #moarvm
09:27 vendethiel joined #moarvm
09:27 kjs_ joined #moarvm
09:55 vendethiel joined #moarvm
10:56 FROGGS[tab] joined #moarvm
11:10 Ven joined #moarvm
11:26 rurban_ joined #moarvm
11:37 dalek joined #moarvm
12:52 Ven joined #moarvm
13:31 zakharyas joined #moarvm
13:34 Ven joined #moarvm
14:14 Ven joined #moarvm
14:38 kjs_ joined #moarvm
14:45 Util joined #moarvm
14:56 dalek MoarVM/frame-gc-opts: 6adf362 | jnthn++ | src/core/frame. (2 files):
14:56 dalek MoarVM/frame-gc-opts: Add flag for when a frame references gen2 only.
14:56 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/6adf362e77
14:56 dalek MoarVM/frame-gc-opts: 0428562 | jnthn++ | src/ (2 files):
14:56 dalek MoarVM/frame-gc-opts: Add write barrier macros for frames.
14:56 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/0428562f5d
14:56 dalek MoarVM/frame-gc-opts: ef48dd1 | jnthn++ | src/ (7 files):
14:56 dalek MoarVM/frame-gc-opts: Add frame barriers for various lexical writes.
14:56 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/ef48dd152f
15:01 dalek MoarVM/frame-gc-opts: 11a54a5 | jnthn++ | src/gc/roots.c:
15:01 dalek MoarVM/frame-gc-opts: Initial, simple use of the frame gen 2 only flag.
15:01 dalek MoarVM/frame-gc-opts:
15:01 dalek MoarVM/frame-gc-opts: This just uses it to elide scan_registers, which is the easiest thing
15:01 dalek MoarVM/frame-gc-opts: we can do with it though with the least benefit. It will, however, let
15:01 dalek MoarVM/frame-gc-opts: us see if there are any bugs with the frame write barrier stuff so far,
15:01 dalek MoarVM/frame-gc-opts: and saves enough time to pay the cost of the barrier.
15:01 dalek MoarVM/frame-gc-opts:
15:01 dalek MoarVM/frame-gc-opts: The next step will be to raise it to cover the MVMFrame overall; the
15:01 dalek MoarVM/frame-gc-opts: end goal is to eliminate refs_frames on REPRs, and vastly reduce the
15:01 dalek MoarVM/frame-gc-opts: size of the inter-generational set.
15:01 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/11a54a5ce3
15:03 jnthn If anybody would like to run a test on this, it'd be appreciated
15:04 jnthn You also need the moar-gen2-frame-opts branch
15:04 jnthn (in Rakudo)
15:04 jnthn It's not really an improvement *yet*, except we seem to pay off the cost of the new barriers.
15:05 jnthn We elide 6.1 million register scans during the Rakudo CORE.setting build
15:17 rurban_ joined #moarvm
15:18 timotimo i'm glad this gets some attention
15:19 timotimo huh, what. when i panda rebootstrap i get write string requires an object with REPR MVMOSHandle
15:19 timotimo for pretty much every test
15:28 kjs_ joined #moarvm
15:49 Ven joined #moarvm
16:16 timotimo well, at least the module tests explode with MVM_SERIALIZATION_LAZY defined to be 0
16:16 timotimo so that's apparently not that?
16:17 jnthn timotimo: FROGGS++ did an ecosystem test with that in place
16:18 timotimo do we know what causes the problem?
16:19 jnthn I didn't know there was a problem until you mentioned it a moment ago
16:19 timotimo ah
16:21 jnthn I see the issue here also
16:22 timotimo well, better than "cannot write_string with REPR MVMOSHandle" would be :P
16:22 jnthn No idea what it si
16:22 jnthn *is
16:22 jnthn Yeah, that's what I get
16:23 timotimo i'm bisecting (more or less) rakudo right now
16:23 jnthn ok
16:23 jnthn It failed a clean bootstrap also
16:24 timotimo you mean a panda bootstrap? or a nqp bootstrap?
16:24 jnthn panda
16:24 timotimo yeah, that does fail
16:25 jnthn All NQP/Rakudo stuff looks fine
16:25 timotimo on my machine also, i mean
16:25 jnthn spectest run was good
16:25 timotimo correct
16:26 timotimo on edb5d9f panda is happy
16:27 timotimo interesting
16:27 timotimo your $*VM commit triggers the problem
16:28 jnthn wtf
16:28 timotimo yes, very
16:28 jnthn With the installed perl6-m I can do -e "use Test; plan 42" and it works just fine
16:29 timotimo it may be necessary to load another extra module
16:31 jnthn Adding a use NativeCall doesn't trigger it
16:31 jnthn uh
16:31 jnthn Yeah, doesn't. Either before or after the "use Test"
16:34 kjs_ joined #moarvm
16:40 dalek MoarVM: 7955cee | fperrad++ | src/moar.h:
16:40 dalek MoarVM: fix for ARMv5
16:40 dalek MoarVM:
16:40 dalek MoarVM: When cross compiling for ARMv6, all works fine with `libatomic_ops`.
16:40 dalek MoarVM:
16:40 dalek MoarVM: For ARMv5, the linking fails with :
16:40 dalek MoarVM: ```
16:40 dalek MoarVM: linking moar
16:40 dalek MoarVM: arm-none-linux-gnueabi-gcc -o moar -O2 -DNDEBUG -Wl,-rpath,/usr/lib src/main.o -L. -lmoar
16:40 dalek MoarVM: ./libmoar.so: undefined reference to `AO_compare_and_swap_full'
16:40 dalek MoarVM: ./libmoar.so: undefined reference to `AO_fetch_compare_and_swap_full'
16:40 dalek MoarVM: ./libmoar.so: undefined reference to `AO_fetch_and_sub1_full'
16:41 colomon joined #moarvm
17:33 dalek MoarVM: bba0d8c | (Francois Perrad)++ | Configure.pl:
17:33 dalek MoarVM: Configure: add an option --ar
17:33 dalek MoarVM:
17:33 dalek MoarVM: currently, the option --cc and --ld are available, but it is not enough when cross-compiling.
17:33 dalek MoarVM:
17:33 dalek MoarVM: the current workaround is:
17:33 dalek MoarVM: ```
17:33 dalek MoarVM: $ make AR=<ar>
17:33 dalek MoarVM: ```
17:33 dalek MoarVM: but the right way must be:
17:33 dalek MoarVM: ```
17:33 dalek MoarVM: $ perl Configure --ar <ar>
17:47 colomon joined #moarvm
17:51 kjs_ joined #moarvm
18:01 kjs_ joined #moarvm
18:11 timotimo that's quite the commit message!
18:14 tadzik oh!
18:14 tadzik that might help Perl 6 on Sailfish
18:21 kjs_ joined #moarvm
18:27 colomon joined #moarvm
18:31 camelia joined #moarvm
18:41 colomon joined #moarvm
18:48 FROGGS_ Arrr!
18:49 FROGGS_ x.o
18:49 camelia joined #moarvm
18:50 timotimo :)
18:52 camelia joined #moarvm
18:54 Ven joined #moarvm
18:54 camelia joined #moarvm
18:56 camelia joined #moarvm
18:59 camelia joined #moarvm
19:00 TimToady the 👀 have it
19:21 timotimo hark!
19:31 Ven joined #moarvm
21:05 timotimo would people be mad if i wrote some code in the jit compiler to get better code output for the common tc, st, object, objectbody arguments that start pretty much every reprop?
21:07 jnthn Well, depends if it's nice correct code, or nasty busted code... :P
21:08 jnthn Geez MSVC, how many errors can you produce from a one-char typo...
21:11 timotimo i'd just like to have fewer movs
21:11 dalek MoarVM/frame-gc-opts: 64ac9a7 | jnthn++ | src/ (2 files):
21:11 dalek MoarVM/frame-gc-opts: Bring dynlex_cache_name under gen2 frame scheme.
21:11 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/64ac9a7864
21:11 dalek MoarVM/frame-gc-opts: 09c41d7 | jnthn++ | src/gc/roots.c:
21:11 dalek MoarVM/frame-gc-opts: Lift "did we see gen2" code higher.
21:11 dalek MoarVM/frame-gc-opts:
21:11 dalek MoarVM/frame-gc-opts: In preparation for brining more things under the generational frame
21:11 dalek MoarVM/frame-gc-opts: scheme.
21:11 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/09c41d7578
21:12 jnthn timotimo: Yeah, I agree that's a chance to do a bunch better there
21:12 jnthn timotimo: brrt may feel it will make the exprcomp stuff harder, but I'm not sure it will be a big issue
21:12 timotimo i suppose we'll have to wait a bit for the exprcomp stuff
21:13 jnthn Well, that'll be the clean way to do it
21:13 jnthn Anything done now will be a sort of "hack" in a sense
21:13 timotimo i'd tend towards putting in something that'd be very easy to remove again
21:13 timotimo agreed
21:16 timotimo hmm
21:16 timotimo nah, i'll leave that for later
21:18 timotimo great, nqp building says the next op to implement is setelemspos
21:18 timotimo very few arguments, low surprise factor
21:22 dalek MoarVM/frame-gc-opts: d07416b | jnthn++ | src/gc/roots.c:
21:22 dalek MoarVM/frame-gc-opts: Special return data mark not needed on gen2 frames
21:22 dalek MoarVM/frame-gc-opts:
21:22 dalek MoarVM/frame-gc-opts: It is only relevant for those on the call stack, and so already gone
21:22 dalek MoarVM/frame-gc-opts: by the time something is marked as a gen2 only frame.
21:22 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/d07416bc4f
21:22 dalek MoarVM/frame-gc-opts: c29d386 | jnthn++ | src/gc/roots.c:
21:22 dalek MoarVM/frame-gc-opts: Continuation tags are ignorable on gen2 frames.
21:22 dalek MoarVM/frame-gc-opts:
21:22 dalek MoarVM/frame-gc-opts: These are cleared up as a frame is removed from the call stack, which
21:22 dalek MoarVM/frame-gc-opts: is a pre-requisite for being a gen2-only frame anyway.
21:22 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/c29d3866b7
21:22 timotimo 1098 devirt: emitted a setelemspos via jgb_consume_reprop
21:23 timotimo 45 devirt: please implement emitting repr op deletekey
21:23 timotimo worth it? :P
21:23 timotimo 414 devirt: please implement emitting repr op existskey
21:23 timotimo ^- i'll do this one next
21:23 timotimo but first a rakudo build to gather more datas
21:24 dalek MoarVM/jit_devirtualize_reprops_2: 6d9773d | timotimo++ | src/jit/graph.c:
21:24 dalek MoarVM/jit_devirtualize_reprops_2: devirtualize setelemspos
21:24 dalek MoarVM/jit_devirtualize_reprops_2: review: https://github.com/MoarVM/MoarVM/commit/6d9773d050
21:27 timotimo huh, how come existskey is :pure, but existspos isn't?
21:27 timotimo seems like a simple oversight
21:27 jnthn I think so
21:30 dalek MoarVM/frame-gc-opts: db14cae | jnthn++ | src/gc/roots.c:
21:30 dalek MoarVM/frame-gc-opts: Move code ref/static frame mark under gen2 scheme.
21:30 dalek MoarVM/frame-gc-opts:
21:30 dalek MoarVM/frame-gc-opts: Since these are always set at the point of frame creation, no further
21:30 dalek MoarVM/frame-gc-opts: hanlding is needed.
21:30 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/db14cae012
21:32 timotimo it seems like we're already putting a whole bunch less things in the inter-generational set now?
21:35 timotimo i'd like to help figure out why our push_i (likely in cstack or bstack) isn't getting devirt'd
21:35 timotimo would that just be looking at spesh log output?
21:35 timotimo well, i suppose i ought to start with the source code
21:36 jnthn timotimo: Yes, I'd look at spesh log
21:36 jnthn No, we didn't reduce the size of the inter-gen set yet.
21:37 jnthn We are doing less work marking frames the only hang around to be closure outers for a long time, though.
21:37 jnthn This is a precursor to reducing the size of the inter-gen set.
21:37 jnthn (Like, this bit needs to come first.)
21:37 jnthn It's decidedly a case of "the first 80%" also.
21:38 timotimo oh, OK
21:38 timotimo famous 80%
21:39 jnthn I still need to think a little about the second 80%.
21:39 dalek MoarVM/jit_devirtualize_reprops_2: 6ffdced | timotimo++ | src/jit/graph.c:
21:39 dalek MoarVM/jit_devirtualize_reprops_2: devirtualize existspos and existskey
21:39 dalek MoarVM/jit_devirtualize_reprops_2: review: https://github.com/MoarVM/MoarVM/commit/6ffdcedd8a
21:40 jnthn (To find the right factoring for it.)
21:40 dalek MoarVM: b5d57ae | timotimo++ | src/core/oplist:
21:40 dalek MoarVM: mark existspos as pure
21:40 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b5d57aee36
21:42 dalek MoarVM/frame-gc-opts: 8bdff6f | jnthn++ | src/ (2 files):
21:42 dalek MoarVM/frame-gc-opts: Bring context object under gen2 frame scheme.
21:42 dalek MoarVM/frame-gc-opts:
21:42 dalek MoarVM/frame-gc-opts: This one is only ever written in one location in the codebase, so the
21:42 dalek MoarVM/frame-gc-opts: barriering bit is easy for it.
21:42 dalek MoarVM/frame-gc-opts: review: https://github.com/MoarVM/MoarVM/commit/8bdff6f0d5
21:43 jnthn Anyway, there ends the first 80%.
21:43 timotimo now to look at unshift and push again ... with hawk eyes
21:46 timotimo yo jnthn, do we ever remove facts if we've decided the guard that guarantees them has gone unneeded?
21:46 timotimo because i'm afraid relying on types in the jit won't be able to mark a guard as needed because spesh has already thrown out guards that have been deemed unneeded
21:49 jnthn timotimo: um...yeah, phase order strikes again
21:49 timotimo yup, always does
21:50 jnthn But yeah, you're right to be afraid.
21:50 jnthn Which may explain some of the weird errors you've seen.
21:50 jnthn What I suggest is
21:50 jnthn in optimize.c, spot the ops you can de-virt, check if they have a known type, and if so mark the guard as used
21:51 jnthn And leave a comment there saying "the JIT actually de-virts"
21:51 timotimo ah
21:51 timotimo yes, that's a much better design than what i'd've done intuitively right now
21:54 jnthn phew! Glad I was here to answer, then :)
21:54 timotimo we have way, way fewer repr ops that dispatch to optimize_repr_op in spesh than i've put into the consume_repr_op bit in the jit
21:54 timotimo but since that's just to dispatch to a repr's spesh method, it's not that bad
21:57 timotimo i must admit, i feel like i'm constantly and consistently bad at doing this sort of stuff ...
21:58 travis-ci joined #moarvm
21:58 travis-ci MoarVM build failed. Timo Paulssen 'mark existspos as pure'
21:58 travis-ci http://travis-ci.org/MoarVM/MoarVM/builds/55324483 https://github.com/MoarVM/MoarVM/compare/5ef6456c4323...b5d57aee3691
21:58 travis-ci left #moarvm
21:58 timotimo huh
21:59 timotimo also, in spesh bindattr and bindattrs were marked to have their "type" field as the 0th operand, isn't that wrong?
21:59 timotimo bindattr looks like bindattr($target, $CLASS, $attr, $value), no?
22:00 jnthn yes...where do you mean?
22:01 timotimo spesh's optimize.c; the "optimize_repr_op" has a "type operand" argument
22:01 timotimo that decides which operand's facts to check for "known type"
22:01 jnthn Oh
22:01 jnthn But you spesh the bindattr by the type of the object you have
22:01 timotimo oh
22:01 timotimo in that case, my jit implementation is wrong
22:02 jnthn Since it's REPR(target)->bindattr in the normal impl
22:02 jnthn uh, or whatever the function is actually called
22:03 timotimo yeah
22:05 timotimo but can you actually have a different REPR for a class and its superclass?
22:05 jnthn yes
22:05 jnthn It's orthogonal.
22:05 timotimo i mean, we put attributes inherited by a role into the class as visible to the class, so role vs class doesn't apply
22:05 timotimo OK
22:06 jnthn m: say array ~~ Any
22:06 camelia rakudo-moar 0e5632: OUTPUT«True␤»
22:06 jnthn m: say array[int8].REPR; say Any.REPR;
22:06 camelia rakudo-moar 0e5632: OUTPUT«VMArray␤P6opaque␤»
22:06 timotimo oh, good point
22:06 jnthn Yes, it'd be weird on the attribute case, but in general - it comes up.
22:08 timotimo and now to find out if "merge_facts_at_phi" collaborates well with this branch
22:13 timotimo fish: Job 1, “./perl6-m --target=mbc --output=lib/Test.pm.moarvm lib/Test.pm” terminated by signal SIGSEGV (Address boundary error)
22:13 timotimo ;(
22:17 timotimo really. it works fine when run under gdb?
22:19 jnthn vasanalgrind to the rescue!
22:19 timotimo simply gave emit_call_c 6 args, but args[] only had 5 entries
22:22 dalek MoarVM/jit_devirtualize_reprops_2: 5d4fcdc | timotimo++ | src/jit/graph.c:
22:22 dalek MoarVM/jit_devirtualize_reprops_2: bindattr/getattr decide their REPR on their object operand
22:22 dalek MoarVM/jit_devirtualize_reprops_2:
22:22 dalek MoarVM/jit_devirtualize_reprops_2: not the class operand!
22:22 dalek MoarVM/jit_devirtualize_reprops_2: review: https://github.com/MoarVM/MoarVM/commit/5d4fcdc4c0
22:22 dalek MoarVM/jit_devirtualize_reprops_2: b3f729b | timotimo++ | src/spesh/optimize.c:
22:22 dalek MoarVM/jit_devirtualize_reprops_2: spesh's optimize_repr_op must mark type guards used
22:22 dalek MoarVM/jit_devirtualize_reprops_2: review: https://github.com/MoarVM/MoarVM/commit/b3f729b532
22:22 dalek MoarVM/jit_devirtualize_reprops_2: 698efb7 | timotimo++ | src/jit/graph.c:
22:22 dalek MoarVM/jit_devirtualize_reprops_2: fix number of arguments for existspos/existskey
22:22 dalek MoarVM/jit_devirtualize_reprops_2: review: https://github.com/MoarVM/MoarVM/commit/698efb716d
22:30 timotimo weird, with merge_facts_at_phi i get a few more cases of "type unknown" :\
22:32 timotimo but the number of "emitted" reprop devirts changes by only a tiny amount
22:33 ggoebel joined #moarvm
22:44 timotimo how often do we do !cursor_capture?
22:45 timotimo because we push_i into $!bstack four times, which translates to four getattr invocations
22:46 timotimo which translates to four sp_p6ogetvt_o with a spesh slot each
22:46 timotimo doesn't solve the "unknown type" problem of course
22:48 timotimo doesn't seem to influence stage parse either
22:49 timotimo in nqp, is         my $nfa := self.HOW.cache_get(self, $name);
22:49 timotimo any slower than my $nfa := self.^cache_get(self, $name); would be?
22:49 timotimo nqp: say NQPMu.^name
22:49 timotimo without the self, of course
22:50 timotimo nqp-m: say(NQPMu.^name)
22:51 camelia joined #moarvm
22:52 camelia nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 188.␤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…»
22:52 camelia ..nqp-moarvm: OUTPUT«Confused at line 2, near "say NQPMu."␤   at gen/moar/stage2/NQPHLL.nqp:493  (/home/camelia/rakudo-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:921  (/home/camelia/rakudo-inst-2/share/nqp/lib/nqp.moarvm:comp_unit:872)␤ from gen/…»
22:52 camelia ..nqp-jvm: OUTPUT«(signal ABRT)#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤*** Error in `java': double free or corruption (!prev): 0x00007f001001a8c0 ***␤# An error report file with more information is saved as:␤# /tmp/…»
22:52 timotimo also, we look up $?CLASS like four times as well
22:57 timotimo many times in Cursor.nqp, i bet
22:57 timotimo i don't know how expensive getlexperinvtype is, though
22:59 jnthn getlexperinvtype can spesh into a constant
23:00 timotimo ah, that's good to know
23:00 timotimo let me see if it does
23:00 jnthn About self lookup - in many cases it is reduced to a register access
23:00 jnthn (by lex -> loc lowering the NQP compiler)
23:01 jnthn Even if not, lexical access is cheap.
23:01 timotimo OK, good to know
23:02 timotimo in this instance, it seemingly turns into a getspeshslot once and another time it doesn't
23:02 timotimo possibly because of the branch that checks if $!cstack is defined; possibly doesn't get run often enough to get good log data
23:05 timotimo seems like all the !cursor_* methods are very cheap, all in all
23:11 jnthn good to know :)
23:12 jnthn Gonna go rest/recover more... 'night
23:12 timotimo good night!
23:12 timotimo recover well!

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