timotimo i can't find any mention of the MVMProfileCallNode being involved in GC; does that mean i should put the name of the library in there as a char pointer rather than an MVMString, as that could potentially moves 00:39
?
i'll do it like that for a start
i don't get it ... my prof_enternative is being called with a null pointer as first arg :o 01:14
ooooooh
wow
a single operand lives at GET_REG(cur_op, 0).o, not with a 2 in it
01:30 vendethiel joined
timotimo i don't get this ... the dump code for native call targets gets run and it has a proper name in the debug output, but it doesn't show up in the profile at all :( 01:47
dalek arVM/profile_native_calls: 499d4c2 | timotimo++ | / (12 files):
add special support for nativecallinvoke to profiler
01:49
timotimo ^- maybe someone sees what's wrong with it? 01:50
i also see nothing in particular in nqp's src/vm/moar/HLL/Backend.nqp that'd be problematic :| 02:00
timotimo goes to bed 02:01
06:27 FROGGS joined
FROGGS brrt: can you gist how it would look like? a short example? 06:32
06:46 brrt joined
dalek arVM: cd4564e | Sue++ | src/core/validation.c:
Modify int format specifications to get rid of warnings in clang.
06:49
arVM: 5ada013 | (Sue Spence)++ | src/ (4 files):
Casts which get rid of warnings in clang.
arVM: f090305 | FROGGS++ | src/ (2 files):
silence MVMint64 printf format warnings
brrt FROGGS: sure, gist.github.com/bdw/736b57fe772fc0269dbe 07:31
FROGGS uhh 07:41
I've problems reading it :o)
(which might not mean much)
brrt know lisp/ 07:53
?
FROGGS no :/ 08:31
brrt well that explains :-) 08:36
FROGGS :o) 08:37
brrt long story short; lisp is written as s-expressions, which are just trees in a in-order notation format; i need trees, hence i reused s-expressions
a lisp sexp is something like (function-name arg1 arg2) 08:38
i.e. function preceedes arguments in a space-delimited list
FROGGS okay, so far so sane
so, (foo (bar 1 2)) means that foo gets the result of bar(1, 2) ? 08:39
JimmyZ brrt: how about something like defops and defmacro 08:40
brrt aye
nah, simpler than that
i'm much to lazy to type def this and def that
JimmyZ like cloujure
brrt more to the point
JimmyZ *clojure
brrt i already have a syntax; i've decided that the best way is to define the expression in the same sexp as the macro name 08:41
so i now have MACRO! (^foo (,bar ,baz) (quix (quam ,bar) ,baz)) 08:42
of course, that means i have to fix up the exprlist parsing a bit
JimmyZ how about :macro ? 08:43
brrt hmm, that's also possible, but confusing because i use the : to separate opcode names from their sexps 08:46
JimmyZ oh
then ^ sounds good enough 08:47
brrt anyway, thanks for the thoughts :-)
bbl 08:56
09:15 rurban joined 09:37 brrt joined
brrt hmm 10:07
if i make the whole thing a s-exp parsing becomes much simpler 10:08
NO ignore that thought 10:15
lizmat can do that :-)
brrt :-) 10:16
i'm being a bit spammy, am i not?
JimmyZ then you can have defops, defmacro, defconst :P 10:27
brrt yes... but i'm not trying to make a whole lisp 10:37
if i did that, why not use lisp 10:38
hmm 11:05
maybe i should relax the double let restriction
doesn't work well with macros
dalek arVM/even-moar-jit: e6a8266 | brrt++ | / (3 files):
Add macro facility to tree-compiler

