From acb3cb0290d202cd9dc36be4fbfacc2c2b1b7d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sun, 1 Dec 2024 00:45:40 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BF=D1=80=D0=B8=20=D0=B2=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B8=20=D0=BF=D1=80=D0=BE=D1=84=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20GC=20(=D0=BE?= =?UTF-8?q?=D0=BF=D1=86=D0=B8=D1=8F=20`MDBX=5FENABLE=5FPROFGC`).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gc-get.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gc-get.c b/src/gc-get.c index 595c18a5..04656595 100644 --- a/src/gc-get.c +++ b/src/gc-get.c @@ -773,7 +773,7 @@ static inline pgr_t page_alloc_finalize(MDBX_env *const env, #if MDBX_ENABLE_PROFGC size_t majflt_before; const uint64_t cputime_before = osal_cputime(&majflt_before); - gc_prof_stat_t *const prof = (mc->mc_dbi == FREE_DBI) + gc_prof_stat_t *const prof = (cursor_dbi(mc) == FREE_DBI) ? &env->lck->pgops.gc_prof.self : &env->lck->pgops.gc_prof.work; #else @@ -889,7 +889,7 @@ pgr_t gc_alloc_ex(const MDBX_cursor *const mc, const size_t num, MDBX_txn *const txn = mc->txn; MDBX_env *const env = txn->env; #if MDBX_ENABLE_PROFGC - gc_prof_stat_t *const prof = (mc->mc_dbi == FREE_DBI) + gc_prof_stat_t *const prof = (cursor_dbi(mc) == FREE_DBI) ? &env->lck->pgops.gc_prof.self : &env->lck->pgops.gc_prof.work; prof->spe_counter += 1;