Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-11-12

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

All times shown according to UTC.

Time Nick Message
00:46 Ven_ joined #moarvm
01:50 Ven_ joined #moarvm
02:55 Ven_ joined #moarvm
03:04 JimmyZ psch: at a first quick look: can_store(tc, MVM_args_get_pos_obj(tc, apc,i ,1).arg.o))) can be can_store(tc, arg))
03:05 JimmyZ psch: and can_store(tc, args[i].o) -> can_store(tc, arg)
03:11 JimmyZ psch: oh, really should be (contspec && !MVM_is_null(tc, arg) && contspec->can_store(tc, arg)))
03:12 JimmyZ psch: hope it fixs the segfault
03:13 JimmyZ psch: better: (!MVM_is_null(tc, arg)  && contspec && contspec->can_store(tc, arg)))
03:59 Ven_ joined #moarvm
04:34 tokuhiro_ joined #moarvm
04:40 stmuk joined #moarvm
04:51 vendethiel joined #moarvm
05:02 Ven_ joined #moarvm
06:50 domidumont joined #moarvm
07:09 Ven_ joined #moarvm
07:27 lizmat joined #moarvm
08:06 zakharyas joined #moarvm
08:57 brrt joined #moarvm
09:12 brrt \o #moarvm
09:12 nwc10 o/ brrt
09:12 timotimo mvraom# o/ trrb
09:13 brrt \o nwc10, timotimo
09:13 brrt i've a designish question again
09:14 brrt currently i have (in the expression jit) a node called LABEL, which takes a single arguments, which must be a CONST node, and which either loads the address (using lea) or may be used to jump
09:14 brrt i.e. (branch (label (const 4 4))) turns into jmp =>(4)
09:14 brrt this =>(4) is the notation of a dynamic label in dynasm
09:15 brrt anyway, it occured to me that the const makes no sense
09:15 brrt there is no way to do anything but a const there
09:15 timotimo we can't calculate jump targets?
09:15 brrt e.g. the same should rather be (branch (label 4))
09:15 brrt oh, yes we can
09:15 brrt but then you should have the form (branch reg)
09:15 brrt or even
09:16 brrt (branch (load (addr reg $ofs) $size))
09:16 timotimo right
09:18 brrt ok, so with that said
09:18 brrt i need to add markers
09:18 brrt i.e. not only to *refer* to labels, but also to *insert* them explicitly
09:18 brrt my initial guess was (MARK (LABEL 4)) for the expression =>(4):
09:19 brrt however, this ... runs against the same complaints as (LABEL (CONST 4)) did
09:19 timotimo as in: "when jumping to label 4, this is where you'll end up"?
09:19 brrt yes
09:19 brrt it makes sense verbally, but not in the sense of 'compute label 4, then mark it'
09:20 brrt if i say (MARK 4) then, why is it called
09:20 brrt mark
09:20 brrt so i'm almost going to say, why not (MARK_LABEL 4)
09:20 timotimo my bikeshed sense is tingling :P
09:20 brrt design is like that :-P
09:21 brrt but in seriousness, i want to make the tree make sense to people
09:22 brrt (maybe i should output graphviz for the jit tree)
09:22 brrt that would be a fun miniproject
09:22 timotimo sure. i like outputting graphviz :)
09:22 brrt timotimo.. do you have time left? (oh, how do i dare even)
09:24 brrt basically, in even-moar-jit, in src/jit/log.c, we have a tree-walking log.c
09:24 brrt but the tree isn't a tree really, so it gives a quite confusing sotry
09:24 brrt story
09:26 timotimo right, that's the thing i'm worried about
09:27 brrt which is why i think graphviz dot graphs may help :-)
09:27 timotimo i don't understand enough about the tree - especially with the way things are hooked in-place
09:27 timotimo and such
09:27 timotimo er
09:27 brrt oh, i can help with that....
09:27 timotimo i've been meaning to look through the moarvm utils i've built some time ago to make sure they still work properly
09:28 brrt letmesee how dot graphs really work
09:28 timotimo super easy
09:28 timotimo digraph Foo {  a -> b; c -> d; a -> c; }
09:29 brrt ok, what i'm thinking is doing postorder traversal
09:29 brrt or maybe preorder plus inorder
09:29 timotimo if you want to put attributes on a node, you'd put a line like "node a [color = red]" or something
09:29 timotimo if you want nodes to have more "complicated" names, you can quote 'em
09:31 brrt so, something like (LOAD (ADDR (LOCAL) 16) 8) would become...
09:31 timotimo oh, you can also write "a -> b -> c -> d -> e;" in a single line
09:33 brrt digraph Foo { node n_1 [label="LOAD"]; node n_2 [label="ADDR"]; node n_3 [label="LOCAL"]; node v_1 [label="16"]; node v_2 [label="8"]; n_1 -> n_2; n2 -> n3; n_2 -> v_1; n_3 -> v_2; }
09:33 timotimo yeah, that'll work
09:34 timotimo pro-tip: use dot -Tx11 and you'll get a scrollable, zoomable thingie
09:35 timotimo d'oh, syntax error
09:35 timotimo "near '['"
09:36 timotimo ah, "node" is not actually a thing
09:36 brrt oh, thanks
09:37 brrt i can do that
10:22 donaldh joined #moarvm
10:57 jnthn morning, #moarvm
11:08 pyrimidi_ joined #moarvm
11:14 JimmyZ morning, jnthn :)
11:25 brrt good moarning jnthn
13:12 domidumont joined #moarvm
13:34 psch JimmyZ: directly passing arg to can_store is what i had before.  that always segfaults
13:35 psch why afaiu is because the != MVM_REPR_ID_NativeRef if already deconts..?
13:38 psch and adding only !MVM_is_null still gives me a SEGV for Scalar.WHICH
13:40 psch s/why/which/
14:55 JimmyZ psch: then I have no idea :)
14:56 JimmyZ psch: jnthn++ may have
15:02 dalek MoarVM/even-moar-jit: 04b540b | (Pawel Murias)++ | src/strings/ops.c:
15:02 dalek MoarVM/even-moar-jit: Make escape handle \r\n properly
15:02 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/04b540b8cd
15:02 dalek MoarVM/even-moar-jit: cdf1067 | jnthn++ | src/strings/ops.c:
15:02 dalek MoarVM/even-moar-jit: Merge pull request #290 from pmurias/fix-escape-crlf
15:02 dalek MoarVM/even-moar-jit:
15:02 dalek MoarVM/even-moar-jit: Make escape handle \r\n properly
15:02 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/cdf1067ff7
15:02 dalek MoarVM/even-moar-jit: 4a35f2c | timotimo++ | src/io/syncfile.c:
15:02 dalek MoarVM/even-moar-jit: handle files where stat falseley reports 0 bytes size
15:02 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/4a35f2cc3d
15:02 dalek MoarVM/even-moar-jit: 04c431f | brrt++ | src/ (2 files):
15:24 brrt joined #moarvm
15:40 dalek MoarVM/even-moar-jit: 8a1ad8b | brrt++ | src/jit/label.c:
15:40 dalek MoarVM/even-moar-jit: Typo fix
15:40 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/8a1ad8baf8
15:43 domidumont joined #moarvm
15:45 dalek MoarVM/even-moar-jit: cf7f90d | brrt++ | src/jit/label.c:
15:45 dalek MoarVM/even-moar-jit: Another typo fix
15:45 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/cf7f90dc63
15:50 tokuhiro_ joined #moarvm
16:04 hoelzro good moarning #moarvm
16:04 jnthn o/ hoelzro
16:04 hoelzro o/ jnthn
16:05 brrt good * hoelzro
16:06 hoelzro greetings brrt
16:06 dalek MoarVM/even-moar-jit: 2a41347 | brrt++ | src/jit/log.c:
16:06 dalek MoarVM/even-moar-jit: Dump dot digraphs of expression trees
16:06 dalek MoarVM/even-moar-jit:
16:06 dalek MoarVM/even-moar-jit: The expression 'trees' are really graphs, and this way we can
16:06 dalek MoarVM/even-moar-jit: visualize them much more readily.
16:06 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/2a4134722a
16:07 brrt timotimo++ for the idea
16:09 brrt dinner &
16:18 zakharyas joined #moarvm
16:45 nwc10 hoelzro: did you get enough anwser about ASAN?
16:46 colomon joined #moarvm
16:46 hoelzro nwc10: timotimo told me about --asan, but I wasn't able to get it working last night =/
16:47 nwc10 :-(
16:47 nwc10 do you remember what the testcase that triggers it is?
16:47 nwc10 I have one built
16:47 hoelzro I can build MoarVM, but once I try to perl Configure.pl --gen-nqp in rakudo, MoarVM gets mad
16:47 nwc10 oh. odd
16:47 hoelzro I don't offhand; I was hoping that pastebin link would be around
16:50 nwc10 did you have an irlog for when it was?
16:51 hoelzro yes, one second
16:51 hoelzro nwc10: http://irclog.perlgeek.de/moarvm/2015-09-30#i_11296805
17:04 kjs_ joined #moarvm
17:19 domidumont joined #moarvm
17:52 tokuhiro_ joined #moarvm
17:56 FROGGS joined #moarvm
17:57 FROGGS o/
18:05 zakharyas joined #moarvm
18:11 ggoebel joined #moarvm
18:46 Ven joined #moarvm
18:54 ilbot3 joined #moarvm
18:54 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
19:15 hoelzro o/ FROGGS
19:21 hoelzro nwc10: may I ask what your OS/toolchain is like? I would like to get an ASAN MoarVM built, and perhaps fix up the issue I'm running into
19:22 nwc10 it' snot my machine. It's fairly old Centos
19:23 nwc10 and root built: gcc (GCC) 4.9.0
19:23 nwc10 ... 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
19:24 hoelzro so you're using the GCC ASAN?
19:24 nwc10 yes
19:24 hoelzro hmm...maybe I can try a build in a VM, see if that works
19:24 hoelzro I'm using a pretty new GCC
19:24 hoelzro but it fails for me with clang too
19:30 kjs_ joined #moarvm
19:31 nwc10 I've not yet figured out what version of nqp and rakduo I was using at the tme
19:31 timotimo i kind of wish brrt had put online an example of the dot output
19:31 timotimo now i'll have to rebuild moar with even-moar-jit to see it :|
19:33 hoelzro I can play around with the ASAN stuff later tonight
19:35 timotimo hoelzro: in what way does asan fail for you?
19:35 hoelzro timotimo: an ASAN configured MoarVM will fail to build NQP
19:35 hoelzro I can paste the output in a bit, if you'd like
19:36 timotimo sure
19:36 timotimo i was hoping it'd be something simple like "cannot link moar because something's missing"
19:36 timotimo to which i'd say "yeah, install the dev files for asan"
19:38 hoelzro moar *did* get mad when I did --asan --compiler clang
19:38 hoelzro but that moar fails to run entirely
19:38 hoelzro let me go break Moar real quick
19:39 timotimo heh
19:46 hoelzro timotimo: https://gist.github.com/hoelzro/f92385cef4e2f7a7f40f
19:47 timotimo er, wha?
19:48 timotimo it's not supposed to quit out if there's leaks at the end
19:48 timotimo thing is, moar will just exit(0) out when the main code is finished
19:48 timotimo so we *expect* lots of leaks at the end
19:48 timotimo for things that are life-of-program scoped
19:49 timotimo i mean, we still do throw out bytecode objects when they get garbage, but mostly they don't
19:49 timotimo huh
19:50 timotimo a few of these are unexpected, though. why would MVM_string_decode_stream_sep_default leak?
19:50 timotimo or does that just mean the MVMString it belongs to didn't get cleaned up?
19:50 timotimo anyway, if you can get the exact invocation that it uses, you can pass that flag to moarvm that asks it to do a full cleanup when it shuts down
19:50 timotimo that'll either make the leak sanitizer happy or it'll at least show "real" leaks
19:51 hoelzro I just did; still got a bunch of warnings and a non-zero exit code
19:51 hoelzro =/
19:55 timotimo update the gist please? :)
19:55 timotimo (i'm hoping that the output would have changed!)
19:56 hoelzro moment
19:58 hoelzro https://gist.github.com/99a68f84f1d8034e7d5e
20:01 timotimo urgh, it has gotten *more*?
20:01 hoelzro it varies from run to run
20:01 timotimo perhaps --full-cleanup has rotted a tiny bit and more things need to be handled there? :\
20:01 timotimo and we can't ask asan to ignore leaks?
20:01 hoelzro oh wait, now it's a consistent 2388 lines
20:02 hoelzro that's a good question
20:02 timotimo can you ensure that the two gists come from the exact same commandline?
20:02 hoelzro they are from the same session, with the same build of MoarVM
20:02 timotimo i mean
20:03 timotimo perhaps we're comparing two different invocations of moar?
20:03 hoelzro I copied the output from Configure & make for the first, and then I ran that raw command with --full-cleanup for the second
20:03 timotimo like, perhaps one of them is for -e 'nqp::getconfig().str.spurt'
20:03 timotimo (the actually working equivalent of that)
20:03 hoelzro ah ha
20:03 timotimo wait, this is about compiling nqp
20:03 timotimo it can't use that %)
20:03 hoelzro yeah
20:03 hoelzro heh
20:03 timotimo or perhaps it does, with the bootstrapped nqp, but that'd be nonsense
20:04 timotimo okay, whatever :|
20:04 timotimo we must find a way to tell asan to not use the leak sanitizer
20:04 hoelzro or fix the leaks ;)
20:04 hoelzro I'd rather take on the former task =)
20:05 vendethiel joined #moarvm
20:07 timotimo a gigantic amount of those leaks are from the fixed size allocator; i'm not sure if that was already around the last time i used --full-cleanup
20:14 hoelzro "The leak detection is turned on by default on Linux; however, it is not yet supported on other platforms."
20:15 hoelzro that explains some things
20:17 timotimo the last time i used asan  (also with gcc) it might have reported leaks, but it didn't set a failing exit code
20:18 timotimo anyway, you can compile moar without asan to build things, then recompile maor with asan to test your stuff
20:18 timotimo i should really have pointed that out sooner!
20:18 hoelzro I did that, but then the Makefile helpfully noticed that $(which moar) hand changed, and subsequentially rebuilt rakudo =/
20:18 hoelzro I *could* just modify the Makefile for now =)
20:18 hoelzro s/hand/had/
20:18 kjs_ joined #moarvm
20:19 timotimo what?!
20:19 timotimo when did that happen
20:20 hoelzro when I tried last night
20:20 timotimo moar shouldn't cause rakudo to rebuild
20:20 hoelzro it looked like it did
20:20 timotimo ... at least when you're a dev like us :|
20:20 hoelzro hehe
20:20 hoelzro I'll try right now
20:20 timotimo shouldn't as in: "IMO that's not what it should do", not as in: "i know it doesn't do that"
20:21 hoelzro I hate that we don't make that distinction in English =/
20:21 hoelzro maybe it ought not to?
20:21 * hoelzro frequently struggles with should vs ought vs supposed to
20:22 hoelzro grrr, there's ASAN_OPTIONS
20:22 hoelzro but no docs on it!
20:22 timotimo right, i have probably ought to have used "ought"
20:23 timotimo ASan's behavior can be changed by exporting the ASAN_OPTIONS env var. Some of the useful options are listed on this page, others can be obtained from running an ASanified binary with ASAN_OPTIONS=help=1.
20:23 timotimo https://www.chromium.org/developers/testing/addresssanitizer
20:23 timotimo isn't it obvious that the docs for ASAN_OPTIONS would be found under chromium.org?
20:23 hoelzro of course!
20:24 hoelzro https://twitter.com/hoelzro/status/664901403509395456
20:24 hoelzro export ASAN_OPTIONS=alloc_dealloc_mismatch=0:detect_leaks=0
20:24 hoelzro from the sanitizers repo
20:25 nwc10 hoelzro: http://paste.scsys.co.uk/501378
20:25 hoelzro yaaay nwc10++
20:25 hoelzro now I don't have to fix my ASAN MoarVM =P
20:25 hoelzro (just kidding)
20:26 nwc10 it would be useful if you did, as I'm going to go to bed at some point
20:26 hoelzro don't worry, I will =)
20:26 hoelzro thank you for reproducing that for me
20:26 nwc10 it was mostly a matter of time, waiting for things to build
20:27 nwc10 (and having to guess suitable revisions)
20:33 Peter_R joined #moarvm
20:35 ilbot3 joined #moarvm
20:35 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
20:39 hoelzro timotimo: just tried the rebuild thing; Rakudo did *not* rebuild after I built a new Moar
20:40 hoelzro nwc10: thanks for putting in the work! hopefully I'll finish before the paste expires this time =)
20:47 hoelzro ASAN tip: ASAN_OPTIONS=detect_leaks=0
20:54 timotimo phew
20:54 timotimo hoelzro: do you think this warrants an entry to the perl6 faq?
20:55 timotimo "i tried running rakudo under asan/valgrind/... and it reported oodles of memory leaks"?
20:55 hoelzro hmm
20:55 hoelzro seems rather low level
20:55 hoelzro we might want to include it under the --asan option help
20:55 timotimo fair enough
20:55 moritz timotimo: #perl6 hasn't been swamped by that question :-)
20:55 timotimo that's true
21:04 hoelzro timotimo: re MadcapJake's issues, do you think we can detect if we're running under valgrind and imply --full-cleanup?
21:05 hoelzro same for ASAN?
21:05 timotimo oof
21:05 timotimo what's the thing called that you can load up symbols with?
21:06 timotimo we could use that to figure out if a random asan symbol is in our executable already
21:06 hoelzro dlopen/dlsym?
21:06 hoelzro we could also have --asan set -DALWAYS_BE_CLEANING or something
21:07 timotimo yeah, that
21:07 hoelzro http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq
21:07 hoelzro valgrind.h provides a RUNNING_ON_VALGRIND macro
21:08 tokuhiro_ joined #moarvm
21:08 hoelzro but that means you need to configure MoarVM after having installed valgrind
21:08 hoelzro and a lot of people install valgrind once they need it
21:08 timotimo yeah, i wanted to add valgrind clientreq at some point
21:08 timotimo but it was a bit harder than i thought
21:09 timotimo it did improve things a bit
21:11 timotimo like, you'd usually get things like "object is 1000000000 bytes into a block of 1000000000000 allocated at MVM_instance_create"
21:11 timotimo when things in the nursery go wrong
21:30 lizmat joined #moarvm
21:58 psch https://github.com/MoarVM/MoarVM/pull/291
21:58 psch i'll push the corresponding changes to rakudo to a branch there for now
21:59 hoelzro psch++
22:00 psch that'd be 3 days for an xmas ticket... feels a little underperforming considering jnthn++ pulls one or two a day... :P
22:00 hoelzro psch: jnthn is magic, though =)
22:01 hoelzro and it's still work that goes towards xmas!
22:01 psch yeah, i'm not really comparing myself, nor taking it as a benchmark
22:02 hoelzro your 3 days is better than I've done for the last few months =/
22:02 kjs_ joined #moarvm
22:04 psch i was really surprised having to get into mvm code with that though
22:04 psch RT #74414, https://rt.perl.org/Ticket/Display.html?id=74414 for reference
22:04 psch but yeah, it happens
22:05 psch the rest of the dependencies to #123766 seems really involved though :/
22:05 psch not sure i can find something i can do anything with...
22:05 hoelzro that's a complicated issue
22:05 psch hoelzro: #74414?  nah, in itself not so much
22:06 psch hoelzro: the trouble was caching, in the end :)
22:06 psch skipping multicaches it was solveable completely in BOOTSTRAP.nqp
22:06 psch but that's obviously regressive wrt performance at least, so...
22:10 psch well, at least that's how i felt about it.  maybe it's actually complicated and i just have too much spare time... :S
22:10 hoelzro =)
22:12 FROGGS joined #moarvm
22:17 hoelzro wow, ASAN spectest sure takes a long time
22:30 Ven joined #moarvm
22:46 Ven joined #moarvm
22:49 Ven joined #moarvm
22:53 FROGGS joined #moarvm
23:16 tokuhiro_ joined #moarvm
23:34 Ven joined #moarvm
23:46 Ven joined #moarvm

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