The expression tree compiler can now deal with (simple) macro's. This makes implementing a lot of ops a lot more tractable.
11:57
brrt i'm kind-of dreading writing the code generator 12:11
12:59 zakharyas joined
timotimo :S 13:19
brrt why that face? :-) 13:21
it's a hard problem, and i'm not 100% sure how to attack it yet
it's a problem of known unknowns
timotimo mhm
brrt you can advice me, if you want 13:23
basically, i want to implement a 'simplest possible' code generator 13:24
i... think i need two things for that
three things, maybe 13:25
1): current register states
2): current value states.... or not.... hmmm
3): the tree structure in terms of register states... 13:26
hmmm
ok, let's rubber-duck this a bit
suppose i have a node, (load a b)
a refers to another node
b refers to the size 13:27
supposing i know the register that holds the value of a, this can be compiled into the instruction
mov sizeparm(b) Rq(result), [Rq(a)]
where sizeparm(b) is either qword dword word or byte 13:28
lets suppose it's just qword :-)
timotimo mhm
and Rq is what exactly? 13:29
so ... in my profiler stuff i just double-checked that the name of the given ProfilerCallNode actually gets encoded to a MVMString correctly, so searching through the json blob should turn it up 13:31
my first thought was that something somewhere must be messing up the tree structure, but the bits that build the successors and such are all shared between regular nodes and ones refering to native calls 13:32
brrt dynasm name for Register holding a Quadword (64 bit value)
hmmm
timotimo ah, ok 13:33
and the nqp code that's there to dump profiler data doesn't care about the inner structure of the tree, it just dumps it all to json :| 13:34
brrt that's alright, isn't it? keep knowledge to a minimum 13:36
13:36 zakharyas joined
timotimo aha! 13:36
when i set the line number to -2, it shows that the entries do make it into the output 13:37
but the names don't survive for some reason
so ... wat? 13:38
brrt i have no idea, sorry :-( 13:45
timotimo if my hair wasn't so gorgeous, i'd be starting to pull at it >_< 13:46
i can only imagine the string somehow ends up getting allocated in the nursery rather than the gen2, but the profiler dump function explicitly sets the "allocate in gen2" bit, the utf8_decode function uses REPR(..)->allocate properly and the string is supposed to be rooted indirectly by the hash we're constructing ... 13:49
and on top of that, things would probably asplode if the string would just move underneith my feet
oh! 13:51
brrt nods
your clearly doing it wrong :-P
timotimo i was using BOOTStr instead of VMString for utf8_decode
well, that's awkward :)
brrt oh, you have an eureka
that would break things, yes
but i'm afk 13:52
timotimo SDL_SetRenderDrawColor
native library:<unknown> 68544
1.48% (123.88ms)
<3
dalek arVM/profile_native_calls: b0e6608 | timotimo++ | src/profiler/profile.c:
fix output of profiler wrt. native function names
13:55
timotimo that's pretty cool 13:56
tadzik I wonder if the qt profiler will need fixing 13:57
prolly not, from the looks of it
timotimo i'm hoping to give native subs a different color for their bars 13:59
so that they stand out a little; currently they are red like non-speshed calls
and i'd like to have a little bar for how much time was spent in native code on the overview page 14:00
tadzik is it included in the profiling josn? 14:04
json
timotimo i set the line number to -2 for those; i haven't looked if we calculate the total time when we load the .html or put that directly into the json 14:05
ah, we have total time and spesh time 14:06
total time is just the time from "start profiling" to "finish profiling"
that makes sense
*sigh* 14:08
find_method takes about 500 ms out of my 9600ms, but it still frustrates me to look at its spesh code 14:09
it gets a "known to be str" argument, boxes it, then unboxes it back to a native string on two different BBs in a row, basically 14:10
it's just these little things that sometimes really bother me %) 14:12
BBIAB 14:13
14:50 vendethiel joined
timotimo not so much activity today, eh? 15:26
nebuchadnezzar timotimo: to hot in Dijon to have activity ;-) 15:35
timotimo yeah, that heat wave ... :(
it's currently about 31 degC in my room and tthat's already more than enough for me, thank you very much 15:36
i'm going to visit a friend who has wifi to the basement ;)
bbiab
15:46 FROGGS joined
nebuchadnezzar timotimo: 34°C 16:17
timotimo argh 16:26
that's how warm it is outside 'round here 16:27
18:19 lizmat joined 20:00 rurban joined
timotimo i wonder if i should merge profile_native_calls 20:06
22:40 ggoebel joined 22:43 lizmat joined 23:15 TEttinger joined