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