libera/#shirakumo - IRC Chatlog
Search
6:47:08
hayley
Say, I have a hook that runs after GC, and want to check if I should record the pause or not.
6:47:12
Colleen
<shinmera> and you can start the game with (kandria:launch :state T) to load the first save file directly, bypassing the main menu.
6:50:20
Colleen
<shinmera> Oh, and you might want to tweak the display of the GC pause graph in the ui/diagnostics.lisp panel, since I never bothered to figure out what units I'm dealing with :y
6:53:15
hayley
Right. But I'm not sure where to put adding the hook, to add it just after the game loads. Or when to disable it, after the game is closed. (And to do the statistics properly, I guess I need to ignore time spent in Lisp when the game is paused or loading too, but it shouldn't be much more to do.)
6:54:29
Colleen
<shinmera> When I sprof stuff I typically just run the game, when it's up C-c C-c the sprof start, leave it going for a bit, then C-c C-c the sprof stop and then quit the game.
7:19:05
Colleen
<shinmera> But hey, congrats! A complex program with funky pinning and C interactions all works without the engine catching fire.
7:20:29
hayley
It helps that I don't move anything ever, so pinning is almost a no-op (it still has to root the objects). The SBCL test suite hates me for it.
7:21:36
hayley
In particular tests around hash tables fail, because any use of address-based hashing never gets invalidated.
7:22:59
hayley
Very precariously, and I do intend to write a copying pass, if fragmentation gets very bad. But in practise it grows slowly, as objects tend to die in clumps, and the comparison has to be made to a copying GC needing a second semispace to copy into.
7:24:08
hayley
Though SBCL does skimp out on the latter; I forget just how though. But my other tests do run in tighter heaps with the non-moving GC, compared to stock SBCL.
7:30:34
Colleen
<shinmera> how do you track where to allocate stuff? Like a standard C allocator with lists of blocks of various sizes?
7:35:23
hayley
It's currently close enough to the Immix GC by Blackburn and McKinley, but without any defragmentation. drmeister gave me the idea, seeing as MMTk also has it implemented, and he wants to use MMTk in Clasp.
7:38:53
hayley
But somehow writing a new GC mostly based on gencgc seemed easier than teaching SBCL to use a heap managed by MMTk. And I haven't broken that much so far, I guess.
7:39:42
Colleen
<shinmera> Whatever happens I'm excited someone's finally looking at the GC and doing stuff with it :)
11:46:00
hayley
Nothing really yet; I have to time-slice with university assignments. But so far almost all pauses are around 8ms on my machine for gencgc, and 12ms with the non-moving GC.
11:47:02
hayley
I didn't feel any pauses while playing the game, despite F10 showing all the GC pauses. So those numbers seem about right.
12:03:25
Colleen
<shinmera> yeah I assume your machine is fast enough to have enough of a frame budget that the gc doesn't
12:11:01
Colleen
<shinmera> another thing you can try to do is to uncheck vsync and leave the framerate uncapped.
12:11:15
Colleen
<shinmera> if you type `i am a developer` it'll unlock the dev settings, which offer a frame counter, too
12:12:05
hayley
I can't say I noticed 8ms pauses. But the funny thing is, I don't even like video games^W^W^W^Wplay video games much, so I dunno.
12:13:10
Colleen
<shinmera> but then again for the longest time I didn't notice my videos tearing pretty badly until a friend of mine pointed it out
12:13:23
hayley
Still, yes, if I want to talk about absolute times, it would be unreasonable to test on a 5900X.
12:13:49
Colleen
<shinmera> fwiw render time already does not account for much. most of the time is spent in lisp.
13:32:09
Colleen
<shinmera> mood: selwyn: gingerale: |3b|: https://github.com/Shirakumo/trial/pull/32
13:48:59
hayley
As mentioned before, I don't notice it in gameplay, but that is biased by skill issues on my behalf and having a spiffy computer.
13:55:42
Colleen
<selwyn> i meant that more for shinmera, as in is it a big priority to deal with at the moment
14:09:27
Colleen
<shinmera> it is not, but it would take my mind off of dumber things like pooling and stack allocation.
15:04:28
Colleen
<shinmera> In general I want to believe that I won't have to resort to party tricks like that if we have a good GC instead.