github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
MasterDuke jnthn: happen to know offhand where a speshresolve getting added to a BB would happen? 00:00
timotimo: how would i know if a function makes sense to add to the script? 00:32
timotimo hm, it only makes sense to have breakpoints in places where the spesh graph has a sane structure 00:33
i.e. not in between major reshufflings i guess
MasterDuke ah, so it's not like there's some function call i can look for in another function to make the decision 00:34
e.g., every function that has a 'log_interesting_stuff_to_the_spesh_log(foo, bar)' in it
timotimo not sure how you mean that 00:35
MasterDuke i added a lot, but now the script doesn't usually finish, and it still doesn't seem to record what i'm looking for
i.e., i should add all functions to the script that have a particular function call within them 00:36
timotimo i wonder if spesh_blocking confuses it somehow 00:37
MasterDuke i don't have it turned on
hm, is there some way i can instrument the spesh logging to find out where the speshresolve lines are coming from? 00:38
timotimo i don't think so, at the moment spesh does its logging, it'll be far from where things were made 00:48
MasterDuke ah, i see the script is actually dumping the graph. so yes, finding out what function creates that speshresolve is the solution i believe 01:24
Geth MoarVM: 9ce36b6a2d | MasterDuke17++ (committed using GitHub Web editor) | src/spesh/manipulate.c
Fix typo in comment
02:32
03:03 evalable6 left 03:05 evalable6 joined, p6bannerbot sets mode: +v evalable6 05:25 MasterDuke left 06:35 domidumont joined 06:36 p6bannerbot sets mode: +v domidumont 06:51 domidumont left 07:07 domidumont joined 07:08 p6bannerbot sets mode: +v domidumont 08:30 lizmat left 09:17 robertle_ joined 09:18 p6bannerbot sets mode: +v robertle_ 09:21 zakharyas joined 09:22 p6bannerbot sets mode: +v zakharyas 09:25 kiwi_92 joined, p6bannerbot sets mode: +v kiwi_92 10:25 kiwi_92 left 10:33 patrickb joined 10:34 p6bannerbot sets mode: +v patrickb
jnthn .tell MasterDuke See optimize_plugin in src/spesh/optimize.c 10:36
yoleaux jnthn: I'll pass your message to MasterDuke.
11:03 domidumont left 11:12 lizmat joined, p6bannerbot sets mode: +v lizmat 11:18 domidumont joined, p6bannerbot sets mode: +v domidumont 11:29 lucasb joined, p6bannerbot sets mode: +v lucasb
Geth MoarVM/jit-expr-float: f95b738945 | (Bart Wiegmans)++ | 5 files
[JIT] Make STORE polymorphic on input

We can always tile a STORE of a NUM operand correctly; in fact, the tiler can always tile generic operands if have the same input and output types.
The complexity of maintaining whether we need to store a num or a reg value in the expression builder wasn't really worth it.
12:03
12:04 brrt joined 12:05 p6bannerbot sets mode: +v brrt
brrt \o 12:07
timotimo o/ 12:08
brrt I think the type system in the expression template compiler now works... 12:09
I kind of hate that that is the best I have to offer. 12:15
Oh well
timotimo steal rust's type system, obviously 12:18
12:24 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo, ZzZombo left 12:34 brrt left 12:39 zakharyas left 12:41 domidumont left 12:43 brrt joined, p6bannerbot sets mode: +v brrt 12:55 domidumont joined, p6bannerbot sets mode: +v domidumont 13:07 brrt left 13:10 brrt joined, p6bannerbot sets mode: +v brrt 14:17 zakharyas joined 14:18 p6bannerbot sets mode: +v zakharyas 14:38 AlexDani` joined 14:39 p6bannerbot sets mode: +v AlexDani` 14:42 AlexDaniel left 14:44 AlexDani` is now known as AlexDaniel 15:15 brrt left 15:38 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke
MasterDuke . 15:43
yoleaux 10:36Z <jnthn> MasterDuke: See optimize_plugin in src/spesh/optimize.c
MasterDuke jnthn: thanks. that's what i suspected, good to have confirmation 15:44
jnthn, timotimo: i removed all the other stuff i added to the trace script and just added optimize_plugin. i do see some output from the script for that (and some other opcodes getting converted to sp_*), but still not the creation of the problematic speshresolve 15:46
timotimo i mean it has to pop into existence somewhere 15:52
and that has to show up in the output
so ... how come NFA's deserialize function doesn't seem to be called during rakudo's build?!
ok, it does happen in install-core-dists 15:53
does that mean when we load the perl6 grammar and its NFAs they get loaded as statementlists, i.e. a whole bunch of int arrays? 15:56
rather than as actual NFA objects?
MasterDuke timotimo: so i'm starting perl6-gdb-m, sourcing the trace script, then `b src/spesh/candidate.c:57 if $_streq(c_name, "index")`, running my example perl6 code, then starting the trace script when it hits the breakpoint
hit "q" after it finishes running and shows the diffs, then continuing in gdb until the example code ends 15:57
timotimo right
MasterDuke then go to the created directory and running 'git log -U300'
timotimo or has the speshresolve been in there from the beginning and continues to the very end?
MasterDuke nope 15:58
it isn't there in the beginning. i do see some changes to the BB where it eventually ends up, but not its insertion
timotimo that's kind of not possible? 15:59
i'm confused
MasterDuke i.e., what that BB looks like in the actual spesh log in the "after" state is not what it looks like at the end of the script's output
is my breakpoint to specific? 16:00
it only gets hit once
timotimo in that case the last breakpoint is too early
MasterDuke hm, any idea of a better way to only trace that particular function? 16:02
timotimo do you have the breakpoint only at the start of the function?
MasterDuke i'm mixing words here. my breakpoint is several lines into MVM_spesh_candidate_add(), because i only want to trace when the perl6 'index' method is getting optimized 16:04
timotimo ah 16:05
you said you had removed your changes from the gdb script
is there one for optimize_plugin, then?
MasterDuke mostly, i've now only added optimize_plugin
before i'd added ~50, but the script always hung 16:06
timotimo hmm
i mean it could be that the dumper encounters something that's temporarily wrong in the spesh graph and gets confused 16:07
maybe into an infinite loop or something
MasterDuke it doesn't use any cpu when hung fwiw
timotimo hm 16:08
i wonder if gdb's pager somehow messes with you
can you get these 50 breakpoints back?
and try again with "set pagination off"?
MasterDuke sure, i saved them as a patch
also, it frequently hangs after the first commit ("before specializing for args", where it creates speshdump.txt) 16:11
well it finished, but same output 16:12
so maybe my breakpoint isn't right 16:13
timotimo here's an idea 16:14
when your breakpoint is hit, fprintf into the spesh log file manually, just a "here\n" or something
then afterwards you can compare if you were looking at the right thing
MasterDuke in gdb?
timotimo yeah, with "call" 16:15
MasterDuke i guess i have to fopen it first and all that?
timotimo i thought you had spesh logging on already? 16:16
MasterDuke yeah
timotimo then it's already open :) 16:17
MasterDuke but i need the spesh log's FILE for fprintf? 16:18
timotimo tc->instance->spesh_log_fh
MasterDuke ha, that is simpler. timotimo++ 16:19
timotimo i'm so exhausted for no good reason :| 16:20
MasterDuke my 'HERE!!' is in the spesh log right before `Specialization of 'index' (cuid: 4053) Before: Spesh of 'index' (cuid: 4053, file: SETTING::src/core/Str.pm6:272) BB 0 (0x7ffff0082e38):` 16:21
timotimo so is that actually the one that has speshresolve in it? 16:22
MasterDuke not in the "before", but yes in the "after"
timotimo in that case the last breakpoint in the trace script is too early 16:25
so it doesn't get the final state, and also not the state "just" before the speshresolve gets added i guess
i might try a nap 16:26
16:28 domidumont left
MasterDuke i'm afk for a while, will continue when i get back 16:28
thanks for the help
16:36 brrt joined, p6bannerbot sets mode: +v brrt 17:06 zakharyas left 17:20 domidumont joined 17:21 p6bannerbot sets mode: +v domidumont 17:35 brrt left 17:43 reportable6 left, shareable6 left, squashable6 left, committable6 left 17:44 releasable6 left, bisectable6 left, squashable6 joined 17:45 reportable6 joined, p6bannerbot sets mode: +v squashable6 17:46 p6bannerbot sets mode: +v reportable6, shareable6 joined 17:47 p6bannerbot sets mode: +v shareable6, releasable6 joined, bisectable6 joined 17:48 p6bannerbot sets mode: +v releasable6, p6bannerbot sets mode: +v bisectable6 17:49 committable6 joined, p6bannerbot sets mode: +v committable6
patrickb o/ 17:57
I think I ran into a wall with my relocatability project. 17:58
I have two strings nqp-home and perl6-home on the C side. Now I need to somehow retrieve them in the ModuleLoader in perl6 land. 18:00
I'm not even sure whether it's better to somehow pass them in or recalculate them from scratch. 18:03
I start to lean into the "just do it again in perl6 land" direction.. 18:10
18:17 robertle_ left
timotimo if it's easy to do again, that's fine. otherwise you can potentially stash them away in the hll syms 19:22
patrickb I already rewrote it in nqp. So yeah... 19:46
20:05 lizmat left 20:18 lizmat joined, p6bannerbot sets mode: +v lizmat 20:36 domidumont left 20:38 lucasb left 21:28 robertle left 22:40 patrickb left