]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
eu-stacktrace WIP: show # of dwfltab processes in summary
authorSerhei Makarov <serhei@serhei.io>
Thu, 29 Aug 2024 20:26:19 +0000 (16:26 -0400)
committerSerhei Makarov <serhei@serhei.io>
Thu, 29 Aug 2024 20:26:19 +0000 (16:26 -0400)
src/stacktrace.c

index b96f900e922f573dfa75f645ca59afadb8d238aa..7efd4acb3a2988d1d4e4cc33d94530a74205c062 100644 (file)
@@ -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;
     }