diff --git a/ddprof-lib/src/main/cpp/context.cpp b/ddprof-lib/src/main/cpp/context.cpp index f65eb0d08..f135de84c 100644 --- a/ddprof-lib/src/main/cpp/context.cpp +++ b/ddprof-lib/src/main/cpp/context.cpp @@ -35,6 +35,9 @@ Context& Contexts::get(int tid) { if ((context.spanId ^ context.rootSpanId) == context.checksum) { return context; } + Counters::increment(CounterId::CONTEXT_CHECKSUM_REJECT_GETS); + } else { + Counters::increment(CounterId::CONTEXT_NULL_PAGE_GETS); } } else { Counters::increment(CounterId::CONTEXT_BOUNDS_MISS_GETS); diff --git a/ddprof-lib/src/main/cpp/counters.h b/ddprof-lib/src/main/cpp/counters.h index 133aadc0e..5c2c58152 100644 --- a/ddprof-lib/src/main/cpp/counters.h +++ b/ddprof-lib/src/main/cpp/counters.h @@ -41,6 +41,8 @@ X(CONTEXT_STORAGE_PAGES, "context_storage_pages") \ X(CONTEXT_BOUNDS_MISS_INITS, "context_bounds_miss_inits") \ X(CONTEXT_BOUNDS_MISS_GETS, "context_bounds_miss_gets") \ + X(CONTEXT_CHECKSUM_REJECT_GETS, "context_checksum_reject_gets") \ + X(CONTEXT_NULL_PAGE_GETS, "context_null_page_gets") \ X(CALLTRACE_STORAGE_BYTES, "calltrace_storage_bytes") \ X(CALLTRACE_STORAGE_TRACES, "calltrace_storage_traces") \ X(LINEAR_ALLOCATOR_BYTES, "linear_allocator_bytes") \