shithub: femtolisp

Download patch

ref: 3d517354ddc28b8f92dff23713e5251c74c7e3b3
parent: 9c48e4c895915eea3d7d7ee7b3287d23b9766da5
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Nov 26 15:54:22 EST 2024

tweak *vm-stats*

--- a/flisp.c
+++ b/flisp.c
@@ -2097,11 +2097,13 @@
 {
 	USED(args);
 	argcount(nargs, 0);
-	ios_printf(ios_stderr, "nstack        %"PRIu32"\n", FL(nstack));
-	ios_printf(ios_stderr, "heap total    %"PRIu32"\n", FL(heapsize));
-	ios_printf(ios_stderr, "heap free     %"PRIu64"\n", (uint64_t)(FL(lim)-FL(curheap)));
-	ios_printf(ios_stderr, "maxfinalizers %"PRIu64"\n", (uint64_t)FL(maxfinalizers));
-	ios_printf(ios_stderr, "gc calls      %"PRIu64"\n", (uint64_t)FL(gccalls));
+	ios_printf(ios_stderr, "heap total     %10"PRIu32"\n", FL(heapsize));
+	ios_printf(ios_stderr, "heap free      %10"PRIu32"\n", (uint32_t)(FL(lim)-FL(curheap)));
+	ios_printf(ios_stderr, "heap used      %10"PRIu32"\n", (uint32_t)(FL(curheap)-FL(fromspace)));
+	ios_printf(ios_stderr, "stack          %10"PRIu32"\n", FL(nstack)*sizeof(value_t));
+	ios_printf(ios_stderr, "gc calls       %10"PRIu64"\n", (uint64_t)FL(gccalls));
+	ios_printf(ios_stderr, "max finalizers %10"PRIu32"\n", (uint32_t)FL(maxfinalizers));
+	ios_printf(ios_stderr, "opcodes        %10d\n", N_OPCODES);
 	return FL(t);
 }