freenode/#clasp - IRC Chatlog
Search
13:07:33
drmeister
I rearranged backtraces so that now when a fasl is loaded clasp builds and stores an address sorted symbol table and stackmap table for it.
13:08:13
drmeister
So backtraces are fast and we know the start and end of every compiled Common Lisp function.
13:12:00
drmeister
The symbol tables are about 5MB of information for cclasp before I load anything for cando.
13:33:19
drmeister
The notices about trying to freeze memory are related to the backtrace generator and printer that doesn't gc.
13:35:11
drmeister
In a crash I want to be able to generate a backtrace with arguments that will work even if the gc is fubar
13:36:15
drmeister
So for that backtrace generator I had to break rule #0 - "don't put GC pointers in C++ memory".
13:38:39
drmeister
But I still freeze the gc while the backtrace is being generated - then it passes it to Common Lisp and unfreezes the gc.
13:39:21
drmeister
I have to figure out how to freeze boehm. It may not be a problem because there should be plenty of pointers to the objects in the boehm memory and roots to keep everything alive.
13:40:47
Bike
i mean, ideally, i don't think backtrace printing should involve manipulating the gc in any way. i can see having a fallback that does, though.
13:41:22
beach
Is it possible to explain in a few short sentences why GC is not allowed during backtrace?
13:41:58
Bike
because drmeister wants to be able to get a backtrace even in situations where the system is in a really bad place, e.g. if something went wrong with the gc.
13:42:21
drmeister
A std::vector of BacktraceEntry frames is generated while the gc is frozen/parked. Then a Common Lisp function is called for each frame to create a Common Lisp representation. Then the gc is unfrozen/released.
13:43:03
Bike
print-object can be arbitrary code, after all. hell, it might do something complicated like want to compile a new discriminating function
13:43:27
drmeister
I'm pretty sure I can park the mps gc and still allocate things. It just won't move objects or collect them.
13:44:31
drmeister
This is just done for the few moments while the backtrace is generated and transferred to Common Lisp.