github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:13 Ven`` joined 00:53 konvertex left 01:03 lucasb left 01:11 Ven`` left 05:12 quotable6 left, bloatable6 left, notable6 left, greppable6 left, shareable6 left, tellable6 left, squashable6 left, bisectable6 left, releasable6 left, benchable6 left, committable6 left, nativecallable6 left, sourceable6 left, coverable6 left, statisfiable6 left, evalable6 left, reportable6 left, linkable6 left, unicodable6 left 05:13 tellable6 joined, bisectable6 joined, nativecallable6 joined, releasable6 joined, reportable6 joined, linkable6 joined, statisfiable6 joined 05:14 greppable6 joined, squashable6 joined, quotable6 joined, sourceable6 joined, bloatable6 joined, benchable6 joined, unicodable6 joined, shareable6 joined 05:15 coverable6 joined, notable6 joined, evalable6 joined, committable6 joined
nwc10 good *, #moarvm 06:46
bloatable6? 06:47
nine bloatable6: help 06:50
bloatable6 nine, Like this: bloatable6: d=compileunits 292dc6a,HEAD # See wiki for more examples: github.com/Raku/whateverable/wiki/Bloatable
nwc10 nine: I asked it privately, and then when it refused to tell me, on #whateverable
and now I have bookmarked the github project for further inspection 06:51
06:54 domidumont joined 07:24 zakharyas joined 07:39 sivoais left 07:40 sivoais joined 08:14 Altai-man_ joined 08:24 konvertex joined 08:26 sena_kun joined 08:28 Altai-man_ left 09:34 Ven`` joined 10:15 Ven`` left 10:25 Altai-man_ joined 10:28 sena_kun left 11:09 zakharyas left 12:22 zakharyas joined 12:27 sena_kun joined 12:28 Altai-man_ left
Kaiepi when writing ops for objects of a specific repr, should the function called use MVMObject and check the repr itself, or should it take the actual repr type and have the repr check be done from interp.c? 13:05
jnthn That isn't terribly uniform at the moment. Ultimately, though, splitting the unchecked from the checking is a good way to go. 13:07
A lot of the ops doing these things will eventually go away in favor of the "syscall" dispatch thing speculated in my dispatch work.
Kaiepi aight 13:08
i'm working on a solution for github.com/Raku/problem-solving/issues/111 atm since my grant stuff's blocked. there's a lot of work to do on the backend side of things 13:20
13:21 Kaiepi left 14:26 Altai-man_ joined 14:28 sena_kun left
AlexDaniel` bloatable6: 2019.05,2020.05 14:33
bloatable6 AlexDaniel`, gist.github.com/1d19eb99c5ceda83c2...394824f82d 14:34
AlexDaniel` I wonder if it works
what's [None] ? O_o 14:36
timotimo not sure
MasterDuke nine: how do you run/use your check-roots.py plugin? 14:51
ugh, the plugin doesn't built with gcc 10 15:05
nine I guess you have figured out already that you need [email@hidden.address] 15:14
I only got it to compile with Python 2.7, not Python 3
I've symlinked gcc-c-api and python.so into my MoarVM directory. Then added -fplugin=python.so -fplugin-arg-python-script=tools/check-roots.py to the CFLAGS in the Makefile and run LD_LIBRARY_PATH=. make 15:16
MasterDuke yeah, it's github.com/davidmalcolm/gcc-python...issues/181
nine At least there seems to be a PR 15:17
MasterDuke yeah, just makes it more annoying to use my system package manager to install it 15:18
15:22 zakharyas left
MasterDuke tried applying a couple of the other PRs to get python 3 working, but it didn't in the end, so just switched to python 2 15:39
but did finally get it working, nine++
nine woohoo 15:40
MasterDuke huh. my plugin can find paired malloc/free, but doesn't find any mallocs without a free before an MVM_exception_throw_adhoc. and of course i don't remember where i thought i saw one for sure that the plugin should have found... 16:26
16:27 sena_kun joined 16:29 Altai-man_ left 17:26 MasterDuke left 17:46 domidumont left 18:10 MasterDuke joined
MasterDuke wtf? `ins.fn.operand.name` is never 'MVM_exception_throw_adhoc' in src/strings/ops.c, that's not right... 18:17
18:26 Altai-man_ joined 18:28 sena_kun left
MasterDuke there are a bunch of things with names like '_16'. i tried compiling with --optimize=0, but they still happen. any way to not do that? 18:38
i just compiled all of moarvm. printing out every function call the plugin sees and there aren't any MVM_exception_throw_* 18:39
timotimo what do you mean _16? things? is that like C-level stuff? 18:58
i'm kinda confused :) :)
ah is this about your gcc plugin?
are we working with python2 or python3? 19:04
all print invocations are print functions so that points towards python3
do we want a Makefile target to build the whole thing with the checker plugin? 19:07
MasterDuke python2. let me gist a diff 19:08
timotimo aw crap now i installed the python3 version of the plugin 19:09
MasterDuke gist.github.com/MasterDuke17/eb9c8...8dd36aa041
i don't think the script has any incompatibilities
but i could only get the python2 version of the plugin to build 19:10
timotimo how do i invoke it for the program?
for the codebase*
MasterDuke colabti.org/irclogger/irclogger_lo...-05-19#l82
timotimo ah there it is 19:11
have you tried the show-gimple or show-ssa or show-callgraph example scripts to see what the stuff looks like on the inside? 19:13
callgraph is "only" for functions, but perhaps it's good enough for finding if it ever has exception_throw_* anywhere 19:14
MasterDuke nope. i did try undefining MVM_NO_RETURN, but that didn't make a difference 19:17
unmodified generate-callgraph-c.py doesn't show anything useful 19:19
timotimo cc1: error: plugin python should be specified before ‘-fplugin-arg-python-script=tools/show-callgraph.py’ in the command line 19:20
cc1: error: fail to initialize plugin /usr/lib/gcc/x86_64-redhat-linux/9/plugin/python2.so
:( :(
MasterDuke did you symlink the two .so files? 19:21
and show-callgraph.py doesn't have any MVM_exception_* in the graph 19:22
weird
timotimo cc1: error: plugin python should be specified before ‘-fplugin-arg-python-script=tools/show-callgraph.py’ in the command line 19:24
cc1: error: fail to initialize plugin ./python2.so
after symlinking both .so files and setting the library path
19:24 zakharyas joined
timotimo if i use gcc-with-python2 instead of gcc for CC in the makefile it complains that the plugin gets initialized with two different paths 19:24
MasterDuke fwiw, this is how i'm running it. `PYTHONPATH=/home/dan/Source/gcc-python-plugin/ LD_LIBRARY_PATH=. make -j12` 19:25
timotimo gcc -c -fplugin=./python2.so -fplugin-arg-python-script=tools/show-callgraph.py -Wextra -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Werror=pointer-arith -O3 -DNDEBUG -g3 -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC -DDEBUG_HELPERS -DMVM_HEAPSNAPSHOT_FORMAT=3 -march=native -DMVM_TRACING=0 -DMVM_CGOTO=1 -DMVM_RDTSCP=1 -DMVM_BUILD_SHARED -fPIC -I3rdparty/libuv/include
-I3rdparty/libuv/src -I3rdparty/libatomicops/src -I3rdparty/libtommath -I3rdparty/dyncall/dynload -I3rdparty/dyncall/dyncall -I3rdparty/dyncall/dyncallback -I3rdparty/sha1 -isystem3rdparty/tinymt -isystem3rdparty/dynasm -isystem3rdparty/cmp -isystem3rdparty -Isrc -o src/strings/ops.o src/strings/ops.c 19:26
this is the full commandline exactly how make fires it off
MasterDuke and i added `-fplugin=python.so -fplugin-arg-python-script=show-callgraph.py` to the end of the CFLAGS in the Makefile
timotimo oh, end?
makes no change
MasterDuke what version of gcc? 19:30
timotimo gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC) 19:31
MasterDuke huh. not that old 19:32
timotimo oh 19:34
i think i know what the problem is
the flag had to change to -fplugin-arg-python2-script=... 19:35
cc1: error: fail to initialize plugin ./python.so 19:36
is now all that i'm getting
aha 19:43
different version of gcc and gcc-plugin installed
the internet claims it's supposed to say "version mismatch between gcc and plugin" or so 19:44
MasterDuke huh 19:46
timotimo no, that's not it 19:48
gcc-plugin-devel wasn't installed at all, and that's what would give trouble when it's mismatched 19:49
but that's for when i want to build it myself
it is, however, packaged in fedora
MasterDuke so should be working now? 19:51
timotimo doesn't tho 19:52
nine what does ldd say on python.so? 19:55
MasterDuke: the _16 stuff are just temporary variables 19:56
MasterDuke yeah
but any idea why i don't see MVM_exception_* anywhere? 19:57
timotimo gist.github.com/timo/133cca89e863d...862e2c7dd9 19:58
nine MasterDuke: you could try dot = cfg_to_dot(fun.cfg); invoke_dot(dot) 20:01
That gives you flow diagrams of the function in question. May help understand the Gimple tree
That's a seriously cool feature 20:02
timotimo: it's something I wouldn't be surprised to see from you for our spesh graphs at some point :)
timotimo: have you tried -fplugin=python2.so and running with LD_LIBRARY_PATH=.? 20:03
I'm pretty sure I tried and failed with ./python2.so
MasterDuke nine: gist updated
nine MasterDuke: except Exception: pass is evil...who knows what kind of errors prevent it from seeing the function calls you're after? 20:04
MasterDuke well, i added it because some ins doesn't have a .fn.operand.name after i commented out your `if isinstance(ins.fn, gcc.AddrExpr):`. 20:06
nine Yeah, because the call could be something else. Which it maybe is in the case of MVM_exception_throw_adhoc 20:07
MasterDuke 'gcc.SsaName' object has no attribute 'operand'
nine gcc-python-plugin.readthedocs.io/e...#ssa-names 20:09
MasterDuke if i put the if back in and print the ins in an else, i get `D.20777 = _13 (tc, _15)` and `s = _10 (tc, _13);` 20:10
timotimo nine: you mean like kinda like tools/graph_spesh.p6
nine Haha...of course you already did :) 20:11
timotimo 6 years ago :) :) 20:12
that's when the first commit landed with that in it
MasterDuke `_13 = _12->pos_funcs.get_elem_storage_spec;` and `_10 = _9->allocate;` 20:13
nine Ah, yes, repr function pointers
Oh, those could be an additional source for allocations that my plugin doesn't check yet 20:14
timotimo ah, interesting
sometimes we have a repr check immediately before the invocation
so you can have a map from repr id to which struct
though they are all called this_repr :D
committer Timo Paulssen <timonator@perpetuum-immobile.de> Wed Mar 22 22:28:48 2017 +0100 20:15
give this_repr consts more meaningful names
i guess not
20:17 timotimo left, timo joined 20:18 timo is now known as Guest71053, Guest71053 is now known as timotimo 20:27 sena_kun joined 20:29 Altai-man_ left
MasterDuke it's not just MVM_exception_*. i did a make clean and then made again (having been compiling without optimizations), printing out everything, but turn_32bit_into_8bit_unchecked wasn't there either 20:36
20:40 squashable6 left 20:42 squashable6 joined
timotimo how do fully inlined functions show up? 20:43
MasterDuke ones marked inline? 20:46
timotimo or static inlino 20:47
MasterDuke siphashfinish_32bits shows up and it's `MVM_STATIC_INLINE uint64_t siphashfinish_32bits (siphash *sh, const uint32_t src) {` 20:52
compiling everything (i.e., after a make clean) give ~1780 unique function names. ctags gives ~2700 20:53
21:34 zakharyas left 21:38 konvertex left 22:26 Altai-man_ joined 22:28 sena_kun left
timotimo looking further into the hllize optimization, and it's not easy to just code-gen what it'd do, because i don't think there's an op that can "skip this work if the hll already matches" 22:30
hm. looks like whenever the hll is "not the same", it's actually null on the type 22:33
MasterDuke you mean you don't think there's an op to do "skip this work if the hll already matches"? or none of the existing ops could "skip this work if the hll already matches"? 22:36
23:07 Altai-man_ left