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