PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#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) |
void | pgstat_count_slru_page_zeroed (int slru_idx) |
void | pgstat_count_slru_page_hit (int slru_idx) |
void | pgstat_count_slru_page_exists (int slru_idx) |
void | pgstat_count_slru_page_read (int slru_idx) |
void | pgstat_count_slru_page_written (int slru_idx) |
void | pgstat_count_slru_flush (int slru_idx) |
void | pgstat_count_slru_truncate (int slru_idx) |
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_have_pending_cb (void) |
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 SLRU_ACC | ( | fld | ) | sharedent->fld += pendingent->fld |
|
inlinestatic |
Definition at line 237 of file pgstat_slru.c.
References Assert, have_slrustats, IsPostmasterEnvironment, IsUnderPostmaster, pending_SLRUStats, pgstat_assert_is_up, and SLRU_NUM_ELEMENTS.
Referenced by pgstat_count_slru_flush(), pgstat_count_slru_page_exists(), pgstat_count_slru_page_hit(), pgstat_count_slru_page_read(), pgstat_count_slru_page_written(), pgstat_count_slru_page_zeroed(), and pgstat_count_slru_truncate().
void pgstat_count_slru_flush | ( | int | slru_idx | ) |
Definition at line 89 of file pgstat_slru.c.
References PgStat_SLRUStats::flush, and get_slru_entry().
Referenced by SimpleLruWriteAll().
void pgstat_count_slru_page_exists | ( | int | slru_idx | ) |
Definition at line 71 of file pgstat_slru.c.
References PgStat_SLRUStats::blocks_exists, and get_slru_entry().
Referenced by SimpleLruDoesPhysicalPageExist().
void pgstat_count_slru_page_hit | ( | int | slru_idx | ) |
Definition at line 65 of file pgstat_slru.c.
References PgStat_SLRUStats::blocks_hit, and get_slru_entry().
Referenced by SimpleLruReadPage(), and SimpleLruReadPage_ReadOnly().
void pgstat_count_slru_page_read | ( | int | slru_idx | ) |
Definition at line 77 of file pgstat_slru.c.
References PgStat_SLRUStats::blocks_read, and get_slru_entry().
Referenced by SimpleLruReadPage().
void pgstat_count_slru_page_written | ( | int | slru_idx | ) |
Definition at line 83 of file pgstat_slru.c.
References PgStat_SLRUStats::blocks_written, and get_slru_entry().
Referenced by SlruPhysicalWritePage().
void pgstat_count_slru_page_zeroed | ( | int | slru_idx | ) |
Definition at line 59 of file pgstat_slru.c.
References PgStat_SLRUStats::blocks_zeroed, and get_slru_entry().
Referenced by SimpleLruZeroPage().
void pgstat_count_slru_truncate | ( | int | slru_idx | ) |
Definition at line 95 of file pgstat_slru.c.
References get_slru_entry(), and PgStat_SLRUStats::truncate.
Referenced by SimpleLruTruncate().
PgStat_SLRUStats* pgstat_fetch_slru | ( | void | ) |
Definition at line 105 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 132 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 118 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 255 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().
Definition at line 165 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.
bool pgstat_slru_have_pending_cb | ( | void | ) |
Definition at line 150 of file pgstat_slru.c.
References have_slrustats.
void pgstat_slru_init_shmem_cb | ( | void * | stats | ) |
Definition at line 205 of file pgstat_slru.c.
References PgStatShared_SLRU::lock, LWLockInitialize(), and LWTRANCHE_PGSTATS_DATA.
void pgstat_slru_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 213 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 220 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.
Definition at line 35 of file pgstat_slru.c.
Referenced by get_slru_entry(), pgstat_slru_flush_cb(), and pgstat_slru_have_pending_cb().
|
static |
Definition at line 34 of file pgstat_slru.c.
Referenced by get_slru_entry(), and pgstat_slru_flush_cb().