00:02 dalek joined 00:29 stmuk joined 00:35 stmuk_ joined 00:40 stmuk joined 00:48 stmuk_ joined
japhb is finally catching up with the last couple weeks of patches 00:49
This looks bogus: #define MVM_ALIGN_SECTION(offset) ((offset) + (offset) % ALIGNOF(MVMint64))
What if offset is, say, 3?
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
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
all others now stumble over another unimplemented op
japhb timotimo: Thankfully, there's only a finite number of ops .... 01:29
timotimo yeah 01:30
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
like captureposelems checks the right REPRID and throws if it's not right 01:31
japhb Nodnod 01:34
Time was that I could have freehanded that asm for you, but I haven't been actively using that skill in far too long.
timotimo :) 01:45
i can cargocult sufficiently
gist.github.com/timo/3cdb32fb36d66.../revisions - see what i mean? :) 01:46
just implemented gethllsym, that was very easy indeed 01:52
update to the gist will be in ... half a minute
japhb yay 01:53
timotimo that was worth 9 frames. neat.
japhb Little by little ....
timotimo yeah
i've done this dance already ... a long long time ago
when the JIT was still fresh and new 01:54
some parametric type ops implemented ... 02:02
huh! something's different now 02:05
all the numbers have changed 02:06
this is no good
also, gist doesn't let you kill revisions without going through a local clone 02:07
aaaaand captureposprimspec 02:18
as expected, 100% of those immediately turned into bails for captureposarg ... 02:21
and i bet when i implement captureposarg, it'll immediately want captureposarg_i, captureposarg_n and captureposarg_s ... 02:23
what a goose chase.
very dalek 02:28
timotimo waves
well, dalek didn't get it 02:29
dalek arVM: 77c84d5 | timotimo++ | src/ (3 files):
add reprconv for attribute inited and jit attrinited
02:30
arVM: ac3e0c3 | timotimo++ | src/ (3 files):
jit captureposprimspec

jit objprimbits for great justice.
02:31 dalek joined
timotimo poor dalek 02:34
now i don't actually know how to do an unconditional branch to a label
jmp ->var_name does an unconditional branch to a memory position 02:35
oh, jmp does that, too
ok
ah, finally! 02:45
51 bails kicked out
(potentially only one frame that's run by every invocation, but whatever.)
timotimo well, the file now has 63 lines where it used to have 67
work has certainly been done.
02:47 ilbot3 joined 03:02 vendethiel joined 04:40 Guest1337 joined
Guest1337 Hi! Don't know where to report this, so here it goes: loop { 1+1;} - doesn't eat all memory, but 04:59
"watchdir".IO.watch; loop { 1+1;}; - totally does 05:00
Linux, rakudo-star, nqp and MoarVM version 2015.11 with JIT 05:01
JimmyZ Guest1337: see rakudo.org/tickets/ 05:03
Guest1337 I'd like someone to confirm it first 05:04
JimmyZ Guest1337: yes, it eats all memory here too. 05:05
06:46 domidumont joined 06:52 domidumont joined 07:18 FROGGS joined 07:29 stmuk joined 07:59 domidumont joined 08:11 virtualsue joined 08:37 brrt joined
dalek arVM: 975be18 | brrt++ | src/jit/emit_x64.dasc:
Fold movzx into the load
08:43
brrt timotimo++ for great JIT work 08:45
timotimo: (whenever he's awake or backlogs): jmp ->foobar means jump to assm-global label foobar 08:46
like jmp =>(foobar) means jump to asm-dynamically-allocated label with number foobar
and jump >1 means 'jump to the next entry of local label >1' 08:47
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 09:13 brrt joined
ilmari japhb: you are entirely correct, thinko on my part 09:23
nwc10 due to insufficient lunch? 09:33
09:38 domidumont joined
ilmari due to insufficient brane 09:43
ilmari steals stackoverflow.com/questions/131228...cro-kernel
ilmari never thinks of bitmasking 09:44
jnthn apparently had insufficient brane last night too... 10:02
Just disocvered I released unsinged registers into the signed registers pool...boy did that confuse the assembler :) 10:03
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:04
jnthn Yeah 10:05
Well, I'm figuring that tree matching will let us do nice things
brrt i've already implemented casting, but i don't have the float/int distinction coded in yet
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
oops 10:07
my int16 $i = ...; my uint32 $j = $i; # an extend_i16, coerce_iu, and trunc_u32
10:07 domidumont joined
jnthn :) 10:07
I wrote it right the first time then wronged it...
dalek arVM: a4cdfb6 | jnthn++ | / (6 files):
Coercion between num and unsinged int.
10:31
10:36 rurban_ joined
jnthn moar.obj : error LNK2001: unresolved external symbol snprintf 10:36
dalek arVM: 466a616 | jnthn++ | src/moar.c:
Fix MSVC build.
10:41
arVM: a49499a | jnthn++ | src/6model/reprs/P6int. (2 files):
Support boxing unsigneds in P6int REPR.
10:49
11:01 TimToady joined 11:10 virtualsue joined
dalek arVM: 55222ed | jnthn++ | src/core/bytecodedump.c:
Fix dumping of unsinged register types.
11:59
arVM: d8a3fa8 | jnthn++ | src/core/interp.c:
Fix thinkos in some coercion ops.
jnthn gah, typo again 12:00
ilmari github.com/MoarVM/MoarVM/pull/316 # fix for the alignment macro 12:12
japhb++
lizmat
.oO( jnthn can't stop singing :-)
12:25
jnthn m: my uint32 $a = 2**31; say $a + 1 12:26
camelia rakudo-moar d8f7e8: OUTPUTĀ«-2147483647ā¤Ā»
jnthn 2147483649 locally :)
dalek arVM: 6b02fca | (Dagfinn Ilmari MannsƄker)++ | src/ (3 files):
Fix alignment macro definition

