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
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
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.
Get latest updates about Open Source Projects, Conferences and News.