From 9251c9db4ecbbadd4eb0154523d294a9cb75a3d1 Mon Sep 17 00:00:00 2001 From: Serhei Makarov Date: Thu, 29 Aug 2024 16:26:19 -0400 Subject: [PATCH] eu-stacktrace WIP: show # of dwfltab processes in summary --- src/stacktrace.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/stacktrace.c b/src/stacktrace.c index b96f900e..7efd4acb 100644 --- a/src/stacktrace.c +++ b/src/stacktrace.c @@ -678,7 +678,9 @@ bool dwfltab_init(void) /* XXX based on lib/dynamicsizehash.* insert_entry_2 */ bool dwfltab_resize(void) { - /* TODO: Also consider LRU eviction? */ + /* TODO: Also implement LRU eviction, especially + given the number of extremely-short-lived + processes seen on GNOME desktop. */ dwfltab *htab = &default_table; ssize_t old_size = htab->size; dwfltab_ent *old_table = htab->table; @@ -1536,8 +1538,9 @@ Utility is a work-in-progress, see README.eu-stacktrace in the source branch.") fprintf(stderr, "\n"); } fprintf(stderr, "===\n"); - fprintf(stderr, "TOTAL -- received %d samples, lost %d samples\n", - total_samples, total_lost_samples); + fprintf(stderr, "TOTAL -- received %d samples, lost %d samples, loaded %ld processes\n", + total_samples, total_lost_samples, + default_table.filled /* TODO: after implementing LRU eviction, need to maintain a separate count, e.g. htab->filled + htab->evicted */); } output_pos = sui.pos; } -- 2.47.3