|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <unistd.h>#include "executor/executor.h"#include "executor/instrument.h"#include "executor/tuptable.h"#include "nodes/execnodes.h"#include "portability/instr_time.h"#include "utils/guc_hooks.h"
Go to the source code of this file.
Variables | |
| BufferUsage | pgBufferUsage |
| static BufferUsage | save_pgBufferUsage |
| WalUsage | pgWalUsage |
| static WalUsage | save_pgWalUsage |
Definition at line 409 of file instrument.c.
References Assert, newval, pg_set_timing_clock_source(), and timing_initialized.
|
inline |
Definition at line 327 of file instrument.c.
References fb(), INSTR_TIME_ACCUM_DIFF, BufferUsage::local_blk_read_time, BufferUsage::local_blk_write_time, BufferUsage::local_blks_dirtied, BufferUsage::local_blks_hit, BufferUsage::local_blks_read, BufferUsage::local_blks_written, BufferUsage::shared_blk_read_time, BufferUsage::shared_blk_write_time, 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 do_analyze_rel(), ExplainExecuteQuery(), heap_vacuum_rel(), InstrEndParallelQuery(), InstrStopCommon(), pgss_planner(), pgss_ProcessUtility(), serializeAnalyzeReceive(), and standard_ExplainOneQuery().
|
static |
Definition at line 305 of file instrument.c.
References fb(), and INSTR_TIME_ADD.
Referenced by InstrAccumParallelQuery(), and InstrAggNode().
Definition at line 379 of file instrument.c.
References Assert, fb(), GUC_check_errdetail, newval, timing_initialized, and timing_tsc_frequency_khz.
| TupleTableSlot * ExecProcNodeInstr | ( | PlanState * | node | ) |
Definition at line 181 of file instrument.c.
References PlanState::ExecProcNodeReal, InstrStartNode(), InstrStopNode(), PlanState::instrument, result, and TupIsNull.
Referenced by ExecProcNodeFirst().
| void InstrAccumParallelQuery | ( | BufferUsage * | bufusage, |
| WalUsage * | walusage | ||
| ) |
Definition at line 297 of file instrument.c.
References BufferUsageAdd(), pgBufferUsage, pgWalUsage, and WalUsageAdd().
Referenced by _brin_end_parallel(), _bt_end_parallel(), _gin_end_parallel(), ExecParallelFinish(), and parallel_vacuum_process_all_indexes().
| void InstrAggNode | ( | NodeInstrumentation * | dst, |
| NodeInstrumentation * | add | ||
| ) |
Definition at line 232 of file instrument.c.
References Assert, BufferUsageAdd(), fb(), INSTR_TIME_ADD, and WalUsageAdd().
Referenced by ExecParallelReportInstrumentation(), and ExecParallelRetrieveInstrumentation().
| Instrumentation * InstrAlloc | ( | int | instrument_options | ) |
Definition at line 36 of file instrument.c.
References InstrInitOptions(), and palloc0_object.
Referenced by standard_ExecutorStart().
| NodeInstrumentation * InstrAllocNode | ( | int | instrument_options, |
| bool | async_mode | ||
| ) |
Definition at line 112 of file instrument.c.
References InstrInitNode(), and palloc_object.
Referenced by ExecInitNode().
| TriggerInstrumentation * InstrAllocTrigger | ( | int | n, |
| int | instrument_options | ||
| ) |
Definition at line 253 of file instrument.c.
References fb(), i, InstrInitOptions(), and palloc0_array.
Referenced by InitResultRelInfo().
| void InstrEndLoop | ( | NodeInstrumentation * | instr | ) |
Definition at line 204 of file instrument.c.
References NodeInstrumentation::counter, elog, ERROR, NodeInstrumentation::firsttuple, NodeInstrumentation::instr, INSTR_TIME_ADD, INSTR_TIME_IS_ZERO, INSTR_TIME_SET_ZERO, NodeInstrumentation::nloops, NodeInstrumentation::ntuples, NodeInstrumentation::running, Instrumentation::starttime, NodeInstrumentation::startup, Instrumentation::total, and NodeInstrumentation::tuplecount.
Referenced by ExecParallelReportInstrumentation(), ExecReScan(), ExplainNode(), and show_modifytable_info().
| void InstrEndParallelQuery | ( | BufferUsage * | bufusage, |
| WalUsage * | walusage | ||
| ) |
Definition at line 287 of file instrument.c.
References BufferUsageAccumDiff(), fb(), pgBufferUsage, pgWalUsage, save_pgBufferUsage, save_pgWalUsage, and WalUsageAccumDiff().
Referenced by _brin_parallel_build_main(), _bt_parallel_build_main(), _gin_parallel_build_main(), parallel_vacuum_main(), and ParallelQueryMain().
| void InstrInitNode | ( | NodeInstrumentation * | instr, |
| int | instrument_options, | ||
| bool | async_mode | ||
| ) |
Definition at line 123 of file instrument.c.
References NodeInstrumentation::async_mode, fb(), NodeInstrumentation::instr, and InstrInitOptions().
Referenced by ExecInitParallelPlan(), and InstrAllocNode().
| void InstrInitOptions | ( | Instrumentation * | instr, |
| int | instrument_options | ||
| ) |
Definition at line 45 of file instrument.c.
References INSTRUMENT_BUFFERS, INSTRUMENT_TIMER, INSTRUMENT_WAL, Instrumentation::need_bufusage, Instrumentation::need_timer, and Instrumentation::need_walusage.
Referenced by InstrAlloc(), InstrAllocTrigger(), and InstrInitNode().
|
inline |
Definition at line 53 of file instrument.c.
References Instrumentation::bufusage_start, elog, ERROR, INSTR_TIME_IS_ZERO, INSTR_TIME_SET_CURRENT_FAST, Instrumentation::need_bufusage, Instrumentation::need_timer, Instrumentation::need_walusage, pgBufferUsage, pgWalUsage, Instrumentation::starttime, and Instrumentation::walusage_start.
Referenced by InstrStartNode(), InstrStartTrigger(), standard_ExecutorFinish(), and standard_ExecutorRun().
|
inline |
Definition at line 132 of file instrument.c.
References NodeInstrumentation::instr, and InstrStart().
Referenced by ExecAsyncConfigureWait(), ExecAsyncNotify(), ExecAsyncRequest(), ExecProcNodeInstr(), ExecShutdownNode_walker(), MultiExecBitmapAnd(), MultiExecBitmapIndexScan(), MultiExecBitmapOr(), and MultiExecHash().
Definition at line 279 of file instrument.c.
References pgBufferUsage, pgWalUsage, save_pgBufferUsage, and save_pgWalUsage.
Referenced by _brin_parallel_build_main(), _bt_parallel_build_main(), _gin_parallel_build_main(), parallel_vacuum_main(), and ParallelQueryMain().
| void InstrStartTrigger | ( | TriggerInstrumentation * | tginstr | ) |
Definition at line 265 of file instrument.c.
References fb(), and InstrStart().
Referenced by AfterTriggerExecute(), and ExecCallTriggerFunc().
| void InstrStop | ( | Instrumentation * | instr | ) |
Definition at line 103 of file instrument.c.
References InstrStopCommon(), and Instrumentation::total.
Referenced by InstrStopTrigger(), standard_ExecutorFinish(), and standard_ExecutorRun().
|
inlinestatic |
Definition at line 76 of file instrument.c.
References BufferUsageAccumDiff(), Instrumentation::bufusage, Instrumentation::bufusage_start, elog, ERROR, fb(), INSTR_TIME_ACCUM_DIFF, INSTR_TIME_IS_ZERO, INSTR_TIME_SET_CURRENT_FAST, INSTR_TIME_SET_ZERO, Instrumentation::need_bufusage, Instrumentation::need_timer, Instrumentation::need_walusage, pgBufferUsage, pgWalUsage, Instrumentation::starttime, Instrumentation::walusage, Instrumentation::walusage_start, and WalUsageAccumDiff().
Referenced by InstrStop(), and InstrStopNode().
|
inline |
Definition at line 139 of file instrument.c.
References NodeInstrumentation::async_mode, NodeInstrumentation::counter, fb(), NodeInstrumentation::firsttuple, NodeInstrumentation::instr, InstrStopCommon(), NodeInstrumentation::running, and NodeInstrumentation::tuplecount.
Referenced by ExecAsyncConfigureWait(), ExecAsyncNotify(), ExecAsyncRequest(), ExecProcNodeInstr(), ExecShutdownNode_walker(), MultiExecBitmapAnd(), MultiExecBitmapIndexScan(), MultiExecBitmapOr(), and MultiExecHash().
| void InstrStopTrigger | ( | TriggerInstrumentation * | tginstr, |
| int64 | firings | ||
| ) |
Definition at line 271 of file instrument.c.
References fb(), and InstrStop().
Referenced by AfterTriggerExecute(), and ExecCallTriggerFunc().
| void InstrUpdateTupleCount | ( | NodeInstrumentation * | instr, |
| double | nTuples | ||
| ) |
Definition at line 196 of file instrument.c.
References NodeInstrumentation::tuplecount.
Referenced by complete_pending_request(), and ExecMergeMatched().
Definition at line 426 of file instrument.c.
References fb(), pg_current_timing_clock_source(), timing_clock_source, TIMING_CLOCK_SOURCE_AUTO, and TIMING_CLOCK_SOURCE_SYSTEM.
Definition at line 367 of file instrument.c.
References fb(), WalUsage::wal_buffers_full, WalUsage::wal_bytes, WalUsage::wal_fpi, WalUsage::wal_fpi_bytes, and WalUsage::wal_records.
Referenced by do_analyze_rel(), heap_vacuum_rel(), InstrEndParallelQuery(), InstrStopCommon(), pgss_planner(), pgss_ProcessUtility(), pgstat_flush_backend_entry_wal(), and pgstat_wal_flush_cb().
Definition at line 357 of file instrument.c.
References fb().
Referenced by InstrAccumParallelQuery(), and InstrAggNode().
| BufferUsage pgBufferUsage |
Definition at line 25 of file instrument.c.
Referenced by AsyncReadBuffers(), BufFileDumpBuffer(), BufFileLoadBuffer(), do_analyze_rel(), ExplainExecuteQuery(), ExtendBufferedRelLocal(), ExtendBufferedRelShared(), FlushBuffer(), FlushLocalBuffer(), heap_vacuum_rel(), InstrAccumParallelQuery(), InstrEndParallelQuery(), InstrStart(), InstrStartParallelQuery(), InstrStopCommon(), MarkBufferDirty(), MarkLocalBufferDirty(), MarkSharedBufferDirtyHint(), pgss_planner(), pgss_ProcessUtility(), pgstat_count_io_op_time(), ReadRecentBuffer(), serializeAnalyzeReceive(), standard_ExplainOneQuery(), and TrackBufferHit().
| WalUsage pgWalUsage |
Definition at line 27 of file instrument.c.
Referenced by AdvanceXLInsertBuffer(), do_analyze_rel(), heap_page_prune_and_freeze(), heap_vacuum_rel(), InstrAccumParallelQuery(), InstrEndParallelQuery(), InstrStart(), InstrStartParallelQuery(), InstrStopCommon(), pgss_planner(), pgss_ProcessUtility(), pgstat_backend_wal_have_pending(), pgstat_create_backend(), pgstat_flush_backend_entry_wal(), pgstat_wal_flush_cb(), pgstat_wal_have_pending(), pgstat_wal_init_backend_cb(), and XLogInsertRecord().
|
static |
Definition at line 26 of file instrument.c.
Referenced by InstrEndParallelQuery(), and InstrStartParallelQuery().
|
static |
Definition at line 28 of file instrument.c.
Referenced by InstrEndParallelQuery(), and InstrStartParallelQuery().