|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "executor/instrument.h"#include "storage/bufmgr.h"#include "utils/pgstat_internal.h"
Go to the source code of this file.
Variables | |
| static PgStat_PendingIO | PendingIOStats |
| static bool | have_iostats = false |
| bool pgstat_bktype_io_stats_valid | ( | PgStat_BktypeIO * | backend_io, |
| BackendType | bktype | ||
| ) |
Definition at line 37 of file pgstat_io.c.
References fb(), IOCONTEXT_NUM_TYPES, IOOBJECT_NUM_TYPES, IOOP_NUM_TYPES, and pgstat_tracks_io_op().
Referenced by pg_stat_get_backend_io(), pg_stat_get_io(), and pgstat_io_flush_cb().
| void pgstat_count_io_op | ( | IOObject | io_object, |
| IOContext | io_context, | ||
| IOOp | io_op, | ||
| uint32 | cnt, | ||
| uint64 | bytes | ||
| ) |
Definition at line 68 of file pgstat_io.c.
References Assert, PgStat_PendingIO::bytes, PgStat_PendingIO::counts, fb(), have_iostats, IOCONTEXT_NUM_TYPES, IOOBJECT_NUM_TYPES, MyBackendType, PendingIOStats, pgstat_count_backend_io_op(), pgstat_is_ioop_tracked_in_bytes, pgstat_report_fixed, and pgstat_tracks_io_op().
Referenced by AsyncReadBuffers(), GetLocalVictimBuffer(), GetVictimBuffer(), pgstat_count_io_op_time(), and PinBufferForBlock().
| void pgstat_count_io_op_time | ( | IOObject | io_object, |
| IOContext | io_context, | ||
| IOOp | io_op, | ||
| instr_time | start_time, | ||
| uint32 | cnt, | ||
| uint64 | bytes | ||
| ) |
Definition at line 122 of file pgstat_io.c.
References fb(), INSTR_TIME_ADD, INSTR_TIME_GET_MICROSEC, INSTR_TIME_IS_ZERO, INSTR_TIME_SET_CURRENT, INSTR_TIME_SUBTRACT, IOOBJECT_RELATION, IOOBJECT_TEMP_RELATION, IOOBJECT_WAL, IOOP_EXTEND, IOOP_READ, IOOP_WRITE, BufferUsage::local_blk_read_time, BufferUsage::local_blk_write_time, PgStat_PendingIO::pending_times, PendingIOStats, pgBufferUsage, pgstat_count_backend_io_op_time(), pgstat_count_buffer_read_time, pgstat_count_buffer_write_time, pgstat_count_io_op(), BufferUsage::shared_blk_read_time, BufferUsage::shared_blk_write_time, and start_time.
Referenced by AsyncReadBuffers(), ExtendBufferedRelLocal(), ExtendBufferedRelShared(), FlushBuffer(), FlushLocalBuffer(), issue_xlog_fsync(), IssuePendingWritebacks(), mdsyncfiletag(), register_dirty_segment(), WaitReadBuffers(), WALRead(), XLogFileInitInternal(), XLogPageRead(), XLogWalRcvWrite(), and XLogWrite().
Definition at line 164 of file pgstat_io.c.
References PgStat_Snapshot::io, PGSTAT_KIND_IO, pgstat_snapshot_fixed(), pgStatLocal, and PgStat_LocalState::snapshot.
Referenced by pg_stat_get_io().
Definition at line 175 of file pgstat_io.c.
References fb(), and pgstat_io_flush_cb().
Referenced by pgstat_report_analyze(), pgstat_report_bgwriter(), pgstat_report_checkpointer(), pgstat_report_vacuum(), pgstat_report_wal(), WalSndLoop(), and WalSndWaitForWal().
Definition at line 240 of file pgstat_io.c.
References elog, ERROR, fb(), IOCONTEXT_BULKREAD, IOCONTEXT_BULKWRITE, IOCONTEXT_INIT, IOCONTEXT_NORMAL, IOCONTEXT_VACUUM, and pg_unreachable.
Referenced by pg_stat_io_build_tuples().
Definition at line 261 of file pgstat_io.c.
References elog, ERROR, fb(), IOOBJECT_RELATION, IOOBJECT_TEMP_RELATION, IOOBJECT_WAL, and pg_unreachable.
Referenced by pg_stat_io_build_tuples().
Definition at line 189 of file pgstat_io.c.
References Assert, PgStat_PendingIO::bytes, PgStat_PendingIO::counts, fb(), have_iostats, INSTR_TIME_GET_MICROSEC, PgStat_ShmemControl::io, IOCONTEXT_NUM_TYPES, IOOBJECT_NUM_TYPES, IOOP_NUM_TYPES, PgStatShared_IO::locks, LW_EXCLUSIVE, LWLockAcquire(), LWLockConditionalAcquire(), LWLockRelease(), MyBackendType, PgStat_PendingIO::pending_times, PendingIOStats, pgstat_bktype_io_stats_valid(), pgStatLocal, PgStat_LocalState::shmem, PgStat_IO::stats, and PgStatShared_IO::stats.
Referenced by pgstat_flush_io().
Definition at line 278 of file pgstat_io.c.
References BACKEND_NUM_TYPES, fb(), i, and LWLockInitialize().
| void pgstat_io_reset_all_cb | ( | TimestampTz | ts | ) |
Definition at line 287 of file pgstat_io.c.
References BACKEND_NUM_TYPES, fb(), i, PgStat_ShmemControl::io, PgStatShared_IO::locks, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_IO::stat_reset_timestamp, PgStat_IO::stats, and PgStatShared_IO::stats.
Definition at line 309 of file pgstat_io.c.
References BACKEND_NUM_TYPES, fb(), i, PgStat_ShmemControl::io, PgStat_Snapshot::io, PgStatShared_IO::locks, LW_SHARED, LWLockAcquire(), LWLockRelease(), pgStatLocal, PgStat_LocalState::shmem, PgStat_LocalState::snapshot, PgStat_IO::stat_reset_timestamp, PgStat_IO::stats, and PgStatShared_IO::stats.
| instr_time pgstat_prepare_io_time | ( | bool | track_io_guc | ) |
Definition at line 91 of file pgstat_io.c.
References fb(), INSTR_TIME_SET_CURRENT, and INSTR_TIME_SET_ZERO.
Referenced by AsyncReadBuffers(), ExtendBufferedRelLocal(), ExtendBufferedRelShared(), FlushBuffer(), FlushLocalBuffer(), issue_xlog_fsync(), IssuePendingWritebacks(), mdsyncfiletag(), register_dirty_segment(), WaitReadBuffers(), WALRead(), XLogFileInitInternal(), XLogPageRead(), XLogWalRcvWrite(), and XLogWrite().
| bool pgstat_tracks_io_bktype | ( | BackendType | bktype | ) |
Definition at line 351 of file pgstat_io.c.
References B_ARCHIVER, B_AUTOVAC_LAUNCHER, B_AUTOVAC_WORKER, B_BACKEND, B_BG_WORKER, B_BG_WRITER, B_CHECKPOINTER, B_DEAD_END_BACKEND, B_INVALID, B_IO_WORKER, B_LOGGER, B_SLOTSYNC_WORKER, B_STANDALONE_BACKEND, B_STARTUP, B_WAL_RECEIVER, B_WAL_SENDER, B_WAL_SUMMARIZER, B_WAL_WRITER, and fb().
Referenced by pg_stat_get_io(), and pgstat_tracks_io_object().
| bool pgstat_tracks_io_object | ( | BackendType | bktype, |
| IOObject | io_object, | ||
| IOContext | io_context | ||
| ) |
Definition at line 393 of file pgstat_io.c.
References B_AUTOVAC_LAUNCHER, B_AUTOVAC_WORKER, B_BG_WRITER, B_CHECKPOINTER, B_STANDALONE_BACKEND, B_STARTUP, B_WAL_RECEIVER, B_WAL_SUMMARIZER, B_WAL_WRITER, fb(), IOCONTEXT_BULKREAD, IOCONTEXT_BULKWRITE, IOCONTEXT_INIT, IOCONTEXT_NORMAL, IOCONTEXT_VACUUM, IOOBJECT_TEMP_RELATION, IOOBJECT_WAL, and pgstat_tracks_io_bktype().
Referenced by pg_stat_io_build_tuples(), and pgstat_tracks_io_op().
| bool pgstat_tracks_io_op | ( | BackendType | bktype, |
| IOObject | io_object, | ||
| IOContext | io_context, | ||
| IOOp | io_op | ||
| ) |
Definition at line 477 of file pgstat_io.c.
References B_AUTOVAC_LAUNCHER, B_AUTOVAC_WORKER, B_BG_WRITER, B_CHECKPOINTER, B_WAL_RECEIVER, B_WAL_WRITER, fb(), IOCONTEXT_BULKREAD, IOCONTEXT_BULKWRITE, IOCONTEXT_INIT, IOCONTEXT_NORMAL, IOCONTEXT_VACUUM, IOOBJECT_TEMP_RELATION, IOOBJECT_WAL, IOOP_EVICT, IOOP_EXTEND, IOOP_FSYNC, IOOP_HIT, IOOP_READ, IOOP_REUSE, IOOP_WRITE, IOOP_WRITEBACK, and pgstat_tracks_io_object().
Referenced by pg_stat_io_build_tuples(), pgstat_bktype_io_stats_valid(), pgstat_count_backend_io_op(), pgstat_count_backend_io_op_time(), and pgstat_count_io_op().
Definition at line 24 of file pgstat_io.c.
Referenced by pgstat_count_io_op(), and pgstat_io_flush_cb().
|
static |
Definition at line 23 of file pgstat_io.c.
Referenced by pgstat_count_io_op(), pgstat_count_io_op_time(), and pgstat_io_flush_cb().