]> git.eshelyaron.com Git - emacs.git/commit
src/profiler.c: Keep track of the discarded counts
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 10 Mar 2023 20:54:10 +0000 (15:54 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 10 Mar 2023 20:54:10 +0000 (15:54 -0500)
commitd236ab09300070696f21ebfda49678b11c2327eb
treeb49f1f03f7f9168695209668f0560868e6d76672
parent83be04c66ffaec86aee136b9a94979169d1ba68d
src/profiler.c: Keep track of the discarded counts

When the table overflows and wh evict entries, keep track of those
counts in a global counter so we can see the proportion of
samples this represents.

* src/profiler.c (struct profiler_log): Add `discarded` field.
(evict_lower_half): Change arg to be `struct profiler_log`.
Transfer counts to the new `discarded` field.
(record_backtrace): Change arg to be `struct profiler_log`.
(add_sample): Adjust call accordingly.
(export_log): Add `discarded` counts to the result.
Onle add the GC and `discarded` counts if they're non-zero.
(syms_of_profiler): Define new symbol `Discarded Samples`.
src/profiler.c