[Sbcl-devel] csv output of generation stats in gengcg.c

4 views
Skip to first unread message

Marco Baringer

unread,
May 7, 2013, 9:10:41 AM5/7/13
to sbcl-...@lists.sourceforge.net

hi,

Attached are two patches which cause log_generation_stats to output
the stats in csv format. the output of the stats via
write_heap_exhaustion_report and print_generation_stats (which i'm
assuming are going to be read by humans more than machines) has not
been changed (at least, i didn't intend to change it).

the major differences between this and the previous stat logging code
are:

1) there are new global objects (GC_SUMMARY and GC_TIMESTAMP), i added
this in as globals so that the stat collecting code wouldn't have to
allocate any memory (let me know if this is just fool's gold).

1b) thare are new types, used exactly once for the global object
GC_SUMMARY, to hold the gc stats.

2) there's a sperate function for collecting the stats into the global
object and two function for printing it either in a "human readable"
(for lack of a better term) or csv format.

2b) there's a lot more code related to logging in gencgc.c then there
was before.

I've been using this code, admittedly in a very particular environment
where sbcl dies fairly frequently anyway, and haven't run into any
problems with the code. i'm not really sure how you could test this
code other than checking if there are commas and numbers in some
output file, and since that seems like a false comfort, i didn't write
any tests for the code.

0001-Seperate-the-code-for-collecting-gc-stats-from-the-c.patch
0002-Split-write_generation_stats-into-write_generation_s.patch
Reply all
Reply to author
Forward
0 new messages