Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-03-09

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
02:16 FROGGS_ joined #moarvm
02:47 ilbot3 joined #moarvm
02:47 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
04:06 flussence joined #moarvm
07:55 lue joined #moarvm
07:59 cognominal joined #moarvm
09:45 timotimo i ran the moar-heap analyzer with the overflows data analysis
09:45 timotimo 2x 264 bytes, 473x 328 bytes
09:45 timotimo for the simple dummy program '.say for "hi" xx 1000'
09:47 FROGGS timotimo: can you explain what that means for non-professionals?
09:47 timotimo no.
09:48 timotimo i have no idea what that means :)
09:48 timotimo but now i'm analyzing the heap in a few places in the CORE.setting compilation process
09:48 timotimo which should be more meaningful
09:49 timotimo unfortunately the heap analyzer is pretty slow
09:49 timotimo i may have to rewrite it in C at some point for it to actually be useful :\
09:55 timotimo https://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:56 FROGGS these string could easily be the things from getattr($a, Type, '$!value')
09:57 timotimo those should be shared, though, no?
09:57 timotimo since they are compile-time constant and we have a constant pool for that
09:57 FROGGS I'd hope that, but I dunno
09:57 timotimo i know we have a hash at some point that collects string literals and dedups them
09:58 timotimo 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:59 FROGGS just dump them out :P
09:59 timotimo yeah, right
10:01 timotimo after stage parse finished, the heap analyzer is taking its sweet time :|
10:05 timotimo 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 tgt joined #moarvm
10:06 timotimo nope. that's not it.
10:08 timotimo https://gist.github.com/timo/e7168c6ac9ef3e85fb5d
10:09 timotimo the pager that gdb puts in there is really annoying
11:50 jnthn timotimo: Most things in the overflow are probably the STables.
12:55 colomon_ joined #moarvm
13:12 timotimo overflows in the gen2
13:12 timotimo 475 objects; 0  type objects; 0  STables
13:12 timotimo computer says no :)
13:13 jnthn Then computer is wrong. :)
13:13 jnthn I didn't see any STables anywhere in the output.
13:13 jnthn But there must be hundreds.
13:16 timotimo oh
13:16 timotimo that's a good point actually
13:17 timotimo is_stable = flags & 2
13:17 timotimo is that wrong?
13:18 jnthn MVM_CF_STABLE = 2,
13:18 jnthn Seems right at first guess...
13:19 jnthn 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:23 timotimo mhm
13:30 timotimo now it finds 3 stables and 3 type objects in the nursery
13:31 timotimo wan you imagine where all the strings might come from?
13:32 jnthn This was taken after stage parse?
13:33 jnthn If so, almost certainly they are strings captured from the input program.
13:33 jnthn And that made it into the AST
13:34 timotimo ah, hm.
13:38 * timotimo gets a histogram of string values
13:38 timotimo OPER                  [================================================== 154
13:39 timotimo dotty                 [===================================                109
13:39 timotimo infix                 [==================================                 106
13:39 timotimo and then OPER shows up a second time
13:40 timotimo oh, i should change the mvm string pretty printer from "null terminated" to "count how many graphs there are"
13:43 masak timotimo: nice.
13:44 masak timotimo: why is there a '[' but no ']'?
13:44 timotimo because histogram
13:44 masak there must be something I don't know about histograms... :)
13:45 timotimo there is things i know about histograms that i don't know either
13:46 timotimo OPER                  [================================================== 876
13:46 timotimo infix                 [=======================                            413
13:46 timotimo dotty                 [=================                                  315
13:46 timotimo __lowered_param_0     [============                                       226
13:46 timotimo &infix:<,>            [============                                       217
13:46 timotimo __lowered_param_1     [=========                                          163
13:46 timotimo that's pretty wow.
13:47 timotimo https://gist.github.com/timo/e1af6d5c10a4e34d6cb0
13:48 masak timotimo: I think Tufte would say that the '[' is "ink that doesn't convey information in the graph"
13:48 masak (except it's photons, but you know what I mean)
13:48 timotimo mhm
13:48 timotimo should i just drop the [ then?
13:49 timotimo in this part of the nursery i happened to find right here, the most common string is "0"
13:49 timotimo 64 times :)
13:51 masak timotimo: I'm just bikeshedding with the '[', so feel free to ignore me :)
13:51 masak timotimo: good work, whatever it is you're doing.
13:51 masak timotimo++
13:51 timotimo don't you have a commit bit for moarvm? ;)
13:52 timotimo the code might benefit from an additional pair of snake-eyes :P
13:54 masak good sir, could you point me towards the appropriate file?
13:54 * masak pulls
13:57 masak timotimo: ^^
13:58 timotimo tools/moar-gdb.py
13:59 jnthn The [ is just the axis :P
13:59 timotimo aye
13:59 timotimo little buckets that the flowers are growing out of
14:15 masak an axis should be '|', no?
14:15 masak wow, a Python script. didn't expect to find that :)
14:15 masak timotimo++
14:15 timotimo it's the only way to extend gdb at the moment ;)
14:15 jnthn The axis is ribbed :P
14:16 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
14:17 masak as long as we're bikeshedding: we could even go with ╞ and ═
14:17 * masak tries that out
14:17 timotimo :)
14:18 tadzik or those little circles: ◕
14:18 timotimo ⊖_⊖
14:18 FROGGS I use these circles for v5 spectests#
14:18 masak timotimo: from a code review angle: do you find defaultdict(lambda: 0) more readable than defaultdict(int) ?
14:19 timotimo no, i forgot about that
14:19 masak I can change it.
14:21 dalek MoarVM: 6e2f80e | masak++ | tools/moar-gdb.py:
14:21 dalek MoarVM: [moar-gdb.py] change to defaultdict(int)
14:21 dalek MoarVM:
14:21 dalek MoarVM: Shorter, sweeter, and more idiomatic.
14:21 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6e2f80e678
14:29 dalek MoarVM: 941000b | masak++ | tools/moar-gdb.py:
14:29 dalek MoarVM: [moar-gdb.py] attempt at using unicode box symbols
14:29 dalek MoarVM:
14:29 dalek MoarVM: For the histogram. Should look a bit prettier.
14:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/941000b2f9
14:30 masak timotimo: would you mind running 941000b and seeing if it comes out nice?
14:30 masak timotimo: if not, please revert the commit.
14:30 masak (I don't have the gdb module installed here, it seems)
14:31 timotimo you need to symlink the .py file next to the moarvm binary
14:31 timotimo then, gdb will give you a hint how to allow the module to be loaded automatically
14:32 masak hm. could you say that again, but as shell commands?
14:33 masak (might be good to have those instructions in the repo anyway)
14:34 timotimo cd ~/perl6/install/bin; ln -s ~/perl6/moarvm/tools/moar-gdb.py
14:34 timotimo FWIW, there's a bit of an explanation at the beginning of the py file :)
14:34 masak oh!
14:35 masak yeah, I missed that.
14:35 * masak adds the actual commands
14:35 timotimo thanks d)
14:35 timotimo :)
14:36 timotimo i haven't spent that much time making it pretty
14:36 timotimo mostly spent time trying to make gdb's weird values and casting and dereferencing and other things behave the way i want them to
14:36 dalek MoarVM: 3cae301 | masak++ | tools/moar-gdb.py:
14:36 dalek MoarVM: [moar-gdb.py] add shell commands for symlinking
14:36 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3cae3013ac
14:40 timotimo in this spot i've hit here, OPER has been put 1463 times and infix 744 times; and that's just a sampling!
15:12 timotimo turning up the sample count revealed that OPER is in there really, really, really often
15:12 timotimo out of 42k sampled strings, it's in there 3k times
15:12 timotimo infix 1.5k times, dotty 1k times
15:13 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
15:14 timotimo i could probably just make a histogram of string "target addresses"
15:14 jnthn No, I mean MVMString not P6str
15:15 timotimo these are all MVMString
15:15 timotimo P6str       [===========================                        103564
15:15 timotimo that's in a different size bucket
15:16 timotimo but since those are many more, i'm inclined to believe they share the MVMStrings partially
15:50 timotimo size bucket 88 is riddled with holes like a swiss cheese
16:28 masak timotimo: did you try my unicode fix? :)
16:31 timotimo not yet, sorry
18:27 bretor joined #moarvm
20:03 gmostovoj joined #moarvm
20:37 colomon joined #moarvm
22:09 dalek MoarVM: 78994df | (Tobias Leich)++ | src/io/syncfile.c:
22:09 dalek MoarVM: do not stat a file without filename
22:09 dalek MoarVM:
22:09 dalek MoarVM: When we are reading from STDIN, we have no filename set, so dont try to stat a real file.
22:09 dalek MoarVM: This patch was brought to you by jnthn++ :o)
22:09 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/78994dfee7
22:09 dalek MoarVM: abe4c1e | (Tobias Leich)++ | src/io/procops.c:
22:09 dalek MoarVM: pass STDIN to subprocess in shell()
22:09 dalek MoarVM:
22:09 dalek MoarVM: ... so the child process can read from our STDIN when it creates a prompt.
22:09 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/abe4c1e5c1

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary