PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
static void | BufferUsageAdd (BufferUsage *dst, const BufferUsage *add) |
static void | WalUsageAdd (WalUsage *dst, WalUsage *add) |
Instrumentation * | InstrAlloc (int n, int instrument_options, bool async_mode) |
void | InstrInit (Instrumentation *instr, int instrument_options) |
void | InstrStartNode (Instrumentation *instr) |
void | InstrStopNode (Instrumentation *instr, double nTuples) |
void | InstrUpdateTupleCount (Instrumentation *instr, double nTuples) |
void | InstrEndLoop (Instrumentation *instr) |
void | InstrAggNode (Instrumentation *dst, Instrumentation *add) |
void | InstrStartParallelQuery (void) |
void | InstrEndParallelQuery (BufferUsage *bufusage, WalUsage *walusage) |
void | InstrAccumParallelQuery (BufferUsage *bufusage, WalUsage *walusage) |
void | BufferUsageAccumDiff (BufferUsage *dst, const BufferUsage *add, const BufferUsage *sub) |
void | WalUsageAccumDiff (WalUsage *dst, const WalUsage *add, const WalUsage *sub) |
Variables | |
BufferUsage | pgBufferUsage |
static BufferUsage | save_pgBufferUsage |
WalUsage | pgWalUsage |
static WalUsage | save_pgWalUsage |
void BufferUsageAccumDiff | ( | BufferUsage * | dst, |
const BufferUsage * | add, | ||
const BufferUsage * | sub | ||
) |
Definition at line 246 of file instrument.c.
References BufferUsage::blk_read_time, BufferUsage::blk_write_time, INSTR_TIME_ACCUM_DIFF, BufferUsage::local_blks_dirtied, BufferUsage::local_blks_hit, BufferUsage::local_blks_read, BufferUsage::local_blks_written, BufferUsage::shared_blks_dirtied, BufferUsage::shared_blks_hit, BufferUsage::shared_blks_read, BufferUsage::shared_blks_written, BufferUsage::temp_blk_read_time, BufferUsage::temp_blk_write_time, BufferUsage::temp_blks_read, and BufferUsage::temp_blks_written.
Referenced by ExplainExecuteQuery(), ExplainOneQuery(), InstrEndParallelQuery(), InstrStopNode(), pgss_planner(), and pgss_ProcessUtility().
|
static |
Definition at line 226 of file instrument.c.
References BufferUsage::blk_read_time, BufferUsage::blk_write_time, INSTR_TIME_ADD, BufferUsage::local_blks_dirtied, BufferUsage::local_blks_hit, BufferUsage::local_blks_read, BufferUsage::local_blks_written, BufferUsage::shared_blks_dirtied, BufferUsage::shared_blks_hit, BufferUsage::shared_blks_read, BufferUsage::shared_blks_written, BufferUsage::temp_blk_read_time, BufferUsage::temp_blk_write_time, BufferUsage::temp_blks_read, and BufferUsage::temp_blks_written.
Referenced by InstrAccumParallelQuery(), and InstrAggNode().
void InstrAccumParallelQuery | ( | BufferUsage * | bufusage, |
WalUsage * | walusage | ||
) |
Definition at line 218 of file instrument.c.
References BufferUsageAdd(), pgBufferUsage, pgWalUsage, and WalUsageAdd().
Referenced by _bt_end_parallel(), ExecParallelFinish(), and parallel_vacuum_process_all_indexes().
void InstrAggNode | ( | Instrumentation * | dst, |
Instrumentation * | add | ||
) |
Definition at line 169 of file instrument.c.
References BufferUsageAdd(), Instrumentation::bufusage, Instrumentation::counter, Instrumentation::firsttuple, INSTR_TIME_ADD, Instrumentation::need_bufusage, Instrumentation::need_walusage, Instrumentation::nfiltered1, Instrumentation::nfiltered2, Instrumentation::nloops, Instrumentation::ntuples, Instrumentation::ntuples2, Instrumentation::running, Instrumentation::startup, Instrumentation::total, Instrumentation::tuplecount, Instrumentation::walusage, and WalUsageAdd().
Referenced by ExecParallelReportInstrumentation(), and ExecParallelRetrieveInstrumentation().
Instrumentation* InstrAlloc | ( | int | n, |
int | instrument_options, | ||
bool | async_mode | ||
) |
Definition at line 31 of file instrument.c.
References Instrumentation::async_mode, i, INSTRUMENT_BUFFERS, INSTRUMENT_TIMER, INSTRUMENT_WAL, Instrumentation::need_bufusage, Instrumentation::need_timer, Instrumentation::need_walusage, and palloc0().
Referenced by ExecInitNode(), explain_ExecutorStart(), InitResultRelInfo(), and pgss_ExecutorStart().
void InstrEndLoop | ( | Instrumentation * | instr | ) |
Definition at line 140 of file instrument.c.
References Instrumentation::counter, elog(), ERROR, Instrumentation::firsttuple, INSTR_TIME_GET_DOUBLE, INSTR_TIME_IS_ZERO, INSTR_TIME_SET_ZERO, Instrumentation::nloops, Instrumentation::ntuples, Instrumentation::running, Instrumentation::starttime, Instrumentation::startup, Instrumentation::total, and Instrumentation::tuplecount.
Referenced by ExecParallelReportInstrumentation(), ExecReScan(), explain_ExecutorEnd(), ExplainNode(), pgss_ExecutorEnd(), report_triggers(), and show_modifytable_info().
void InstrEndParallelQuery | ( | BufferUsage * | bufusage, |
WalUsage * | walusage | ||
) |
Definition at line 208 of file instrument.c.
References BufferUsageAccumDiff(), pgBufferUsage, pgWalUsage, save_pgBufferUsage, save_pgWalUsage, and WalUsageAccumDiff().
Referenced by _bt_parallel_build_main(), parallel_vacuum_main(), and ParallelQueryMain().
void InstrInit | ( | Instrumentation * | instr, |
int | instrument_options | ||
) |
Definition at line 58 of file instrument.c.
References INSTRUMENT_BUFFERS, INSTRUMENT_TIMER, INSTRUMENT_WAL, Instrumentation::need_bufusage, Instrumentation::need_timer, and Instrumentation::need_walusage.
Referenced by ExecInitParallelPlan().
void InstrStartNode | ( | Instrumentation * | instr | ) |
Definition at line 68 of file instrument.c.
References Instrumentation::bufusage_start, elog(), ERROR, INSTR_TIME_SET_CURRENT_LAZY, Instrumentation::need_bufusage, Instrumentation::need_timer, Instrumentation::need_walusage, pgBufferUsage, pgWalUsage, Instrumentation::starttime, and Instrumentation::walusage_start.
Referenced by AfterTriggerExecute(), ExecAsyncConfigureWait(), ExecAsyncNotify(), ExecAsyncRequest(), ExecCallTriggerFunc(), ExecProcNodeInstr(), ExecShutdownNode_walker(), MultiExecBitmapAnd(), MultiExecBitmapIndexScan(), MultiExecBitmapOr(), MultiExecHash(), standard_ExecutorFinish(), and standard_ExecutorRun().
void InstrStartParallelQuery | ( | void | ) |
Definition at line 200 of file instrument.c.
References pgBufferUsage, pgWalUsage, save_pgBufferUsage, and save_pgWalUsage.
Referenced by _bt_parallel_build_main(), parallel_vacuum_main(), and ParallelQueryMain().
void InstrStopNode | ( | Instrumentation * | instr, |
double | nTuples | ||
) |
Definition at line 84 of file instrument.c.
References Instrumentation::async_mode, BufferUsageAccumDiff(), Instrumentation::bufusage, Instrumentation::bufusage_start, Instrumentation::counter, elog(), ERROR, Instrumentation::firsttuple, INSTR_TIME_ACCUM_DIFF, INSTR_TIME_GET_DOUBLE, INSTR_TIME_IS_ZERO, INSTR_TIME_SET_CURRENT, INSTR_TIME_SET_ZERO, Instrumentation::need_bufusage, Instrumentation::need_timer, Instrumentation::need_walusage, pgBufferUsage, pgWalUsage, Instrumentation::running, Instrumentation::starttime, Instrumentation::tuplecount, Instrumentation::walusage, Instrumentation::walusage_start, and WalUsageAccumDiff().
Referenced by AfterTriggerExecute(), ExecAsyncConfigureWait(), ExecAsyncNotify(), ExecAsyncRequest(), ExecCallTriggerFunc(), ExecProcNodeInstr(), ExecShutdownNode_walker(), MultiExecBitmapAnd(), MultiExecBitmapIndexScan(), MultiExecBitmapOr(), MultiExecHash(), standard_ExecutorFinish(), and standard_ExecutorRun().
void InstrUpdateTupleCount | ( | Instrumentation * | instr, |
double | nTuples | ||
) |
Definition at line 132 of file instrument.c.
References Instrumentation::tuplecount.
Referenced by complete_pending_request().
Definition at line 280 of file instrument.c.
References WalUsage::wal_bytes, WalUsage::wal_fpi, and WalUsage::wal_records.
Referenced by heap_vacuum_rel(), InstrEndParallelQuery(), InstrStopNode(), pgss_planner(), pgss_ProcessUtility(), and pgstat_flush_wal().
Definition at line 272 of file instrument.c.
References WalUsage::wal_bytes, WalUsage::wal_fpi, and WalUsage::wal_records.
Referenced by InstrAccumParallelQuery(), and InstrAggNode().
BufferUsage pgBufferUsage |
Definition at line 20 of file instrument.c.
Referenced by BufFileDumpBuffer(), BufFileLoadBuffer(), ExplainExecuteQuery(), ExplainOneQuery(), ExtendBufferedRelLocal(), ExtendBufferedRelShared(), FlushBuffer(), FlushRelationBuffers(), GetLocalVictimBuffer(), InstrAccumParallelQuery(), InstrEndParallelQuery(), InstrStartNode(), InstrStartParallelQuery(), InstrStopNode(), MarkBufferDirty(), MarkBufferDirtyHint(), MarkLocalBufferDirty(), pgss_planner(), pgss_ProcessUtility(), pgstat_count_io_op_time(), ReadBuffer_common(), and ReadRecentBuffer().
WalUsage pgWalUsage |
Definition at line 22 of file instrument.c.
Referenced by heap_vacuum_rel(), InstrAccumParallelQuery(), InstrEndParallelQuery(), InstrStartNode(), InstrStartParallelQuery(), InstrStopNode(), lazy_scan_prune(), pgss_planner(), pgss_ProcessUtility(), pgstat_flush_wal(), pgstat_have_pending_wal(), pgstat_init_wal(), and XLogInsertRecord().
|
static |
Definition at line 21 of file instrument.c.
Referenced by InstrEndParallelQuery(), and InstrStartParallelQuery().
|
static |
Definition at line 23 of file instrument.c.
Referenced by InstrEndParallelQuery(), and InstrStartParallelQuery().