Also consistently use MVMuint32 for the size and offset values.
12:29
arVM: 4ab9121 | jnthn++ | src/ (3 files):
Merge pull request #316 from ilmari/fix-alignment

Fix alignment macro definition
12:48 virtualsue joined 12:51 virtualsue_ joined 13:02 zakharyas joined
jnthn m: my uint32 $a = 2**31; say $a 13:39
camelia rakudo-moar 2a2e9a: OUTPUTĀ«-2147483648ā¤Ā»
jnthn m: my uint32 $a = 2**31; say $a.Str
camelia rakudo-moar 2a2e9a: OUTPUTĀ«-2147483648ā¤Ā»
dalek arVM: 53e0a9a | jnthn++ | src/core/ext.c:
Recognize unsigned extop operands.
13:43
arVM: 4e178ce | jnthn++ | / (8 files):
Add a (somewhat cheating) cheating decont_u.
arVM: cc142d6 | jnthn++ | src/ (3 files):
Merge branch 'master' of github.com:MoarVM/MoarVM
arVM: c1f5abf | jnthn++ | / (7 files):
Cheating native ref ops for unsigneds.
jnthn oops
jnthn spot that merge commit sneak in
*didn't
13:48 zakharyas joined
timotimo jnthn: can you explain readlineint_fh to me? 14:16
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 :)
oh, i see
jnthn It shoudln't be used any more
timotimo yeah, that makes sense
dalek arVM: cde6009 | jnthn++ | / (8 files):
Somewhat cheating unsinged parameter ops.
14:20
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
(henceforth to be known as ymas)
jnthn Well, the cat was already out of the bag in some senses
Folks were using them in nativecall bindings 14:22
timotimo right
jnthn So I didn't really want to make them experimental
timotimo and getting confused about things
yeah
jnthn We'll have some rough edges
Mostly around uint64
timotimo how about in native arrays?
i don't think there's anything in there yet?
jnthn They were already righter in there than in many places
But still the 64-bit edge case 14:23
We can clean those up after xmas too, I think
timotimo OK 14:25
- 7 BAIL: op <say_fhs> 14:26
pure win \o/
dalek arVM: f3812e0 | timotimo++ | src/jit/graph.c:
jit say_fhs for free.
14:27
timotimo now the output of the command that generates my little summary fits on one screen
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:30
i wonder if i should write little comments before the functions i've just introduced for the benefit of the jit 14:31
so that later when th exprtreejit has them "in-lined" we can just throw them out if they've not been adopted anywhere else
dalek arVM: 7545aa9 | jnthn++ | src/core/bytecode.c:
Fix extop validation to accept unsigned operands.
14:32
jnthn Probably would be wise
dalek arVM: af4c222 | timotimo++ | src/6model/reprs/MVMCallCapture.c:
point out capture_pos_primspec as a "jit-only" function
14:34
timotimo though i think repr_attribute_inited is also sort of interesting for reprconv in general
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:37
jnthn shopping, will look when I get back :) 14:40
timotimo sure, good luck! ;) 14:41
14:55 patrickz joined
timotimo wow, that was a "pure win" again 14:59
75 bails gone
(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)
arg_o could be worth a whole lot. 15:00
jnthn arg_o? I thought that was covered by invocation sequences...odd 15:03
Shopping was easy; I only needed red onions :)
timotimo oh, hmm. 15:12
may be something to ask brrt about
ah
it's supposed to
let's see. it's triggered by "prepargs" 15:13
seems like we end up without a prepargs sometimes? 15:14
oh 15:26
seems like somehow a guardconc + set + getspeshslot slipped in there?! but it also says there's an invoke_o before that, so ... huh?!? 15:27
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
o__O
i invoke the magical brrt. halp! 15:32
AHA! 15:35
looked at the first of two "Finished" outputs
in the seconde one the prepargs is missing
er ... not only the prepargs is gone, but also the invoke! 15:39
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?
except invoke isn't pure, so ... 15:41
oh, of course. it's inlined!
dalek arVM: ae8f391 | jnthn++ | src/6model/reprs/P6bigint.c:
Fix size test to avoid corrupting big uints.
15:42
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
that looks easily fixable
dalek arVM: c091b48 | timotimo++ | src/spesh/inline.c:
spesh inline: kick out remaining unused arg_*/argconst_* ops
15:59
arVM: 3638da6 | timotimo++ | src/ (3 files):
jit scgetobjidx (via a _jit C function)
timotimo since this also includes decreasing usage numbers for args, it could lead to more efficient bytecode, too.
and 170 bails across the rakudo compilation are gone, too. 16:00
(it looked like fresh_register was mainly afflicted)
i sure hope my many jit changes didn't actually break something ... i didn't actually spec test :| 16:18
16:19 virtualsue joined
jnthn *sigh* 16:20
Please always do it
I bump revisions on the assumption people will at least do that.
timotimo will do 16:26
thing is, spectests are damn dirty these days
and not reliably so 16:27
jnthn Yes, but they can still catch epic fail 16:29
timotimo should i be staying away from latest nqp for the spec test? or is the sizedness/unsignedness thing stable now? 16:30
jnthn Stable 16:31
I bumped Rakudo to use latest NQP also
timotimo understood 16:32
seeing lots of "ok" at least
16:36 virtualsue_ joined 16:41 zakharyas joined
timotimo i only get very few spec test failures 16:43
hoelzro o/ #moarvm 17:12
ilmari \o
hoelzro ilmari: did you get far with your moardump experiment?
ilmari hoelzro: I managed to get git to use it when diffing moarvm files
hoelzro oh, nice 17:13
ilmari echo '*.moarvm diff=moarvm' >> .git/info/attributes
(echo '[diff "moarvm"]'; echo ' textconv = moardump') >> .git/config
(echo '#!/bin/sh'; echo 'exec moar --dump "$@"') >> ~/bin/moardump 17:14
chmod +x ~/bin/moardump
git log -p src/vm/moar/stage0/ 17:17
hoelzro timotimo, jnthn: the function for allocation info (on glibc) is called mallinfo 17:19
ilmari (in the nqp repo)
hoelzro ilmari: nice, I'll have to try that out
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
I have patches for adding mallinfo to MoarVM here, if anyone's curious: rt.perl.org/Ticket/Display.html?id=126183 17:21
JimmyZ or use something like Dtrace ? 17:25
hoelzro for memory tracking? I didn't know dtrace could do that! 17:26
dtrace + lttng support would be nice
JimmyZ yes
or systemtap, or ktap
hoelzro I don't know systemtap or ktap; do they have a userspace probe facility? 17:27
JimmyZ yes
well, systemtap is not easy on debian/ubuntu, you may want to try ktap if you are on these . 17:28
but it is easy to use on redhat
hoelzro: and you will like github.com/brendangregg/FlameGraph 17:29
hoelzro: www.brendangregg.com/FlameGraphs/me...raphs.html 17:30
hoelzro coooool 17:31
timotimo what is lttng? 17:33
hoelzro a linux tracer kind of like dtrace 17:38
I played with it a bit a little while ago, it's pretty cool
JimmyZ the above link is very good for memory leaks :) 17:39
timotimo ah 17:43
18:23 FROGGS joined 18:35 virtualsue joined
dalek arVM: f8fe345 | FROGGS++ | / (4 files):
better check for _Bool to unbust newer MSVC
20:28
diakopter applauds jnthn (& co.) for having extreme patience to do things *the right way* for long term optimizability 21:41
(with some leeway for immediate usability!) 21:42
(also, TimToady, of course)
(& co.)
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
jnthn Wow :) 21:44
Getting to watch other people build stuff in Perl 6 is one of the best things about working on Perl 6 :) 21:45
diakopter well, we'll see if the long shot pans out 21:46
.oO( or Peters out.. )
21:54
.oO( or Peter Pans... )
geekosaur or Peter Parkers out although that could get a bit webbly 22:07
timotimo jnthn: do you have a clear idea of what exactly makes moar with --profile and more than one thread explodey? 22:37
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
jnthn timotimo: But I didn't do anything about collecting the data from between the threads
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
it doesn't actually explode?
jnthn Oh :)
Maybe it just ignores the data from other threads then :)
timotimo i suppose i need to find an explodey example then :)
i'm also not sure what things like the call graph would look like :D 22:40
and the overview
"yeah, we spent 300% of total time executing code and some 10% doing GC"
jnthn You'd have to have it per thread
timotimo yeah
jnthn (Not the whole profiler, but the call graph) 22:41
Of course, the *really* hard problem is profiling async code :)
Which migrates over threads :)
timotimo oh lord
yeah
i have absolutely no answer to that.
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:42
timotimo well, i was under the impression that profile on things using "start" would crash 22:48
that's not the case 22:49
that's quite good.
jnthn Well, I designed it so threads could collect data 22:50
In a thread-safe way
Just didn't wire any of the aggregation up
So I figured it'd not be anything too serious if it was explodey
timotimo i wonder what gave me the impression ... 22:51
jnthn I dunno, you profiled a thready thing that crashed for other reasons maybe :) 22:52
timotimo could be
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 23:50 flussence joined