Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-12-18

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

All times shown according to UTC.

Time Nick Message
00:02 dalek joined #moarvm
00:29 stmuk joined #moarvm
00:35 stmuk_ joined #moarvm
00:40 stmuk joined #moarvm
00:48 stmuk_ joined #moarvm
00:49 * japhb is finally catching up with the last couple weeks of patches
00:49 japhb This looks bogus: #define MVM_ALIGN_SECTION(offset) ((offset) + (offset) % ALIGNOF(MVMint64))
00:49 japhb What if offset is, say, 3?
00:50 japhb Unless I'm just really too tired, that gives 6, rather than 8, which I think is the intent.
00:50 * timotimo implements some more random functions for the jit
00:57 stmuk joined #moarvm
01:28 timotimo it's frustrating to implement some ops in the jit only to find out that it causes a single frame across the whole rakudo build to be successfully compiled where it used to fail
01:28 timotimo all others now stumble over another unimplemented op
01:29 japhb timotimo: Thankfully, there's only a finite number of ops ....
01:30 timotimo yeah
01:30 timotimo the thing is, only some of them can be translated into just a C function call. others have either a check for concreteness in front or are some simple getter that i'd have to write custom asm for
01:31 timotimo like captureposelems checks the right REPRID and throws if it's not right
01:34 japhb Nodnod
01:34 japhb Time was that I could have freehanded that asm for you, but I haven't been actively using that skill in far too long.
01:45 timotimo :)
01:45 timotimo i can cargocult sufficiently
01:46 timotimo https://gist.github.com/timo/3cdb32fb36d66229c58d/revisions - see what i mean? :)
01:52 timotimo just implemented gethllsym, that was very easy indeed
01:52 timotimo update to the gist will be in ... half a minute
01:53 japhb yay
01:53 timotimo that was worth 9 frames. neat.
01:53 japhb Little by little ....
01:53 timotimo yeah
01:53 timotimo i've done this dance already ... a long long time ago
01:54 timotimo when the JIT was still fresh and new
02:02 timotimo some parametric type ops implemented ...
02:05 timotimo huh! something's different now
02:06 timotimo all the numbers have changed
02:06 timotimo this is no good
02:07 timotimo also, gist doesn't let you kill revisions without going through a local clone
02:18 timotimo aaaaand captureposprimspec
02:21 timotimo as expected, 100% of those immediately turned into bails for captureposarg ...
02:23 timotimo and i bet when i implement captureposarg, it'll immediately want captureposarg_i, captureposarg_n and captureposarg_s ...
02:23 timotimo what a goose chase.
02:28 timotimo very dalek
02:28 * timotimo waves
02:29 timotimo well, dalek didn't get it
02:30 dalek MoarVM: 77c84d5 | timotimo++ | src/ (3 files):
02:30 dalek MoarVM: add reprconv for attribute inited and jit attrinited
02:30 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/77c84d5474
02:30 dalek MoarVM: ac3e0c3 | timotimo++ | src/ (3 files):
02:30 dalek MoarVM: jit captureposprimspec
02:31 dalek joined #moarvm
02:34 timotimo poor dalek
02:34 timotimo now i don't actually know how to do an unconditional branch to a label
02:35 timotimo jmp ->var_name does an unconditional branch to a memory position
02:35 timotimo oh, jmp does that, too
02:35 timotimo ok
02:45 timotimo ah, finally!
02:45 timotimo 51 bails kicked out
02:45 timotimo (potentially only one frame that's run by every invocation, but whatever.)
02:45 dalek MoarVM: 3e7667b | timotimo++ | src/jit/ (2 files):
02:45 dalek MoarVM: jit objprimbits for great justice.
02:45 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3e7667b73b
02:45 timotimo well, the file now has 63 lines where it used to have 67
02:45 timotimo work has certainly been done.
02:47 ilbot3 joined #moarvm
02:47 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
03:02 vendethiel joined #moarvm
04:40 Guest1337 joined #moarvm
04:59 Guest1337 Hi! Don't know where to report this, so here it goes: loop { 1+1;} - doesn't eat all memory, but
05:00 Guest1337 "watchdir".IO.watch; loop { 1+1;}; - totally does
05:01 Guest1337 Linux, rakudo-star, nqp and MoarVM version 2015.11 with JIT
05:03 JimmyZ Guest1337: see http://rakudo.org/tickets/
05:04 Guest1337 I'd like someone to confirm it first
05:05 JimmyZ Guest1337: yes, it eats all memory here too.
06:46 domidumont joined #moarvm
06:52 domidumont joined #moarvm
07:18 FROGGS joined #moarvm
07:29 stmuk joined #moarvm
07:59 domidumont joined #moarvm
08:11 virtualsue joined #moarvm
08:37 brrt joined #moarvm
08:43 dalek MoarVM: 975be18 | brrt++ | src/jit/emit_x64.dasc:
08:43 dalek MoarVM: Fold movzx into the load
08:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/975be18b8c
08:45 brrt timotimo++ for great JIT work
08:46 brrt timotimo: (whenever he's awake or backlogs): jmp ->foobar means jump to assm-global label foobar
08:46 brrt like jmp =>(foobar) means jump to asm-dynamically-allocated label with number foobar
08:47 brrt and jump >1 means 'jump to the next entry of local label >1'
08:47 brrt jmp varname would jump to the memory location indexed by varname, but because dynasm takes 32 bit arguments, that won't work properly on x64
09:03 zakharyas joined #moarvm
09:13 brrt joined #moarvm
09:23 ilmari japhb: you are entirely correct, thinko on my part
09:33 nwc10 due to insufficient lunch?
09:38 domidumont joined #moarvm
09:43 ilmari due to insufficient brane
09:43 * ilmari steals https://stackoverflow.com/questions/13122846/align-macro-kernel
09:44 * ilmari never thinks of bitmasking
10:02 * jnthn apparently had insufficient brane last night too...
10:03 jnthn Just disocvered I released unsinged registers into the signed registers pool...boy did that confuse the assembler :)
10:04 brrt also... working with smaller-sized things in the JIT, well, that's something we'll be able to handle cleanly in even-moar-jit, but probably not today
10:05 jnthn Yeah
10:05 jnthn Well, I'm figuring that tree matching will let us do nice things
10:05 brrt i've already implemented casting, but i don't have the float/int distinction coded in yet
10:06 brrt casting as in, fixing size differences, because yes, that already caused problems
10:06 jnthn my int16 $i = ...; my uint32 $j = $i; # an extend_u16, coerce_iu, and trunc_i32
10:07 jnthn oops
10:07 jnthn my int16 $i = ...; my uint32 $j = $i; # an extend_i16, coerce_iu, and trunc_u32
10:07 domidumont joined #moarvm
10:07 jnthn :)
10:07 jnthn I wrote it right the first time then wronged it...
10:31 dalek MoarVM: a4cdfb6 | jnthn++ | / (6 files):
10:31 dalek MoarVM: Coercion between num and unsinged int.
10:31 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a4cdfb64c1
10:36 rurban_ joined #moarvm
10:36 jnthn moar.obj : error LNK2001: unresolved external symbol snprintf
10:41 dalek MoarVM: 466a616 | jnthn++ | src/moar.c:
10:41 dalek MoarVM: Fix MSVC build.
10:41 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/466a616f90
10:49 dalek MoarVM: a49499a | jnthn++ | src/6model/reprs/P6int. (2 files):
10:49 dalek MoarVM: Support boxing unsigneds in P6int REPR.
10:49 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a49499a542
11:01 TimToady joined #moarvm
11:10 virtualsue joined #moarvm
11:59 dalek MoarVM: 55222ed | jnthn++ | src/core/bytecodedump.c:
11:59 dalek MoarVM: Fix dumping of unsinged register types.
11:59 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/55222edf0d
11:59 dalek MoarVM: d8a3fa8 | jnthn++ | src/core/interp.c:
11:59 dalek MoarVM: Fix thinkos in some coercion ops.
11:59 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d8a3fa8f48
12:00 jnthn gah, typo again
12:12 ilmari https://github.com/MoarVM/MoarVM/pull/316 # fix for the alignment macro
12:12 ilmari japhb++
12:25 lizmat .oO( jnthn can't stop singing :-)
12:26 jnthn m: my uint32 $a = 2**31; say $a + 1
12:26 camelia rakudo-moar d8f7e8: OUTPUT«-2147483647␤»
12:26 jnthn 2147483649 locally :)
12:29 dalek MoarVM: 6b02fca | (Dagfinn Ilmari Mannsåker)++ | src/ (3 files):
12:29 dalek MoarVM: Fix alignment macro definition
12:29 dalek MoarVM:
12:29 dalek MoarVM: Also consistently use MVMuint32 for the size and offset values.
12:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6b02fca263
12:29 dalek MoarVM: 4ab9121 | jnthn++ | src/ (3 files):
12:29 dalek MoarVM: Merge pull request #316 from ilmari/fix-alignment
12:29 dalek MoarVM:
12:29 dalek MoarVM: Fix alignment macro definition
12:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4ab912119b
12:48 virtualsue joined #moarvm
12:51 virtualsue_ joined #moarvm
13:02 zakharyas joined #moarvm
13:39 jnthn m: my uint32 $a = 2**31; say $a
13:39 camelia rakudo-moar 2a2e9a: OUTPUT«-2147483648␤»
13:39 jnthn m: my uint32 $a = 2**31; say $a.Str
13:39 camelia rakudo-moar 2a2e9a: OUTPUT«-2147483648␤»
13:43 dalek MoarVM: 53e0a9a | jnthn++ | src/core/ext.c:
13:43 dalek MoarVM: Recognize unsigned extop operands.
13:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/53e0a9a409
13:43 dalek MoarVM: 4e178ce | jnthn++ | / (8 files):
13:43 dalek MoarVM: Add a (somewhat cheating) cheating decont_u.
13:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4e178cee8b
13:43 dalek MoarVM: cc142d6 | jnthn++ | src/ (3 files):
13:43 dalek MoarVM: Merge branch 'master' of github.com:MoarVM/MoarVM
13:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/cc142d6f60
13:43 dalek MoarVM: c1f5abf | jnthn++ | / (7 files):
13:43 dalek MoarVM: Cheating native ref ops for unsigneds.
13:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c1f5abf04f
13:43 jnthn oops
13:43 * jnthn spot that merge commit sneak in
13:43 jnthn *didn't
13:48 zakharyas joined #moarvm
14:16 timotimo jnthn: can you explain readlineint_fh to me?
14:18 jnthn It was the op you used to do readline interactive, before we took linenoise support out of core
14:18 timotimo its implementaiton in inter.pc is ... empty :)
14:18 timotimo oh, i see
14:18 jnthn It shoudln't be used any more
14:18 timotimo yeah, that makes sense
14:20 dalek MoarVM: cde6009 | jnthn++ | / (8 files):
14:20 dalek MoarVM: Somewhat cheating unsinged parameter ops.
14:20 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/cde6009be7
14:21 * jnthn is popping these in to make stuff mostly work (which is a big step up from now)
14:21 timotimo i'm amazed that we're getting unsigned ints before butterflymas
14:21 timotimo (henceforth to be known as ymas)
14:21 jnthn Well, the cat was already out of the bag in some senses
14:22 jnthn Folks were using them in nativecall bindings
14:22 timotimo right
14:22 jnthn So I didn't really want to make them experimental
14:22 timotimo and getting confused about things
14:22 timotimo yeah
14:22 jnthn We'll have some rough edges
14:22 jnthn Mostly around uint64
14:22 timotimo how about in native arrays?
14:22 timotimo i don't think there's anything in there yet?
14:22 jnthn They were already righter in there than in many places
14:23 jnthn But still the 64-bit edge case
14:23 jnthn We can clean those up after xmas too, I think
14:25 timotimo OK
14:26 timotimo -      7 BAIL: op <say_fhs>
14:26 timotimo pure win \o/
14:27 dalek MoarVM: f3812e0 | timotimo++ | src/jit/graph.c:
14:27 dalek MoarVM: jit say_fhs for free.
14:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/f3812e0d22
14:27 timotimo now the output of the command that generates my little summary fits on one screen
14:30 timotimo scgetobjidx is so popular on that list, i think i'll just write it quickly as a C function and see where that leads
14:31 timotimo i wonder if i should write little comments before the functions i've just introduced for the benefit of the jit
14:31 timotimo so that later when th exprtreejit has them "in-lined" we can just throw them out if they've not been adopted anywhere else
14:32 dalek MoarVM: 7545aa9 | jnthn++ | src/core/bytecode.c:
14:32 dalek MoarVM: Fix extop validation to accept unsigned operands.
14:32 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7545aa90f1
14:32 jnthn Probably would be wise
14:34 dalek MoarVM: af4c222 | timotimo++ | src/6model/reprs/MVMCallCapture.c:
14:34 dalek MoarVM: point out capture_pos_primspec as a "jit-only" function
14:34 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/af4c222a89
14:34 timotimo though i think repr_attribute_inited is also sort of interesting for reprconv in general
14:37 timotimo jnthn: does fopen_perhaps_with_pid look sane to you? i've put a bit of extra care in to make sure it isn't that easy to break
14:40 jnthn shopping, will look when I get back :)
14:41 timotimo sure, good luck! ;)
14:55 patrickz joined #moarvm
14:59 timotimo wow, that was a "pure win" again
14:59 timotimo 75 bails gone
14:59 timotimo (though since that's combined from all of "make install" of rakudo, it may just be one frame or two frames that show up in every invocation)
15:00 timotimo arg_o could be worth a whole lot.
15:03 jnthn arg_o? I thought that was covered by invocation sequences...odd
15:03 jnthn Shopping was easy; I only needed red onions :)
15:12 timotimo oh, hmm.
15:12 timotimo may be something to ask brrt about
15:12 timotimo ah
15:12 timotimo it's supposed to
15:13 timotimo let's see. it's triggered by "prepargs"
15:14 timotimo seems like we end up without a prepargs sometimes?
15:26 timotimo oh
15:27 timotimo seems like somehow a guardconc + set + getspeshslot slipped in there?! but it also says there's an invoke_o before that, so ... huh?!?
15:30 timotimo i see the prepargs in the spesh dump, but it doesn't seem to exist any more by the time the jit hits it
15:30 timotimo o__O
15:32 timotimo i invoke the magical brrt. halp!
15:35 timotimo AHA!
15:35 timotimo looked at the first of two "Finished" outputs
15:35 timotimo in the seconde one the prepargs is missing
15:39 timotimo er ... not only the prepargs is gone, but also the invoke!
15:39 timotimo so there's probably something in there that takes care to remove a prepargs if an invoke disappears, but the args in between don't get kicked out perhaps?
15:41 timotimo except invoke isn't pure, so ...
15:41 timotimo oh, of course. it's inlined!
15:42 dalek MoarVM: ae8f391 | jnthn++ | src/6model/reprs/P6bigint.c:
15:42 dalek MoarVM: Fix size test to avoid corrupting big uints.
15:42 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ae8f391692
15:44 timotimo looks a bit like if there's a mismatch between number of arg_* and getarg_* calls, arg_* ops get left in the dust
15:44 timotimo that looks easily fixable
15:59 dalek MoarVM: c091b48 | timotimo++ | src/spesh/inline.c:
15:59 dalek MoarVM: spesh inline: kick out remaining unused arg_*/argconst_* ops
15:59 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c091b48f77
15:59 dalek MoarVM: 3638da6 | timotimo++ | src/ (3 files):
15:59 dalek MoarVM: jit scgetobjidx (via a _jit C function)
15:59 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3638da6be9
15:59 timotimo since this also includes decreasing usage numbers for args, it could lead to more efficient bytecode, too.
16:00 timotimo and 170 bails across the rakudo compilation are gone, too.
16:00 timotimo (it looked like fresh_register was mainly afflicted)
16:18 timotimo i sure hope my many jit changes didn't actually break something ... i didn't actually spec test :|
16:19 virtualsue joined #moarvm
16:20 jnthn *sigh*
16:20 jnthn Please always do it
16:20 jnthn I bump revisions on the assumption people will at least do that.
16:26 timotimo will do
16:26 timotimo thing is, spectests are damn dirty these days
16:27 timotimo and not reliably so
16:29 jnthn Yes, but they can still catch epic fail
16:30 timotimo should i be staying away from latest nqp for the spec test? or is the sizedness/unsignedness thing stable now?
16:31 jnthn Stable
16:31 jnthn I bumped Rakudo to use latest NQP also
16:32 timotimo understood
16:32 timotimo seeing lots of "ok" at least
16:36 virtualsue_ joined #moarvm
16:41 zakharyas joined #moarvm
16:43 timotimo i only get very few spec test failures
17:12 hoelzro o/ #moarvm
17:12 ilmari \o
17:12 hoelzro ilmari: did you get far with your moardump experiment?
17:12 ilmari hoelzro: I managed to get git to use it when diffing moarvm files
17:13 hoelzro oh, nice
17:13 ilmari echo '*.moarvm diff=moarvm' >> .git/info/attributes
17:13 ilmari (echo '[diff "moarvm"]'; echo '    textconv = moardump') >> .git/config
17:14 ilmari (echo '#!/bin/sh'; echo 'exec moar --dump "$@"') >> ~/bin/moardump
17:14 ilmari chmod +x ~/bin/moardump
17:17 ilmari git log -p src/vm/moar/stage0/
17:19 hoelzro timotimo, jnthn: the function for allocation info (on glibc) is called mallinfo
17:19 ilmari (in the nqp repo)
17:19 hoelzro ilmari: nice, I'll have to try that out
17:20 geekosaur fwiw mallinfo is also part of System V (Solaris) malloc although the details are likely different
17:20 hoelzro we could always track this information in MVM_alloc itself
17:21 hoelzro I have patches for adding mallinfo to MoarVM here, if anyone's curious: https://rt.perl.org/Ticket/Display.html?id=126183
17:25 JimmyZ or use something like Dtrace ?
17:26 hoelzro for memory tracking? I didn't know dtrace could do that!
17:26 hoelzro dtrace + lttng support would be nice
17:26 JimmyZ yes
17:26 JimmyZ or systemtap, or ktap
17:27 hoelzro I don't know systemtap or ktap; do they have a userspace probe facility?
17:27 JimmyZ yes
17:28 JimmyZ well, systemtap is not easy on debian/ubuntu, you may want to try ktap if you are on these .
17:28 JimmyZ but it is easy to use on redhat
17:29 JimmyZ hoelzro: and you will like  https://github.com/brendangregg/FlameGraph
17:30 JimmyZ hoelzro: http://www.brendangregg.com/FlameGraphs/memoryflamegraphs.html
17:31 hoelzro coooool
17:33 timotimo what is lttng?
17:38 hoelzro a linux tracer kind of like dtrace
17:38 hoelzro I played with it a bit a little while ago, it's pretty cool
17:39 JimmyZ the above link is very good for memory leaks :)
17:43 timotimo ah
18:23 FROGGS joined #moarvm
18:35 virtualsue joined #moarvm
20:28 dalek MoarVM: f8fe345 | FROGGS++ | / (4 files):
20:28 dalek MoarVM: better check for _Bool to unbust newer MSVC
20:28 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/f8fe3450fa
21:41 * diakopter applauds jnthn (& co.) for having extreme patience to do things *the right way* for long term optimizability
21:42 diakopter (with some leeway for immediate usability!)
21:42 diakopter (also, TimToady, of course)
21:42 diakopter (& co.)
21:43 * jnthn is rather looking forward to working on optimization in the new year
21:43 * diakopter is rather looking forward to building a proof engineering environment on top of Perl 6
21:44 jnthn Wow :)
21:45 jnthn Getting to watch other people build stuff in Perl 6 is one of the best things about working on Perl 6 :)
21:46 diakopter well, we'll see if the long shot pans out
21:54 diakopter .oO( or Peters out.. )
21:54 diakopter .oO( or Peter Pans... )
22:07 geekosaur or Peter Parkers out although that could get a bit webbly
22:37 timotimo jnthn: do you have a clear idea of what exactly makes moar with --profile and more than one thread explodey?
22:38 jnthn timotimo: Not sure about explodey, aside from maybe it fails to set up profilign data sturctures on the new threads
22:38 timotimo if that's the case, it could be easy enough to make it at least not crash
22:38 jnthn timotimo: But I didn't do anything about collecting the data from between the threads
22:39 jnthn The profiler is one of our various "jnthn half-wrote something neat in 2 days and hoped somebody would be inspired to do the rest" ;)
22:39 timotimo um
22:39 timotimo it doesn't actually explode?
22:39 jnthn Oh :)
22:39 jnthn Maybe it just ignores the data from other threads then :)
22:39 timotimo i suppose i need to find an explodey example then :)
22:40 timotimo i'm also not sure what things like the call graph would look like :D
22:40 timotimo and the overview
22:40 timotimo "yeah, we spent 300% of total time executing code and some 10% doing GC"
22:40 jnthn You'd have to have it per thread
22:40 timotimo yeah
22:41 jnthn (Not the whole profiler, but the call graph)
22:41 jnthn Of course, the *really* hard problem is profiling async code :)
22:41 jnthn Which migrates over threads :)
22:41 timotimo oh lord
22:41 timotimo yeah
22:41 timotimo i have absolutely no answer to that.
22:42 diakopter I mean, the call graphs could be merged, but you just have to be aware there's some cross-call-tree interactions going on
22:48 timotimo well, i was under the impression that profile on things using "start" would crash
22:49 timotimo that's not the case
22:49 timotimo that's quite good.
22:50 jnthn Well, I designed it so threads could collect data
22:50 jnthn In a thread-safe way
22:50 jnthn Just didn't wire any of the aggregation up
22:50 jnthn So I figured it'd not be anything too serious if it was explodey
22:51 timotimo i wonder what gave me the impression ...
22:52 jnthn I dunno, you profiled a thready thing that crashed for other reasons maybe :)
22:52 timotimo could be
22:53 jnthn 100% of people who confuse correlation with causation end up dying.
22:53 TimToady and some of them suffer a lingering death...
23:30 cognominal joined #moarvm
23:50 flussence joined #moarvm

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