Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-07-03

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

All times shown according to UTC.

Time Nick Message
01:57 samcv exciting. i think i'll have to rewrite a lot of this but should hopefully take what i learned. for the first time got moarvm pulling collation values from the new data set
01:57 samcv tested only single codeponits though. i need to see the best way to deal with the codepoint iterator and *peek* at the next codepoint without messing with the iterator or something
02:08 samcv ack :9
02:08 samcv err :(
02:12 samcv oh i think i just need to use a codepoint iterator not a grapheme iterator. not sure why i was doing this in the first place
04:14 Geth ¦ MoarVM/collation-arrays: 25 commits pushed by (Timo Paulssen)++, (Jonathan Worthington)++, (Samantha McVey)++
04:14 Geth ¦ MoarVM/collation-arrays: review: https://github.com/MoarVM/MoarVM/compare/27ff30efd4...23b5d9ea98
06:23 brrt joined #moarvm
06:24 brrt ohai, i can haz a new finding
06:24 brrt i now believe we're dealing with an overflow in dynamic labels
06:25 brrt why? becuase the disastrous byte sequence is: 75 80, which is interprteed as jne -0x80, and the correct sequence is 75 67, whic is interpreted as jne +0x67
06:26 brrt which means that dynasm is failing to convert it to a wider label for $some-reason
06:49 domidumont joined #moarvm
06:51 brrt joined #moarvm
06:54 domidumont joined #moarvm
07:31 brrt jnthn++ nice post
07:47 zakharyas joined #moarvm
07:47 domidumont joined #moarvm
08:16 brrt (the question is of course, what is the reason!)
08:18 samcv :(
08:19 samcv sounds frustrating
08:19 brrt well, yes...
08:19 brrt all in a days work :-)
08:26 robertle joined #moarvm
08:35 samcv :-)
08:40 samcv \o/ yay. it's pushing it onto the stack in MVM :) feels good
08:40 samcv getting closer
08:40 samcv feels nice putting the code i've been working on and actually having it work inside mvm properly :)
08:41 jnthn morning o/
08:41 jnthn brrt++ samcv++ :)
08:41 samcv morning o/
08:48 brrt moarning jnthn, samcv
08:54 nwc10 good *, *
08:55 brrt ohai nwc10
09:00 samcv ugh somewhere my array gets cleared. now gonna have to add in a whole ton of prints
09:01 samcv well gonna have to add a char * argument to all the functions so i can tell *which* stick is actually printing. otherwise it doesn't help me that much and is a bit confusing
09:25 jnthn If something is getting cleared unexpectedly, you might find data breakpoints useful
10:55 brrt joined #moarvm
11:01 timotimo and rr so you can go forwards *and* backwards while data breakpoints are active
11:03 timotimo one of the problems i was chasing was something was not getting set, so it kept the null value that was set at the beginnig of the frame and not updating it ...
11:04 jnthn Funnily enough, I'm chasing down how a NULL gets passed as an arg at the moment
11:05 timotimo that's me!
11:05 timotimo well, only while profiling
11:05 jnthn This one is in t/qast/01-qast.nqp
11:05 jnthn I actually stumbled upon it by accident while doing spesh logging stuff
11:05 jnthn But figured I should try and work out what's going on, rather than just toss in a null check that shouldn't be needed
11:06 timotimo yup
11:06 timotimo https://github.com/timo/SDL2_raw-p6/blob/master/lib/SDL2/Raw.pm#L427  -  mine dies somewhere in here
11:07 timotimo trying to call .defined on a null
11:09 zakharyas joined #moarvm
11:14 jnthn odd
11:14 jnthn lunch, bbs
11:37 MasterDuke joined #moarvm
11:38 MasterDuke timotimo: don't know if this helps, but here i have a backtrace and valgrind output for a segv when profiling: https://gist.github.com/MasterDuke17/d8872bebdb4551c4d4ebda54682092fd
11:39 timotimo MasterDuke: nothing unusual about the valgrind output
11:43 MasterDuke ah well, hopefully you'll figure it out
11:44 timotimo the segv is most probably because that program had threads and profiling just always explodes once another thread exists
11:44 timotimo and the valgrind messages are from the mast compiler that allegedly writes uninitialized bytes to the file, and the FSA being torn down uncleanly at process termination with --full-cleanup
11:46 MasterDuke that was profile-compiling DrForr's test file, didn't notice that it had threads
11:46 timotimo i think it precompiled some other modules and that uses Proc which now uses Proc:dAsync
11:48 MasterDuke hm, so no way to profile precomp?
11:49 timotimo not until i finally fix whatever problem underlies the profiler blowing up in multithreaded situations
11:51 MasterDuke so we should be good to go by afternoon? ;)
11:52 * jnthn back
11:56 timotimo huh. now i'm profiling some multithreaded snippets and they're not segfaulting
11:57 jnthn duh, found the NULL
11:58 Geth ¦ MoarVM/spesh-worker: 4bb2893d33 | (Jonathan Worthington)++ | 2 files
11:58 Geth ¦ MoarVM/spesh-worker: For Scalar parameters record content type also.
11:58 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/4bb2893d33
11:58 Geth ¦ MoarVM/spesh-worker: 1e07e26921 | (Jonathan Worthington)++ | src/core/frame.c
11:58 Geth ¦ MoarVM/spesh-worker: Never pass a real NULL as an object arg.
11:58 Geth ¦ MoarVM/spesh-worker:
11:58 Geth ¦ MoarVM/spesh-worker: Use VMNull instead.
11:58 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/1e07e26921
11:59 MasterDuke jnthn: nice post. "Bool (form passed path)", and "case the the parameter"
12:04 jnthn MasterDuke: Thanks, fixed
12:05 Geth ¦ MoarVM/spesh-worker: f8c587d8f4 | (Jonathan Worthington)++ | src/spesh/log.c
12:05 Geth ¦ MoarVM/spesh-worker: Missing rooting; do less work if not logging.
12:05 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/f8c587d8f4
12:13 Geth ¦ MoarVM/spesh-worker: 5bbe95a747 | (Jonathan Worthington)++ | 2 files
12:13 Geth ¦ MoarVM/spesh-worker: Remove "warm enough to log" concept.
12:13 Geth ¦ MoarVM/spesh-worker:
12:13 Geth ¦ MoarVM/spesh-worker: This would mean we never collected OSR points in the main body of a
12:13 Geth ¦ MoarVM/spesh-worker: program, which would be a serious missed opportunity.
12:13 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/5bbe95a747
12:13 timotimo i wonder if i take out the code that puts null ops into the beginning of frames i'd get better watchpoint information out of my code
12:44 Geth ¦ MoarVM/spesh-worker: 24267c0d58 | (Jonathan Worthington)++ | src/6model/reprs/MVMSpeshLog.c
12:44 Geth ¦ MoarVM/spesh-worker: Correct marking for decont param record.
12:44 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/24267c0d58
13:05 Geth ¦ MoarVM/spesh-worker: 0484ba0cb5 | (Jonathan Worthington)++ | 7 files
13:05 Geth ¦ MoarVM/spesh-worker: Start sketching out spesh stats data structure.
13:05 Geth ¦ MoarVM/spesh-worker:
13:05 Geth ¦ MoarVM/spesh-worker: This is where it will assemble per-static-frame summaries of what it
13:05 Geth ¦ MoarVM/spesh-worker: disocvered from the logs.
13:05 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/0484ba0cb5
13:37 Geth ¦ MoarVM/spesh-worker: 092db5f614 | (Jonathan Worthington)++ | 6 files
13:37 Geth ¦ MoarVM/spesh-worker: Implement MVM_SPESH_BLOCKING.
13:37 Geth ¦ MoarVM/spesh-worker:
13:37 Geth ¦ MoarVM/spesh-worker: Makes a thread that sends logs to the spesh worker thread wait until
13:37 Geth ¦ MoarVM/spesh-worker: it has completed the specialization work. This will allow for easier
13:37 Geth ¦ MoarVM/spesh-worker: debugging.
13:37 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/092db5f614
13:52 timotimo i think the FSA explodes during teardown because our extra threads don't know when the vm tears down
13:52 timotimo so they can't properly partake in teardown and so we use stuff that's already been freed or rather the main thread frees stuff that the other threads still want to use
13:59 dogbert17 joined #moarvm
14:00 MasterDuke can they be notified?
14:04 timotimo in theory the mechanism that coordinates threads into doing gc could be taught about that
14:05 MasterDuke the same mechanism that could be adapted to handle multi-threaded profiling?
14:10 timotimo yep
14:27 MasterDuke is it currently very tied to coordinating gc? or is it more of a generic message-passing mechanism?
14:29 timotimo well, we don't want to give our threads other stuff to always be checking on top of GC coordination
14:29 timotimo that makes it a natural choice, imo
14:31 jnthn It's a mechanism that could be generalized somewhat
14:31 jnthn Though with great care
14:32 timotimo the rr irc channel is really quiet
15:11 Geth ¦ MoarVM/spesh-worker: eac57a4caf | (Jonathan Worthington)++ | 6 files
15:11 Geth ¦ MoarVM/spesh-worker: Record total hit counts frames; dump them.
15:11 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/eac57a4caf
15:12 timotimo i wonder if this crash happens because fully_deserialized == 0 in the static frame, heh.
15:12 timotimo (crash while trying to dump the bytecode, that is)
15:13 brrt joined #moarvm
15:18 jnthn Possibly
15:18 jnthn I mean, that means we didn't bother reading in a bunch of info
15:18 jnthn Info which dumping would likely need
15:39 Geth ¦ MoarVM/spesh-worker: 4eb61cab0b | (Jonathan Worthington)++ | 2 files
15:39 Geth ¦ MoarVM/spesh-worker: Aggregate hit counts by callsite.
15:39 Geth ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/4eb61cab0b
15:47 timotimo anyway, putting a call to finish up deserialization makes things work better
15:47 TimToady joined #moarvm
15:49 timotimo oooooh this is some *bad* bytecode %)
15:50 timotimo getexcategory + box_i + smrt_numify + coerce_ni
15:50 timotimo but i think this is pre-speshed
15:51 timotimo er, well, when i dump the data of the *staticframe*, i'm not gonna get speshed code %)
16:00 jnthn Alright, figured out the next bit of the stats building but will leave that for tomorrow :)
16:01 jnthn Plan is stats model, then refactor how we do guards, then make the planner (deciding what specializations to produce)
16:01 jnthn And then it'll be the big step of migrating to really having specializations done by the specialization worker
16:01 brrt so…. what is more, at the time the code is 'linked', dynasm doesn't yet know that the block can still be increased
16:02 brrt *block size
16:10 * jnthn figures that's enough for now :)
16:27 ilmari[m] joined #moarvm
16:31 robertle joined #moarvm
18:56 FROGGS joined #moarvm
19:00 domidumont joined #moarvm
20:49 Geth ¦ MoarVM/even-moar-jit: 09f421cc78 | (Bart Wiegmans)++ | 3rdparty/dynasm
20:49 Geth ¦ MoarVM/even-moar-jit: Update dynasm to get OPTREX fix
20:49 Geth ¦ MoarVM/even-moar-jit:
20:49 Geth ¦ MoarVM/even-moar-jit: Some instructions only optionally need a REX byte. In this case, the
20:49 Geth ¦ MoarVM/even-moar-jit: size of the generated code varies with the selected register, which
20:49 Geth ¦ MoarVM/even-moar-jit: is known at link time. Previously we fixed that by increasing the size
20:49 Geth ¦ MoarVM/even-moar-jit: if we found a REX byte was necessary. However, this interacts badly
20:49 Geth ¦ MoarVM/even-moar-jit: with label offset calculation - specifically, we would allocate a single
20:49 Geth ¦ MoarVM/even-moar-jit: byte for a relative label, which would then overflow if the code grew
20:49 Geth ¦ MoarVM/even-moar-jit: due to addition of REX bytes. So instead, we now always assume that the
20:49 Geth ¦ MoarVM/even-moar-jit: space is required, and decrease the offset if it turns out that it isn't.
20:49 Geth ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/09f421cc78
20:49 Geth ¦ MoarVM/even-moar-jit: e3c4fa9b00 | (Bart Wiegmans)++ | src/jit/core.expr
20:49 Geth ¦ MoarVM/even-moar-jit: Add sp_fastcreate expr template
20:49 Geth ¦ MoarVM/even-moar-jit:
20:49 Geth ¦ MoarVM/even-moar-jit: This one uncovered so many bugs:
20:49 Geth ¦ MoarVM/even-moar-jit: * in expr tree generation
20:49 Geth ¦ MoarVM/even-moar-jit: * in point-spilling
20:49 Geth ¦ MoarVM/even-moar-jit: * in spill-GC interaction
20:49 Geth ¦ MoarVM/even-moar-jit: * in dynamic register code generation
20:49 Geth ¦ MoarVM/even-moar-jit:
20:49 Geth ¦ MoarVM/even-moar-jit: Fixing them was worthwile.
20:49 Geth ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/e3c4fa9b00
21:13 TimToady joined #moarvm
21:23 timotimo did you contribute the optrex fix to upstream dynasm?
21:24 timotimo or is that something only moar users get the benefits of?
21:24 timotimo .o( come to moarvm, we have the correctest dynasm implementation on the market today! )
21:26 timotimo also: hell yeah! even moar jit \o/
21:46 geekosaur joined #moarvm
21:55 samcv jnthn++ on blog post
22:09 lizmat and another Perl 6 Weekly hits the net: https://p6weekly.wordpress.com/2017/07/03/2017-27-inching-on-speed/
22:16 jnthn ah, nice, some bedtime reading :)
22:25 timotimo great!
22:25 * timotimo reads
22:31 jnthn lizmat++ # another nice weekly :)
22:35 timotimo i made the mistake to click through to those reddit comments
22:37 jnthn The post was bad enough :P
22:39 timotimo could have been worse
22:39 Zoffix :)
22:39 timotimo i only now understand that samcv is going to do the talk about unicode in amsterdam. is an intercontinental flight involved there?
22:40 samcv yep
22:40 timotimo i do not envy you!
22:40 timotimo also, last time i looked, those were absurdly expensive :<
22:40 samcv got a roundtrip for 840 dollars
22:41 samcv most of those ones you had to have a overnight layover in iceland but found one without it
22:41 jnthn Iceland is cool!
22:41 timotimo that's a little less than i would have expected
22:42 jnthn Not a cheap place for an overnight layover, though, I suspect
22:42 samcv i paid 1800 dollars roundtrip to manchester years ago. so this is much cheaper
22:42 samcv though that was during chrismas time so more money prolly
22:42 jnthn Yeah, season certainly affects it
22:43 jnthn Though airline pricing can be utterly bizzare.
22:44 jnthn The most annoying one being a ticket for place A to place C with a connection in place B being way cheaper than buying just the flight from B to C. o.O
22:44 jnthn Glad you found a good deal, anyway
22:44 timotimo yay
22:51 jnthn Time to rest, methinks. Want to get some more spesh stats progress in tomorrow.
22:54 AlexDani` joined #moarvm
23:10 samcv lldb is not a bad debugger
23:21 timotimo how's it scripting support?
23:21 samcv not sure
23:22 samcv it prints out variables on the stack pretty great
23:22 timotimo time-travelling debugger support? :) :)
23:23 samcv timotimo, https://gist.github.com/samcv/ba9322985151e3719a8edf1440b87ad1 does gdb print out variables this nicely?
23:24 samcv like complicated ones?
23:24 timotimo not by itself, but i have a gdb thingie installed that makes things a lot nicer
23:26 timotimo http://imgur.com/J5giaPi

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