Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-05-27

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

All times shown according to UTC.

Time Nick Message
00:13 japhb joined #moarvm
00:30 timotimo maybe i'll look into jitting newexception, bindexpayload, bindexcategory and throwdyn
00:30 timotimo then THROW could be jitted
00:30 timotimo for now, i'm going to go to bed
00:31 timotimo and tomorrow i'll investigate what costs us the most in the recursion-based benchmark
00:44 vendethiel joined #moarvm
00:49 colomon joined #moarvm
01:07 timotimo nqp::ordat currently only does the "if it's an NFG synthetic, look up its base character" thing in the interp, but not in the jitted version i'm afraid. we'll need to fix that soon.
01:12 vendethiel joined #moarvm
01:24 colomon joined #moarvm
02:19 vendethiel joined #moarvm
05:34 * TimToady back home, after driving through yosemite, great time of year to see the waterfalls, despite the drought
05:56 [Coke] Welcome back.
06:56 FROGGS joined #moarvm
07:00 FROGGS jnthn: do you remember that I said that the current RESTRICTED setting should be improved by disallowing certain nqp ops directly
07:02 FROGGS jnthn: that's what digged into yesterday... and since re-registering nqp ops is not enough because of the precompiled setting itself, I implemented a safety mode for MoarVM
07:02 FROGGS jnthn: ops get annotated as ':unsafe' in oplist, and if we are running in safe mode we bail out when such an op is hit
07:03 jepeway joined #moarvm
07:04 FROGGS jnthn: I'll probably push to a branch today, though, I need to get restricted stuff lexically correct too, so that one can EVAL in safe mode
07:10 vendethiel joined #moarvm
07:10 FROGGS hmmm, I wonder if it makes more sense to remove the annotations from oplist, and add a macro to the unsafe ops in interp.c directly
07:11 FROGGS so we dont have to check safe ops every time
07:13 FROGGS not that there is a major slowdown atm, but still
07:37 zakharyas joined #moarvm
07:41 jnthn FROGGS: I agree the VM is the right place to put restrictions
07:41 nwc10 jnthn: better luck with coffee this morning?
07:43 jnthn nwc10: yes :)
07:50 FROGGS well, this works, though it is a little bit too late for a setting:
07:50 FROGGS m: use nqp; use QAST:from<NQP>; BEGIN { QAST::MASTOperations.add_core_op('openpipe', -> | { die "!!!" }) }; nqp::openpipe("wc -l")
07:50 camelia rakudo-moar c2a57e: OUTPUT«===SORRY!===␤!!!␤»
07:50 FROGGS but if we have ops like: nqp::unsafedisable() and nqp::unsafeenable, we can forbid in user code
07:50 FROGGS forbuid these*
07:51 FROGGS hmpf
07:51 jnthn We need to figure out how static/dynamic this is meant to be
07:51 jnthn Scoping wise, I mean
07:52 FROGGS I hope we can make this lexically work
07:52 FROGGS ohh, I see
07:52 jnthn Well, it's not that simple
07:52 FROGGS aye
07:52 FROGGS that's what I figured :o)
07:52 jnthn 'cus of course the Perl 6 open sub will be lexically fine
07:52 FROGGS yeah
08:07 vendethiel joined #moarvm
08:48 Ven joined #moarvm
09:23 vendethiel joined #moarvm
09:33 arnsholt joined #moarvm
09:35 nwc10 joined #moarvm
09:42 zakharyas joined #moarvm
10:02 zakharyas joined #moarvm
10:30 vendethiel joined #moarvm
11:13 Ven joined #moarvm
11:35 zakharyas joined #moarvm
11:51 FROGGS $ MVM_UNSAFE_DISABLE=1 perl6 -e 'pipe("wc -l").close'
11:51 FROGGS Operation 'openpipe' is unsafe you useless lump!
11:51 FROGGS in block <unit> at -e:1
11:51 FROGGS https://gist.github.com/FROGGS/8800bcf38edca105618c
11:54 FROGGS though, that does not cover the case where we want to disable unsafe ops in a given scope
12:03 timotimo hm, so do we implement the proper locking for lazy deserialization while jnthn recovers?
12:27 dalek MoarVM: af16b82 | timotimo++ | src/jit/graph.c:
12:27 dalek MoarVM: a bunch of reprops were missing from op_to_func.
12:27 dalek MoarVM:
12:27 dalek MoarVM: thanks, smls++
12:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/af16b8206e
12:27 dalek MoarVM: ce0d3eb | timotimo++ | src/jit/graph.c:
12:27 dalek MoarVM: implement ordfirst in the jit
12:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ce0d3eb357
12:37 travis-ci joined #moarvm
12:37 travis-ci MoarVM build failed. Timo Paulssen 'a bunch of reprops were missing from op_to_func.
12:37 travis-ci http://travis-ci.org/MoarVM/MoarVM/builds/64244752 https://github.com/MoarVM/MoarVM/compare/5ddab9a43dce...af16b8206e52
12:37 travis-ci left #moarvm
12:43 travis-ci joined #moarvm
12:43 travis-ci MoarVM build failed. Timo Paulssen 'implement ordfirst in the jit'
12:43 travis-ci http://travis-ci.org/MoarVM/MoarVM/builds/64244767 https://github.com/MoarVM/MoarVM/compare/af16b8206e52...ce0d3eb3576b
12:43 travis-ci left #moarvm
12:57 FROGGS joined #moarvm
12:58 timotimo hm
13:10 dalek MoarVM: 41b5dd2 | timotimo++ | src/ (3 files):
13:10 dalek MoarVM: add missing reprconv functions for the jit
13:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/41b5dd2616
13:19 travis-ci joined #moarvm
13:19 travis-ci MoarVM build passed. Timo Paulssen 'add missing reprconv functions for the jit'
13:19 travis-ci http://travis-ci.org/MoarVM/MoarVM/builds/64250128 https://github.com/MoarVM/MoarVM/compare/ce0d3eb3576b...41b5dd2616db
13:19 travis-ci left #moarvm
13:21 timotimo phew.
13:22 timotimo sorry for keeping moarvm dead for an hour >_>
13:22 timotimo i really should have tried building before pushing
13:22 timotimo when will i learn?!
13:25 brrt joined #moarvm
13:25 brrt \o
13:25 brrt timotimo
13:25 brrt we need a better solution, i think, for op_to_func
13:25 brrt maybe a precompiled table
13:26 timotimo that sounds sensible
13:27 brrt hmmmm
13:27 brrt if you'd have a string, you could encode enough information on what arguments to pass, even
13:28 brrt you could do something like
13:30 timotimo such an approach would surely reduce code size
13:30 brrt for MoarVM, or from the JITted code?
13:30 * brrt would think for the former
13:32 timotimo yes, only the former
13:33 brrt say, wval, would have { &MVM_sc_get_sc_object, "TCl1l2:P0" }; meaning first TC, then first register as a small literal, second register as a small literal, and the result as a pointer to the register indicated at 0
13:34 brrt eh not first register, first constant value
13:34 brrt first opcode parameter :-)
13:34 brrt i'm confused
13:34 brrt maybe it's better as:
13:34 brrt "TC l1 l2:P0" - why not add spaces all the time
13:35 timotimo yeah
13:35 timotimo we have ourselves a little interpreter
13:35 timotimo maybe we should JIT that!
13:35 brrt don't get carried away :-P
13:35 brrt but we loop anyway
13:35 brrt and this adds for a much more concise encoding
13:35 brrt *allows
13:36 timotimo also a bit harder to see if something wrong ... or maybe easier?
13:36 brrt harder, yes
13:37 timotimo well, it's less noise
13:37 brrt hmm
13:38 brrt the question is also whether we can nicely encode all possiblities in a readable manner
13:38 brrt and some things, of course, don't fit, and won't
13:38 timotimo right.
13:43 timotimo Your test run exceeded 50 minutes.
13:44 timotimo ;(
13:44 brrt wow
13:44 brrt many non-wow
13:45 timotimo oh
13:45 timotimo that was meant for #perl6
13:45 timotimo that's from perl6-examples
13:47 timotimo god damn it, those gen2 roots
13:47 timotimo masak's "send-more-money-subs" benchmark does 23233 collections
13:48 timotimo it starts out at 17782 gen2 roots (after the initial 2 GC runs that are a bit more intense) and 6.72ms
13:48 timotimo it goes up to 86264 gen2 roots taking 27.37ms
13:49 brrt uhm
13:49 brrt that is quite a bit
13:50 timotimo yes
13:51 timotimo i don't really know what kinds of things end up getting a gen2 root
13:51 timotimo but still; GC only accounts for 22.5% of the run time of that program
13:51 * brrt thinks perl6 needs tracing before it will perform properly
13:52 timotimo and we run 7% of all frames interpreted and 36% spesh'd
13:52 timotimo meaning 57% jitted
13:52 brrt why? because tracing can turn this stuff into jumps
13:52 timotimo not to speak of the 5.6% frames that get deopted
13:52 brrt 5,6% on a program like that?
13:52 brrt wow
13:52 timotimo "this stuff"?
13:53 timotimo 17833667 entries to gimme, 4.62% exclusive time spent there, about 4/5th or so interpteted
13:54 timotimo of course, the topmost four routines are from CORE.setting around line 10k, which is where ListIter's stuff lies
13:54 brrt 'this stuff' => cross-frame control flow stuff
13:54 brrt which is *surprisingly* common in perl6
13:54 timotimo anon, anon, anon, gimme, anon, bind, bind_one_param, reify, map, FOR, find_method, WHICH, map
13:54 timotimo that's the order of routines by exclusive time
13:54 timotimo after that comes another reify
13:55 timotimo bind_one_param accounts for 4.09% at 33764537 entries
13:55 timotimo and is 100% interpreted
13:55 brrt bind_one_param is probably param_*_* isn't it?
13:55 timotimo i don't know, tbh
13:56 timotimo you mean "gets bailed by"?
13:56 brrt yes, and also 'mostly consists of such calls'
13:56 timotimo i'm now waiting for chrome to let me into the OSR/Deopt tab
13:56 timotimo you can find bind_one_param in BOOTSTRAP inside rakudo
13:56 brrt masak++ for giving us work to do
13:56 timotimo ISTR seeing iscont_* in there, too; i don't think we jit that yet
13:56 timotimo oh holy wow
13:57 timotimo the king of deopts is a BUILD, at 4838400 deopts
13:57 timotimo um ... that's from Enum ?!?
13:57 timotimo method BUILD($!key, Mu $!value) { self }
13:58 brrt huh
13:58 brrt you sure we don't JIT iscont_*?
13:58 timotimo not sure
13:59 timotimo another one is MapIter's BUILD, at m-CORE.setting:10062
14:06 masak whu'? I've given this channel work to do as well? :)
14:07 masak oh, GC stuff.
14:07 masak well. you're welcome.
14:09 timotimo :)
14:09 timotimo brrt: FWIW, the "dynamic optimization" times usually turn up in the 0.* % range
14:09 timotimo so making the jit much faster isn't worth that much at this point, i suppose
14:10 timotimo though ... i don't know about the start-up time of short scripts
14:11 brrt ah, well, that's good to know
14:11 brrt so i can just hang llvm in there and it'll be ok? :-P
14:12 * brrt already knows LLVM will get a special slide in his presentation (if any)
14:12 brrt the question is
14:12 brrt how on earth to add 'art' to a talk about JITs
14:13 timotimo :P
14:13 timotimo art as in art?
14:13 brrt art as in art + engineering
14:13 timotimo mhm
14:13 brrt right
14:13 timotimo good question
14:14 brrt not art as in the last 3 letters of my name
14:14 brrt i don't think that'll do
14:14 timotimo :)
14:15 timotimo now i ran -e 'say "hello!"' and profiled the compilation of that and dynamic optimization takes 5% of the compilation time
14:16 masak brrt: if making a JIT isn't a completely mechanical, robotic process, there's art in there somewhere. you just have to expose it to us, the audience.
14:17 brrt well... but i've been able to hide my robotic nature for so long
14:18 brrt but i see your point
14:18 brrt :-)
14:22 * masak is reminded that he should submit a YAPC::EU talk too
14:32 timotimo will it be something specifically about perl6, or are you going to trick people into seeing a perl6 related talk? :P
14:33 timotimo masak: i'd still love to get a timing of send-more-money-loop with latest rakudo :)
14:34 timotimo i think i'll bump MOAR_REVISION and NQP_REVISION to get the op_to_func fixes into rakudo
14:35 nwc10 timotimo: please do a full build and spectest *before* commit that
14:35 nwc10 because for me currently the spectest hangs on MoarVM head, for 3 tests
14:36 timotimo oh?
14:36 timotimo damn >_<
14:36 nwc10 oh yes.
14:37 timotimo ah, yes, the async tests that are waiting for jnthn's lazy deserialization fix
14:38 timotimo do you think i should revert the nqp MOAR_REVISION bump, too?
14:42 masak timotimo: patience, grasshopper.
14:42 timotimo mhm
14:42 masak need to decommute first :)
14:42 timotimo i'm a bit impatient in general, aren't i?
14:42 timotimo on the other hand, i sort of tend to take a looong time to do stuff i announce or speculate about :)
14:43 timotimo feels a bit like a double standard
14:44 brrt well... that's just open source, isn't it
14:44 brrt :-)
14:50 timotimo hm
14:50 timotimo anyway, walk &
14:51 brrt see you :-)
15:21 zakharyas1 joined #moarvm
15:32 brrt left #moarvm
16:12 vendethiel joined #moarvm
16:50 vendethiel joined #moarvm
17:01 * timotimo is back
17:40 FROGGS joined #moarvm
17:40 brrt joined #moarvm
17:45 * masak too
17:46 masak timotimo: ok, so just build latest rakudo and re-run version A?
17:46 timotimo yes
17:46 timotimo no versiom b
17:47 timotimo i did not touch A
18:03 timotimo masak: i expect the problem that makes A so terrifyingly slow is GLR-related
18:04 masak oki
18:07 timotimo and those blasted gen2 roots that i haven't put any time into understanding
18:08 timotimo though ihave no actual evidence tthat it's more than just corellation
18:11 masak "correlation" ;)
18:12 masak hm, are there other roots than gen2 roots?
18:12 masak or are all roots gen2 roots?
18:15 timotimo nah, those are the inter-generational roots
18:16 Peter_R joined #moarvm
18:16 timotimo er, i think so at least
18:26 masak timotimo: wohoo!
18:26 masak timotimo: down from 22 seconds to 15! \o/
18:32 FROGGS is there something in moarvm that carries information along a call chain... but is not a dynamic variable in P6 land?
18:32 FROGGS something cheap?
18:33 jnthn 'fraid not
18:33 FROGGS :/
18:34 jnthn Though we do cache dynamic variables to decrease their cost
18:34 FROGGS yes, that's what I was about to ask
18:57 jnthn Somebody in backlog mentioned picking up on my serialization race fix
18:57 jnthn https://gist.github.com/jnthn/75c041af8f6a13bf5638 is as far as I got
18:57 jnthn Unfortunately, the patch hangs Rakudo at startup and noms loads of memory
18:58 jnthn Uh, and there's some communt out lines
18:58 nwc10 in C99 style
18:58 jnthn Anyway, anyone is free to pick it up and explore
18:59 jnthn nwc10: Yeah, I use those 'cus MSVC tolerates them and they stand out enough in review that I don't accidentally commit them :)
18:59 nwc10 that was roughly my assumption - they're "XXX"-like comments
18:59 nwc10 it works well
19:00 brrt joined #moarvm
19:08 * brrt uses those comments in dynasm because dynasm is otherwise frustrated
19:09 brrt oh, and what is more
19:09 brrt we do jit iscont_*
20:33 colomon joined #moarvm
20:35 timotimo brrt: would you like to whip up something to fix up ordat and ordfirst?
20:35 timotimo ah, good
20:36 brrt sorry, what, i wasn't paying attention
20:36 timotimo i wonder if we spesh iscont_*, too
20:36 brrt whats wrong with ordat and ordfirst
20:36 brrt they're just function calls, aren't they?
20:36 timotimo ordat and ordfirst have to check if the result is negative, and if so, get the base of the synthetic grapheme
20:36 timotimo they have been "enhanced" recently
20:36 brrt ah
20:36 brrt i see
20:36 timotimo i was thinking about just making a for-the-jit function that does what the interpreter does at that point
20:37 timotimo but maybe we can make something cheap inside graph.c
20:37 brrt yes, i wonder about that
20:37 brrt it would be quite handy to have 'go to completion' in emacs
20:37 brrt eh go to definition
20:41 brrt what, why do we upcast MVM_string_get_grapheme_at_nocheck and then downcast it again
20:42 brrt that costs us.. nothing on x64, though
20:42 brrt anyway
20:42 brrt we can hack up something cheap, yes
20:43 brrt let me get my sketchpad first
20:45 brrt nope, i'm wrong
20:45 brrt oh, no, i'm right
20:45 brrt hmmm
20:45 brrt i'm confused
20:45 brrt is what i am
20:46 brrt argh
20:47 lizmat timotimo: fwiw, I made next/last/redo even simpler multi's
20:47 brrt i need one extra register
20:47 lizmat and I just made THROW a multi
20:47 brrt then i can do a graph version
20:47 brrt now i need to change them into primitives
20:48 brrt (i can't get extra registers for free just like that :-()
20:49 brrt because JIT_RV_DEREF, which I don't think we *ever* use, can just read the base
20:49 * lizmat tries to pun a register
20:55 brrt long story short
20:55 brrt you can do it from graph.c
20:55 brrt it is a hack
20:55 brrt i'm not 100% sure it will hold, because of label logic
20:55 brrt it's not very difficult to write in ASM
20:56 * brrt should probably check how label logic is implemented again
20:58 brrt ok, labels should not be a problem
21:00 timotimo thank you for looking into it :)
21:08 brrt thats what i'm for :-)
21:08 brrt well, not all i'm for
21:08 brrt but you get the point
21:11 brrt emacs has semantic mode
21:11 brrt many wow
21:11 brrt (like whitespace-mode, i wonder how i never heard of that)
21:12 brrt tech analysts, where 20% year over year growth is called 'stalling'
21:13 brrt in env sci, 20% yoy growth is called 'a disaster'
21:17 * brrt bbiab
21:47 vendethiel joined #moarvm
21:57 colomon joined #moarvm
22:31 vendethiel joined #moarvm
23:00 vendethiel joined #moarvm
23:29 timotimo brrt, is there anything in our way for jitting "throw"?
23:30 timotimo throwdyn, that is.
23:31 timotimo throwdyn isn't marked :throwish, i wonder why?

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