PostgreSQL Source Code git master
|
Go to the source code of this file.
Macros | |
#define | PGSTAT_COUNT_SLRU(stat) |
#define | SLRU_ACC(fld) sharedent->fld += pendingent->fld |
Functions | |
static PgStat_SLRUStats * | get_slru_entry (int slru_idx) |
static void | pgstat_reset_slru_counter_internal (int index, TimestampTz ts) |
void | pgstat_reset_slru (const char *name) |
PgStat_SLRUStats * | pgstat_fetch_slru (void) |
const char * | pgstat_get_slru_name (int slru_idx) |
int | pgstat_get_slru_index (const char *name) |
bool | pgstat_slru_flush_cb (bool nowait) |
void | pgstat_slru_init_shmem_cb (void *stats) |
void | pgstat_slru_reset_all_cb (TimestampTz ts) |
void | pgstat_slru_snapshot_cb (void) |
Variables | |
static PgStat_SLRUStats | pending_SLRUStats [SLRU_NUM_ELEMENTS] |
static bool | have_slrustats = false |
#define PGSTAT_COUNT_SLRU | ( | stat | ) |
Definition at line 58 of file pgstat_slru.c.
#define SLRU_ACC | ( | fld | ) | sharedent->fld += pendingent->fld |
|
inlinestatic |
Definition at line 214 of file pgstat_slru.c.
References Assert(), have_slrustats, IsPostmasterEnvironment, IsUnderPostmaster, pending_SLRUStats, pgstat_assert_is_up, pgstat_report_fixed, and SLRU_NUM_ELEMENTS.
PgStat_SLRUStats * pgstat_fetch_slru | ( | void | ) |
Definition at line 91 of file pgstat_slru.c.
References PGSTAT_KIND_SLRU, pgstat_snapshot_fixed(), pgStatLocal, PgStat_Snapshot::slru, and PgStat_LocalState::snapshot.
Referenced by pg_stat_get_slru().
int pgstat_get_slru_index | ( | const char * | name | ) |
Definition at line 118 of file pgstat_slru.c.
References i, name, slru_names, and SLRU_NUM_ELEMENTS.
Referenced by pgstat_reset_slru(), and SimpleLruInit().
const char * pgstat_get_slru_name | ( | int | slru_idx | ) |
Definition at line 104 of file pgstat_slru.c.
References slru_names, and SLRU_NUM_ELEMENTS.
Referenced by pg_stat_get_slru().
void pgstat_reset_slru | ( | const char * | name | ) |
Definition at line 45 of file pgstat_slru.c.
References Assert(), GetCurrentTimestamp(), name, pgstat_get_slru_index(), and pgstat_reset_slru_counter_internal().
Referenced by pg_stat_reset_slru().
|
static |
Definition at line 233 of file pgstat_slru.c.
References PgStatShared_SLRU::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_ShmemControl::slru, PgStat_SLRUStats::stat_reset_timestamp, and PgStatShared_SLRU::stats.
Referenced by pgstat_reset_slru(), and pgstat_slru_reset_all_cb().
bool pgstat_slru_flush_cb | ( | bool | nowait | ) |
Definition at line 142 of file pgstat_slru.c.
References blocks_written, have_slrustats, i, PgStatShared_SLRU::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockConditionalAcquire(), LWLockRelease(), MemSet, pending_SLRUStats, pgStatLocal, PgStat_LocalState::shmem, PgStat_ShmemControl::slru, SLRU_ACC, SLRU_NUM_ELEMENTS, and PgStatShared_SLRU::stats.
void pgstat_slru_init_shmem_cb | ( | void * | stats | ) |
Definition at line 182 of file pgstat_slru.c.
References PgStatShared_SLRU::lock, and LWLockInitialize().
void pgstat_slru_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 190 of file pgstat_slru.c.
References i, pgstat_reset_slru_counter_internal(), and SLRU_NUM_ELEMENTS.
void pgstat_slru_snapshot_cb | ( | void | ) |
Definition at line 197 of file pgstat_slru.c.
References PgStatShared_SLRU::lock, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_ShmemControl::slru, PgStat_Snapshot::slru, PgStat_LocalState::snapshot, and PgStatShared_SLRU::stats.
|
static |
Definition at line 35 of file pgstat_slru.c.
Referenced by get_slru_entry(), and pgstat_slru_flush_cb().
|
static |
Definition at line 34 of file pgstat_slru.c.
Referenced by get_slru_entry(), and pgstat_slru_flush_cb().