github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm Set by AlexDaniel on 12 June 2018. |
|||
01:03
sena_kun joined
01:05
Altai-man_ left
01:10
Kaiepi joined
01:27
AlexDaniel joined,
AlexDaniel left,
AlexDaniel joined
01:52
farcas1982regreg joined
|
|||
[Coke] | m: use nqp; dd nqp::hllboolfor(1,"boom") | 02:03 | |
camelia | (signal SEGV) | ||
[Coke] | ^^ | ||
bug nqp#619 | |||
linkable6 | NQP#619 [open]: github.com/Raku/nqp/issues/619 hllboolfor op SEGVs | ||
03:02
Altai-man_ joined
03:05
sena_kun left
05:03
sena_kun joined
05:04
[Coke] joined,
[Coke] left,
[Coke] joined
05:05
Altai-man_ left
07:02
Altai-man_ joined
07:05
sena_kun left
|
|||
MasterDuke | jnthn: github.com/Raku/nqp/issues/619 is actually spesh | 07:38 | |
08:27
zakharyas joined
09:03
sena_kun joined
09:05
Altai-man_ left
09:20
MasterDuke left
09:30
zakharyas left
09:32
zakharyas joined
09:42
zakharyas1 joined
09:44
zakharyas left
10:24
squashable6 left
10:25
squashable6 joined
10:43
zakharyas1 left
11:02
Altai-man_ joined
11:05
sena_kun left
|
|||
nwc10 | jnthn: I hope that your beer fridge operative is doing better than mine. I went to get a beer, and there were none of the one that I wante *in* the fridge. (Almost) two crates worth next to it, but none inside. I had to settle for a substitute. | 11:17 | |
can't get the staff :-( | |||
lizmat feels for nwc10 | 11:24 | ||
timotimo | hey nwc10 | 11:32 | |
imagine >>+<< and friends, as well as >>.blah and -<< were many times faster than they currently are (for native arrays) | |||
got any ideas what you'd implement with that? | 11:33 | ||
nwc10 | I admit that I can't remember what the syntax means, but the answer I'd like to be able to give is "character classes in regular expressions". But I am unfamilar with *anything*/everything, apart from "OMG, there are too many characters in Unicode to keep implementors sane" | 11:35 | |
timotimo | ha | 11:36 | |
those are hyper-operators | |||
like elementwise addition of vectors is >>+<< | |||
they behave much like Z, but >>+<< requires both sides to be the same length, rather than just stopping at the shorter one | 11:37 | ||
and also they are eager rather than lazy | |||
jnthn | nwc10: While operations are going OK, procurement might need to get its finger out soon...stocks are dwindling, especially of imperial stouts/porters. | 11:41 | |
nwc10 | :-) or should that be :-( | 11:42 | |
jnthn | Situation is not critical yet ) | ||
nwc10 | that is good to hear. | ||
dogbert17 | in case anyone is bored and wants to look at gdb output instead I added some to github.com/Raku/nqp/issues/619 | 11:52 | |
nine would love to be bored some time... | 11:53 | ||
timotimo is making hypers run at hyperspeed | |||
dogbert17 so no one is hyperbored then :) | |||
timotimo | hyperborea? | 11:55 | |
nine | my guess is actually correct | 11:56 | |
dogbert17 | you're good at guessing, for me it crashes even if spesh is disabled | 11:57 | |
timotimo | yeah, hllboolfor doesn't check the return value of get_hll or whatever | 11:59 | |
question is what it should return for a bogus hll | |||
making it throw an exception means to also set :throwish on the op | |||
nine | Apparently MVM_hll_get_config_for will happily return an empty config for non-existing hlls | ||
timotimo | which has effects on spesh and jit | ||
nine | But none of the ops that throw exceptions on invalid use are marked :throwish | 12:02 | |
12:05
MasterDuke joined
|
|||
timotimo | that .. might be bad? brrt would know | 12:05 | |
when perf says this code spends 34% of its time in sin_avx, i think i can be happy: | 12:08 | ||
m: my int @a = ^100_000; my int @b = ^100_000; my int @c = ^100_000; my int @d = ^100_000; my int @result = ^100_000; my $now = now; for ^10 { @result = @a >>+<< @b >>+<< @c >>+<< @d>>.sin; Nil }; say now - $now; | |||
camelia | This type cannot unbox to a native integer: P6opaque, Num in block <unit> at <tmp> line 1 |
||
timotimo | ah, right | ||
m: my int @a = ^100_000; my int @b = ^100_000; my int @c = ^100_000; my int @d = ^100_000; my num @result = ^100_000; my $now = now; for ^10 { @result = @a >>+<< @b >>+<< @c >>+<< @d>>.sin; Nil }; say now - $now; | |||
camelia | This type cannot unbox to a native number: P6opaque, Int in block <unit> at <tmp> line 1 |
||
timotimo | mhh? | ||
anyway, my impl doesn't bork on this, which is actually bad because it doesn't always kick in, and if a slight change by a user takes their code from my impl to the regular one, getting type errors like this could be very confusing | 12:09 | ||
12:44
zakharyas joined
12:50
sena_kun joined
12:51
Altai-man_ left
14:00
zakharyas1 joined
14:02
zakharyas left
14:17
MasterDuke left
14:22
AlexDaniel left
14:35
MasterDuke joined
14:37
zakharyas1 left
14:46
zakharyas joined
14:49
Altai-man_ joined
14:51
sena_kun left
15:04
lucasb joined
16:07
AlexDaniel joined,
AlexDaniel left,
AlexDaniel joined
|
|||
nine | I dare say there's something to it: Missing root for `thread_obj` in MVM_gc_mark_thread_blocked (child_tc); at src/core/threads.c:126 used in thread_obj.15_22 = thread_obj; at src/core/threads.c:147 | 16:17 | |
Same goes for Missing root for `config_hash` in MVM_intcache_for (tc, _143); at src/core/hll.c:157 used in D.18030 = config_hash; at src/core/hll.c:159 | 16:20 | ||
Also several of these: Missing root for `t` in msg_box = MVM_repr_box_str (tc, _45, msg_str); at src/io/asyncsocket.c:127 used in _48 = t->body.queue; at src/io/asyncsocket.c:127 | 16:22 | ||
Geth | MoarVM/gcc_root_checker_plugin: 57e798527d | (Stefan Seifert)++ | tools/check-roots.py Add a full list of MVMCollectable types to check-roots.py |
16:23 | |
nine | Time to throw away the whole algorithm | 16:31 | |
timotimo | oh? | ||
start afresh with a different approach now that you've learned something? | |||
nine | Yes. I started out with going through basic blocks and instructions (nice to see the same terminology used) and taking note of things, i.e. collect some state and when I encounter a variable look at the state. | 16:32 | |
That breaks down hard in the face of branching and loops. | 16:33 | ||
So instead, I'll now work my way backwards from every read of a variable through the control flow graph, take every branch and make sure that I will go through each loop at least once. | 16:34 | ||
Should be relatively simple by just going through each BB's preds and add them to my array of seen blocks only after I followed that link. | 16:35 | ||
Only thing I don't yet know: I'll have to take each of these possible paths through the control flow and process them individually, i.e. simulate the temp root stack for each path. Don't know how to bring that into my loops/recursions | 16:40 | ||
16:50
sena_kun joined
16:51
Altai-man_ left
16:55
zakharyas left
17:08
zakharyas joined
|
|||
timotimo | store what state your stuff has when it reaches the start of a BB and only consider a link "seen" if both the target BB (source, really) and "state at that position" were seen as a combination | 17:11 | |
17:36
zakharyas left
|
|||
nine | God damn it Python! | 17:49 | |
def collect_control_flows(bb, path=[], seen={}) | |||
When called with only one arg will always get the same [] and {}, so when you modify them, it carries over | |||
moritz | that's why you default to None | 18:12 | |
and have the clunky if path is None: path = [] branch for each argument | |||
timotimo | ah, yes | ||
a common pitfall | 18:13 | ||
moritz | or path = path or [] | ||
nine | On the bright side: it seems to work! Now correctly detects the error in: void loop_notok(MVMThreadContext *tc, MVMObject *param) { for(int i = 0; i < 2; i++) { MVM_is_null(tc, param); MVMObject *alloced = MVM_repr_alloc_init(tc, tc->instance->boot_types.BOOTInt); } } | 18:14 | |
18:49
Altai-man_ joined
18:51
sena_kun left
19:31
patrickb joined
19:34
patrickb left
19:41
zakharyas joined
19:48
farcas1982regreg left
|
|||
nine | timotimo: Missing root for `ex` in request_all_threads_suspend (tc, ctx, 0B); at src/debug/debugserver.c:563 used in _20 = allocate_handle (tc, ex); at src/debug/debugserver.c:575 | 19:57 | |
timotimo | ex isn't used any more after that though? | 19:59 | |
it's pushed into the handles vector where it'd be marked by the gc, at least that's how i want it to behave :D | |||
nine | ex may have been moved by the request_all_threads_suspend call | 20:00 | |
The message reads like "you need to add an MVMROOT in src/debug/debugserver.c:563 to fix the breakage in src/debug/debugserver.c:575" | 20:03 | ||
timotimo | oh i missed the bit in the middle | 20:06 | |
smort | 20:07 | ||
nine | The exact same error in error handling code is in procops.c, filewatchers.c, 4 times in asyncsocket.c and twice in asyncsocketudp.c | 20:12 | |
All false positives I've looked at so far are because objects were allocated in gen2 directly (mostly deserialization and profiler). | 20:17 | ||
timotimo | ha | 20:19 | |
nine | I'm not so sure about the static_frame cases though. Since freshcoderef allocates one in the nursery the assumption in static frame handling code may actually be wrong | 20:20 | |
Geth | MoarVM/gcc_root_checker_plugin: d4637c1a0a | (Stefan Seifert)++ | tools/check-roots.py Ignore allocations before variable gets overwritten with function results |
20:26 | |
MoarVM/gcc_root_checker_plugin: 7553099753 | (Stefan Seifert)++ | tools/check-roots.py Properly model control flow in check-roots.py For each variable usage, we now trace back the control flow to the start of the function, while ensuring we go through each loop at least once, to get the correct state of the temp root stack at that location. With this we handle branches and loops correctly. |
|||
20:49
squashable6 left
20:50
sena_kun joined,
squashable6 joined
20:51
Altai-man_ left
21:13
zakharyas left
21:18
squashable6 left,
squashable6 joined
21:20
squashable6 left
21:21
squashable6 joined
|
|||
[Coke] | can someone explain one of the bindposXXX opcodes to me so I can document them all? Guessing it's, given an array of the right dimension, set the value at an index-tuple? (why is it "bind"?) | 22:07 | |
e.g. MVM_repr_bind_pos_3d_i? (I know the i is specifying the value type...) | |||
lizmat | [Coke]: there are specific opcodes for 2- and 3- and 3+ dimensional native arrays | 22:08 | |
*shaped | |||
they come in _i, _s and _n tastes | 22:09 | ||
and "" taste for opaques | 22:10 | ||
and atpos* associates | |||
as to why it is "bind": in nqp, there is no assignment :-) | |||
you either bind a value, or a container with a value | 22:11 | ||
[Coke] | is atpos the "get" to bind's "set" ? | 22:12 | |
lizmat | yup | 22:13 | |
m: use nqp; my int @a = 1,2,3; dd nqp::atpos_i(@a,2) | |||
camelia | 3 | ||
[Coke] | Danke | ||
lizmat | m: use nqp; my @a = 1,2,3; dd nqp::atpos(@a,2) | ||
camelia | This type (Array) does not support positional operations in block <unit> at <tmp> line 1 |
||
lizmat | m: use nqp; my @a = 1,2,3; dd nqp::atpos(nqp::getattr(@a,List,'$1reified'),2) # slightly more complex in HLL land | 22:14 | |
camelia | P6opaque: no such attribute '$1reified' on type List in a Array when trying to get a value in block <unit> at <tmp> line 1 |
||
lizmat | m: use nqp; my @a = 1,2,3; dd nqp::atpos(nqp::getattr(@a,List,'$!reified'),2) # slightly more complex in HLL land | ||
camelia | Int @a = 3 | ||
lizmat | sleep& | 22:16 | |
[Coke] | greppable6: atposnd | 22:31 | |
greppable6 | [Coke], Found nothing! | ||
22:49
Altai-man_ joined
22:51
sena_kun left
|
|||
timotimo | multidim arrays are barely performant, maybe that's why they aren'- used often | 23:33 | |
but also people aren't supposed to use nqp ops in the ecosystem :D |