github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:01 squashable6 joined 00:24 lucasb left 00:30 Kaiepi joined 00:31 Kaiepi left 01:00 Kaiepi joined 01:34 ZzZombo_ joined 01:36 squashable6 left, ZzZombo left, ZzZombo_ is now known as ZzZombo 01:38 squashable6 joined 02:54 ZzZombo_ joined 02:58 ZzZombo left, ZzZombo_ is now known as ZzZombo
Geth MoarVM: vrurg++ created pull request #1203:
[WIP] Sample code for stringification and printing of internal structures
03:12
03:14 Geth joined 03:47 squashable6 left 03:48 squashable6 joined 05:09 evalable6 joined 06:18 domidumont joined 06:36 domidumont left
nine .tell vrurg do you know about DEBUG_HELPERS, MVM_dump_p6opaque and MVM_dump_bytecode? 06:41
tellable6 nine, I'll pass your message to vrurg
06:49 sena_kun joined 07:14 MasterDuke joined 08:13 sena_kun left 09:34 domidumont joined 09:44 domidumont left 09:45 domidumont joined 10:04 Guest13443 joined 10:43 sena_kun joined 11:20 AlexDaniel left, AlexDaniel joined, AlexDaniel left, AlexDaniel joined 11:23 vrurg left 12:07 AlexDaniel left 12:10 lucasb joined 13:10 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 13:12 hankache joined 13:16 AlexDaniel left 13:22 vrurg joined
vrurg . 13:30
tellable6 2019-10-23T06:41:38Z #moarvm <nine> vrurg do you know about DEBUG_HELPERS, MVM_dump_p6opaque and MVM_dump_bytecode?
vrurg .tell nine I didn't know about those. Overlooked DEBUG_HELPERS while was grepping for DEBUG. Will look into these, thanks! 13:34
tellable6 vrurg, I'll pass your message to nine
timotimo vrurg: there's also the stuff in the debugserver that turns objects into messagepack structures 13:57
if there's a little python plugin in gdb, it could most probably turn that back into human-readable immediately
vrurg timotimo: I know about the python plugin but it's rather limited. The debug server is for debugging NQP/Raku but there is little for debugging moar itself. Not for tracing mode. Two dump functions mentioned by nine is basically everything. 14:02
Besides, I'm trying to make it unified and centralized. I.e. have stringifiers which just produce list of strings. Where and how they're to be used it up to a dev. Plus the possibility in the future to sync tracing with higher level code by turning debug flag on/off when needed. And currently fprintf often mess up with say/note output. 14:05
Just came to my mind that stringifiers could produce hashes instead of strings. 14:07
timotimo keep in mind that that will allocate 14:08
vrurg you mean memory consumption? 14:11
timotimo it will run the GC 14:12
if the user is supposed to run that as an nqp:: command, that's fine
but if you're expected to call it from gdb, or insert it in random places in the code, there'll have to be rooting considerations
vrurg In code ā€“ yes, I understand this. Use from gdb should be possible if it's just something like `call dump_MVMObject(tc, obj)` 14:15
nine But that will also alter the GC's state which will make them much less useful for debugging GC issues 14:16
tellable6 2019-10-23T13:34:49Z #moarvm <vrurg> nine I didn't know about those. Overlooked DEBUG_HELPERS while was grepping for DEBUG. Will look into these, thanks!
nine Also they can fail spectacularily when called in the middle of a GC run - which is often the case with the mentioned GC issues 14:17
vrurg Then it makes sense to turn to simper structure. And I should use neither MVMArray nor MVMString too. 14:22
14:25 hankache left
timotimo a GDB plugin can do memory accesses without causing crashes in the user program 14:27
vrurg But it's limited in functionality. :( Perhaps I wouldn't start this if there'd be other way to introspect structures. Especially MVMStrings. 14:30
timotimo what do you mean "it's limited in functionality"? 14:31
vrurg It only supports MVMObjects and I did't manage to get it working with MVMString a while ago. 14:34
timotimo that's not a limitation of gdb plugins
i'm not saying "use the gdb python plugin", i'm saying "we could add to the gdb python plugin" 14:35
vrurg Sorry, I meant exactly what you're saying. :)
timotimo gdb python plugins can do everything gdb can do
vrurg Unfortunately, I don't know python and not gonna learn it just for a plugin. 14:36
timotimo yeah, the gdb python interface is also *enormously* annoying to use
not to mention slow 14:37
well, slow-ish
it's not fast enough to go through the entire nursery and check all objects for their type and some values in less than like half a minute
vrurg So, maybe it makes sense then to provide means for faster introspection? Less handy though. 14:39
I'm still in doubt if it makes sense to continue the work or just use it for my current task and then stash somewhere for personal use. 14:40
timotimo in my experience, calling functions from gdb can completely destabilize a running session
not to speak of rr replay
vrurg This I know well. Last time I tried dumping MVMStrings and it was ending up with total lockup. 14:41
nine To dump strings I just use "call MVM_string_utf8_encode_C_string(tc, thestring)" 14:42
timotimo doesn't that malloc?
nine It does. But that's usually ok 14:43
timotimo mhh
vrurg nine: How would you dump lexical names in a frame?
It's a hash, if I'm not mistaken. 14:44
Ok, unfortunately, I need to run. Will follow later. Thanks! 14:45
15:11 domidumont left 15:43 domidumont joined 15:44 Guest13443 left 16:01 mtj_ left 16:16 Altai-man_ joined 16:17 Altai-man_ left 16:18 Kaiepi left 16:19 sena_kun left 16:33 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 17:00 domidumont left 17:17 domidumont joined 18:20 domidumont left 18:25 Kaiepi joined 20:21 MasterDuke left 22:12 ggoebel left