mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 14:07:34 +02:00
Use flag to control printing of GC exit stats
This commit is contained in:
parent
42faaae217
commit
d7b5cda3ae
2 changed files with 7 additions and 6 deletions
|
@ -45,6 +45,9 @@
|
|||
// Number of functions to save for printing call history
|
||||
#define MAX_STACK_TRACES 10
|
||||
|
||||
// Show diagnostic information for the GC when program terminates
|
||||
#define DEBUG_SHOW_DIAG 0
|
||||
|
||||
// GC debugging flags
|
||||
#define GC_DEBUG_TRACE 0
|
||||
#define GC_DEBUG_VERBOSE 0
|
||||
|
@ -152,9 +155,6 @@ typedef enum { STAGE_CLEAR_OR_MARKING
|
|||
#define gc_color_red 0 // Memory not to be GC'd, such as on the stack
|
||||
#define gc_color_blue 2 // Unallocated memory
|
||||
|
||||
/* Show diagnostic information for the GC when program terminates */
|
||||
#define DEBUG_SHOW_DIAG 0
|
||||
|
||||
/* Define size of object tags */
|
||||
typedef long tag_type;
|
||||
|
||||
|
|
|
@ -1586,9 +1586,7 @@ object Cyc_integer2char(void *data, object n){
|
|||
void Cyc_halt(closure);
|
||||
void Cyc_halt(env) closure env; {
|
||||
#if DEBUG_SHOW_DIAG
|
||||
printf("Cyc_halt: heap bytes allocated=%d time=%ld ticks no_gcs=%ld no_m_gcs=%ld\n",
|
||||
allocp-bottom,clock()-start,no_gcs,no_major_gcs);
|
||||
printf("Cyc_halt: ticks/second=%ld\n",(long) CLOCKS_PER_SEC);
|
||||
gc_print_stats(Cyc_heap);
|
||||
#endif
|
||||
exit(0);}
|
||||
|
||||
|
@ -2107,6 +2105,9 @@ void _cyc_exit(void *data, object cont, object args) {
|
|||
__halt(car(args));
|
||||
}
|
||||
void __75halt(void *data, object cont, object args) {
|
||||
#if DEBUG_SHOW_DIAG
|
||||
gc_print_stats(Cyc_heap);
|
||||
#endif
|
||||
exit(0); }
|
||||
void _cell_91get(void *data, object cont, object args) {
|
||||
printf("not implemented\n"); exit(1); }
|
||||
|
|
Loading…
Add table
Reference in a new issue