02:16 FROGGS_ joined 02:47 ilbot3 joined 04:06 flussence joined 07:55 lue joined 07:59 cognominal joined
timotimo i ran the moar-heap analyzer with the overflows data analysis 09:45
2x 264 bytes, 473x 328 bytes
for the simple dummy program '.say for "hi" xx 1000'
FROGGS timotimo: can you explain what that means for non-professionals? 09:47
timotimo no.
i have no idea what that means :) 09:48
but now i'm analyzing the heap in a few places in the CORE.setting compilation process
which should be more meaningful
unfortunately the heap analyzer is pretty slow 09:49
i may have to rewrite it in C at some point for it to actually be useful :\
gist.github.com/timo/e467726458781ec37c2c - i wonder where these come from. that's quite a lot of strings, nums and hashes in the old generation 09:55
FROGGS these string could easily be the things from getattr($a, Type, '$!value') 09:56
timotimo those should be shared, though, no? 09:57
since they are compile-time constant and we have a constant pool for that
FROGGS I'd hope that, but I dunno
timotimo i know we have a hash at some point that collects string literals and dedups them
i would have thought it could be lots of substrings from the source code, but those wouldn't likely end up in the old generation 09:58
FROGGS just dump them out :P 09:59
timotimo yeah, right
after stage parse finished, the heap analyzer is taking its sweet time :| 10:01
it may take so long because it tries to walk all the free-lists and a whole lot of space is likely freed now 10:05
10:05 tgt joined
timotimo nope. that's not it. 10:06
gist.github.com/timo/e7168c6ac9ef3e85fb5d 10:08
the pager that gdb puts in there is really annoying 10:09
jnthn timotimo: Most things in the overflow are probably the STables. 11:50
12:55 colomon_ joined
timotimo overflows in the gen2 13:12
475 objects; 0 type objects; 0 STables
computer says no :)
jnthn Then computer is wrong. :) 13:13
I didn't see any STables anywhere in the output.
But there must be hundreds.
timotimo oh 13:16
that's a good point actually
is_stable = flags & 2 13:17
is that wrong?
jnthn MVM_CF_STABLE = 2, 13:18
Seems right at first guess...
Thing is, I remember fixing an issue with mis-handling of overflows months ago, and the thing that it was tripping up over was an STable...so I'm almost certian that's where they end up living. 13:19
timotimo mhm 13:23
now it finds 3 stables and 3 type objects in the nursery 13:30
wan you imagine where all the strings might come from? 13:31
jnthn This was taken after stage parse? 13:32
If so, almost certainly they are strings captured from the input program. 13:33
And that made it into the AST
timotimo ah, hm. 13:34
timotimo gets a histogram of string values 13:38
OPER [================================================== 154
dotty [=================================== 109 13:39
infix [================================== 106
and then OPER shows up a second time
oh, i should change the mvm string pretty printer from "null terminated" to "count how many graphs there are" 13:40
masak timotimo: nice. 13:43
timotimo: why is there a '[' but no ']'? 13:44
timotimo because histogram
masak there must be something I don't know about histograms... :)
timotimo there is things i know about histograms that i don't know either 13:45
OPER [================================================== 876 13:46
infix [======================= 413
dotty [================= 315
__lowered_param_0 [============ 226
&infix:<,> [============ 217
__lowered_param_1 [========= 163
that's pretty wow.
gist.github.com/timo/e1af6d5c10a4e34d6cb0 13:47
masak timotimo: I think Tufte would say that the '[' is "ink that doesn't convey information in the graph" 13:48
(except it's photons, but you know what I mean)
timotimo mhm
should i just drop the [ then?
in this part of the nursery i happened to find right here, the most common string is "0" 13:49
64 times :)
masak timotimo: I'm just bikeshedding with the '[', so feel free to ignore me :) 13:51
timotimo: good work, whatever it is you're doing.
timotimo++
timotimo don't you have a commit bit for moarvm? ;)
the code might benefit from an additional pair of snake-eyes :P 13:52
masak good sir, could you point me towards the appropriate file? 13:54
masak pulls
timotimo: ^^ 13:57
timotimo tools/moar-gdb.py 13:58
jnthn The [ is just the axis :P 13:59
timotimo aye
little buckets that the flowers are growing out of
masak an axis should be '|', no? 14:15
wow, a Python script. didn't expect to find that :)
timotimo++
timotimo it's the only way to extend gdb at the moment ;)
jnthn The axis is ribbed :P
timotimo if you want, you can make the histogram output unicode full blocks and have the last character be an appropriate member of the eights blocks characters 14:16
jnthn But yeah, could be | :) This is the biggest bikeshed ever :P
masak as long as we're bikeshedding: we could even go with ā•ž and ā• 14:17
masak tries that out
timotimo :)
tadzik or those little circles: ā—• 14:18
timotimo āŠ–_āŠ–
FROGGS I use these circles for v5 spectests#
masak timotimo: from a code review angle: do you find defaultdict(lambda: 0) more readable than defaultdict(int) ?
timotimo no, i forgot about that 14:19
masak I can change it.
dalek arVM: 6e2f80e | masak++ | tools/moar-gdb.py:
[moar-gdb.py] change to defaultdict(int)

Shorter, sweeter, and more idiomatic.
14:21
arVM: 941000b | masak++ | tools/moar-gdb.py:
[moar-gdb.py] attempt at using unicode box symbols

For the histogram. Should look a bit prettier.
14:29
masak timotimo: would you mind running 941000b and seeing if it comes out nice? 14:30
timotimo: if not, please revert the commit.
(I don't have the gdb module installed here, it seems)
timotimo you need to symlink the .py file next to the moarvm binary 14:31
then, gdb will give you a hint how to allow the module to be loaded automatically
masak hm. could you say that again, but as shell commands? 14:32
(might be good to have those instructions in the repo anyway) 14:33
timotimo cd ~/perl6/install/bin; ln -s ~/perl6/moarvm/tools/moar-gdb.py 14:34
FWIW, there's a bit of an explanation at the beginning of the py file :)
masak oh!
yeah, I missed that. 14:35
masak adds the actual commands
timotimo thanks d)
:)
i haven't spent that much time making it pretty 14:36
mostly spent time trying to make gdb's weird values and casting and dereferencing and other things behave the way i want them to
dalek arVM: 3cae301 | masak++ | tools/moar-gdb.py:
[moar-gdb.py] add shell commands for symlinking
timotimo in this spot i've hit here, OPER has been put 1463 times and infix 744 times; and that's just a sampling! 14:40
turning up the sample count revealed that OPER is in there really, really, really often 15:12
out of 42k sampled strings, it's in there 3k times
infix 1.5k times, dotty 1k times
jnthn timotimo: Is this strings themselves, or boxings of them? 15:13
timotimo good question. i can't tell if any of them share the underlying character array
i could probably just make a histogram of string "target addresses" 15:14
jnthn No, I mean MVMString not P6str
timotimo these are all MVMString 15:15
P6str [=========================== 103564
that's in a different size bucket
but since those are many more, i'm inclined to believe they share the MVMStrings partially 15:16
size bucket 88 is riddled with holes like a swiss cheese 15:50
masak timotimo: did you try my unicode fix? :) 16:28
timotimo not yet, sorry 16:31
18:27 bretor joined 20:03 gmostovoj joined 20:37 colomon joined
dalek arVM: 78994df | (Tobias Leich)++ | src/io/syncfile.c:
do not stat a file without filename

When we are reading from STDIN, we have no filename set, so dont try to stat a real file. This patch was brought to you by jnthn++ :o)
22:09
arVM: abe4c1e | (Tobias Leich)++ | src/io/procops.c:
pass STDIN to subprocess in shell()

  ... so the child process can read from our STDIN when it creates a prompt.