* multiple times, with constant arguments for all_visible,
* check_serializable.
*/
-pg_attribute_always_inline
+pg_always_inline
static int
page_collect_tuples(HeapScanDesc scan, Snapshot snapshot,
Page page, Buffer buffer,
*
* NB: Testing shows that XLogInsertRecord runs faster if this code is inlined;
* however, because there are two call sites, the compiler is reluctant to
- * inline. We use pg_attribute_always_inline here to try to convince it.
+ * inline. We use pg_always_inline here to try to convince it.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
ReserveXLogInsertLocation(int size, XLogRecPtr *StartPos, XLogRecPtr *EndPos,
XLogRecPtr *PrevPtr)
{
/* non-export function prototypes */
static bool CopyReadLine(CopyFromState cstate, bool is_csv);
-static pg_attribute_always_inline bool CopyReadLineText(CopyFromState cstate,
- bool is_csv);
+static pg_always_inline bool CopyReadLineText(CopyFromState cstate,
+ bool is_csv);
static int CopyReadAttributesText(CopyFromState cstate);
static int CopyReadAttributesCSV(CopyFromState cstate);
static Datum CopyReadBinaryAttribute(CopyFromState cstate, FmgrInfo *flinfo,
Oid typioparam, int32 typmod,
bool *isnull);
-static pg_attribute_always_inline bool CopyFromTextLikeOneRow(CopyFromState cstate,
- ExprContext *econtext,
- Datum *values,
- bool *nulls,
- bool is_csv);
-static pg_attribute_always_inline bool NextCopyFromRawFieldsInternal(CopyFromState cstate,
- char ***fields,
- int *nfields,
- bool is_csv);
+static pg_always_inline bool CopyFromTextLikeOneRow(CopyFromState cstate,
+ ExprContext *econtext,
+ Datum *values,
+ bool *nulls,
+ bool is_csv);
+static pg_always_inline bool NextCopyFromRawFieldsInternal(CopyFromState cstate,
+ char ***fields,
+ int *nfields,
+ bool is_csv);
/* Low-level communications functions */
*
* NOTE: force_not_null option are not applied to the returned fields.
*
- * We use pg_attribute_always_inline to reduce function call overhead
+ * We use pg_always_inline to reduce function call overhead
* and to help compilers to optimize away the 'is_csv' condition when called
* by internal functions such as CopyFromTextLikeOneRow().
*/
-static pg_attribute_always_inline bool
+static pg_always_inline bool
NextCopyFromRawFieldsInternal(CopyFromState cstate, char ***fields, int *nfields, bool is_csv)
{
int fldct;
/*
* Workhorse for CopyFromTextOneRow() and CopyFromCSVOneRow().
*
- * We use pg_attribute_always_inline to reduce function call overhead
+ * We use pg_always_inline to reduce function call overhead
* and to help compilers to optimize away the 'is_csv' condition.
*/
-static pg_attribute_always_inline bool
+static pg_always_inline bool
CopyFromTextLikeOneRow(CopyFromState cstate, ExprContext *econtext,
Datum *values, bool *nulls, bool is_csv)
{
/*
* CopyReadLineText - inner loop of CopyReadLine for text mode
*/
-static pg_attribute_always_inline bool
+static pg_always_inline bool
CopyReadLineText(CopyFromState cstate, bool is_csv)
{
char *copy_input_buf;
/*
* Workhorse for CopyToTextOneRow() and CopyToCSVOneRow().
*
- * We use pg_attribute_always_inline to reduce function call overhead
+ * We use pg_always_inline to reduce function call overhead
* and to help compilers to optimize away the 'is_csv' condition.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
CopyToTextLikeOneRow(CopyToState cstate,
TupleTableSlot *slot,
bool is_csv)
static Datum ExecJustHashOuterVarStrict(ExprState *state, ExprContext *econtext, bool *isnull);
/* execution helper functions */
-static pg_attribute_always_inline void ExecEvalArrayCompareInternal(FunctionCallInfo fcinfo,
- ArrayType *arr,
- int16 typlen,
- bool typbyval,
- char typalign,
- bool useOr,
- Datum *result,
- bool *resultnull);
-static pg_attribute_always_inline void ExecAggPlainTransByVal(AggState *aggstate,
- AggStatePerTrans pertrans,
- AggStatePerGroup pergroup,
- ExprContext *aggcontext,
- int setno);
-static pg_attribute_always_inline void ExecAggPlainTransByRef(AggState *aggstate,
- AggStatePerTrans pertrans,
- AggStatePerGroup pergroup,
- ExprContext *aggcontext,
- int setno);
+static pg_always_inline void ExecEvalArrayCompareInternal(FunctionCallInfo fcinfo,
+ ArrayType *arr,
+ int16 typlen,
+ bool typbyval,
+ char typalign,
+ bool useOr,
+ Datum *result,
+ bool *resultnull);
+static pg_always_inline void ExecAggPlainTransByVal(AggState *aggstate,
+ AggStatePerTrans pertrans,
+ AggStatePerGroup pergroup,
+ ExprContext *aggcontext,
+ int setno);
+static pg_always_inline void ExecAggPlainTransByRef(AggState *aggstate,
+ AggStatePerTrans pertrans,
+ AggStatePerGroup pergroup,
+ ExprContext *aggcontext,
+ int setno);
static char *ExecGetJsonValueItemString(JsonbValue *item, bool *resnull);
/*
*/
/* implementation of ExecJust(Inner|Outer|Scan)Var */
-static pg_attribute_always_inline Datum
+static pg_always_inline Datum
ExecJustVarImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
{
ExprEvalStep *op = &state->steps[1];
}
/* implementation of ExecJustAssign(Inner|Outer|Scan)Var */
-static pg_attribute_always_inline Datum
+static pg_always_inline Datum
ExecJustAssignVarImpl(ExprState *state, TupleTableSlot *inslot, bool *isnull)
{
ExprEvalStep *op = &state->steps[1];
}
/* implementation of ExecJust(Inner|Outer|Scan)VarVirt */
-static pg_attribute_always_inline Datum
+static pg_always_inline Datum
ExecJustVarVirtImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
{
ExprEvalStep *op = &state->steps[0];
}
/* implementation of ExecJustAssign(Inner|Outer|Scan)VarVirt */
-static pg_attribute_always_inline Datum
+static pg_always_inline Datum
ExecJustAssignVarVirtImpl(ExprState *state, TupleTableSlot *inslot, bool *isnull)
{
ExprEvalStep *op = &state->steps[0];
}
/* implementation of ExecJustHash(Inner|Outer)Var */
-static pg_attribute_always_inline Datum
+static pg_always_inline Datum
ExecJustHashVarImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
{
ExprEvalStep *fetchop = &state->steps[0];
}
/* implementation of ExecJustHash(Inner|Outer)VarVirt */
-static pg_attribute_always_inline Datum
+static pg_always_inline Datum
ExecJustHashVarVirtImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
{
ExprEvalStep *var = &state->steps[0];
* Callers must handle the strict LHS-is-NULL; return NULL fast path prior to
* calling this.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
ExecEvalArrayCompareInternal(FunctionCallInfo fcinfo, ArrayType *arr,
int16 typlen, bool typbyval, char typalign,
bool useOr, Datum *result, bool *resultnull)
}
/* implementation of transition function invocation for byval types */
-static pg_attribute_always_inline void
+static pg_always_inline void
ExecAggPlainTransByVal(AggState *aggstate, AggStatePerTrans pertrans,
AggStatePerGroup pergroup,
ExprContext *aggcontext, int setno)
}
/* implementation of transition function invocation for byref types */
-static pg_attribute_always_inline void
+static pg_always_inline void
ExecAggPlainTransByRef(AggState *aggstate, AggStatePerTrans pertrans,
AggStatePerGroup pergroup,
ExprContext *aggcontext, int setno)
static TupleDesc ExecTypeFromTLInternal(List *targetList,
bool skipjunk);
-static pg_attribute_always_inline void slot_deform_heap_tuple(TupleTableSlot *slot, HeapTuple tuple, uint32 *offp,
- int reqnatts, bool support_cstring);
+static pg_always_inline void slot_deform_heap_tuple(TupleTableSlot *slot, HeapTuple tuple, uint32 *offp,
+ int reqnatts, bool support_cstring);
static inline void tts_buffer_heap_store_tuple(TupleTableSlot *slot,
HeapTuple tuple,
Buffer buffer,
* emit code during inlining for cstring deforming when it's required.
* cstrings can exist in MinimalTuples, but not in HeapTuples.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
slot_deform_heap_tuple(TupleTableSlot *slot, HeapTuple tuple, uint32 *offp,
int reqnatts, bool support_cstring)
{
* the other one is "outer".
* ----------------------------------------------------------------
*/
-static pg_attribute_always_inline TupleTableSlot *
+static pg_always_inline TupleTableSlot *
ExecHashJoinImpl(PlanState *pstate, bool parallel)
{
HashJoinState *node = castNode(HashJoinState, pstate);
* This is a workhorse for ExecSeqScan
* ----------------------------------------------------------------
*/
-static pg_attribute_always_inline TupleTableSlot *
+static pg_always_inline TupleTableSlot *
SeqNext(SeqScanState *node)
{
TableScanDesc scandesc;
/*
* SeqRecheck -- access method routine to recheck a tuple in EvalPlanQual
*/
-static pg_attribute_always_inline bool
+static pg_always_inline bool
SeqRecheck(SeqScanState *node, TupleTableSlot *slot)
{
/*
*
* Note: Callers must ensure that size > 0.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
AppendJumbleInternal(JumbleState *jstate, const unsigned char *item,
Size size)
{
* AppendJumbleNull
* For jumbling NULL pointers
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
AppendJumbleNull(JumbleState *jstate)
{
jstate->pending_nulls++;
*
* Note: Callers must ensure that there's at least 1 pending NULL.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
FlushPendingNulls(JumbleState *jstate)
{
Assert(jstate->pending_nulls > 0);
static bool AsyncReadBuffers(ReadBuffersOperation *operation, int *nblocks_progress);
static void CheckReadBuffersOperation(ReadBuffersOperation *operation, bool is_complete);
-static pg_attribute_always_inline void TrackBufferHit(IOObject io_object,
- IOContext io_context,
- Relation rel, char persistence, SMgrRelation smgr,
- ForkNumber forknum, BlockNumber blocknum);
+static pg_always_inline void TrackBufferHit(IOObject io_object,
+ IOContext io_context,
+ Relation rel, char persistence, SMgrRelation smgr,
+ ForkNumber forknum, BlockNumber blocknum);
static Buffer GetVictimBuffer(BufferAccessStrategy strategy, IOContext io_context);
static void FlushUnlockedBuffer(BufferDesc *buf, SMgrRelation reln,
IOObject io_object, IOContext io_context);
* already present, or false if more work is required to either read it in or
* zero it.
*/
-static pg_attribute_always_inline Buffer
+static pg_always_inline Buffer
PinBufferForBlock(Relation rel,
SMgrRelation smgr,
char persistence,
*
* smgr is required, rel is optional unless using P_NEW.
*/
-static pg_attribute_always_inline Buffer
+static pg_always_inline Buffer
ReadBuffer_common(Relation rel, SMgrRelation smgr, char smgr_persistence,
ForkNumber forkNum,
BlockNumber blockNum, ReadBufferMode mode,
return buffer;
}
-static pg_attribute_always_inline bool
+static pg_always_inline bool
StartReadBuffersImpl(ReadBuffersOperation *operation,
Buffer *buffers,
BlockNumber blockNum,
* We track various stats related to buffer hits. Because this is done in a
* few separate places, this helper exists for convenience.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
TrackBufferHit(IOObject io_object, IOContext io_context,
Relation rel, char persistence, SMgrRelation smgr,
ForkNumber forknum, BlockNumber blocknum)
*
* No locks are held either at entry or exit.
*/
-static pg_attribute_always_inline BufferDesc *
+static pg_always_inline BufferDesc *
BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
BlockNumber blockNum,
BufferAccessStrategy strategy,
* part of error handling, which in turn could lead to the buffer being
* replaced while IO is ongoing.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
buffer_stage_common(PgAioHandle *ioh, bool is_write, bool is_temp)
{
uint64 *io_data;
* Helper for AIO readv completion callbacks, supporting both shared and temp
* buffers. Gets called once for each buffer in a multi-page read.
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
buffer_readv_complete_one(PgAioTargetData *td, uint8 buf_off, Buffer buffer,
uint8 flags, bool failed, bool is_temp,
bool *buffer_invalid,
*
* Shared between shared and local buffers, to reduce code duplication.
*/
-static pg_attribute_always_inline PgAioResult
+static pg_always_inline PgAioResult
buffer_readv_complete(PgAioHandle *ioh, PgAioResult prior_result,
uint8 cb_data, bool is_temp)
{
* escape_json_char
* Inline helper function for escape_json* functions
*/
-static pg_attribute_always_inline void
+static pg_always_inline void
escape_json_char(StringInfo buf, char c)
{
switch (c)
*
* Call CatalogCacheInitializeCache() if not yet done.
*/
-pg_attribute_always_inline
+pg_always_inline
static void
ConditionalCatalogCacheInitializeCache(CatCache *cache)
{
#endif
/*
- * Use "pg_attribute_always_inline" in place of "inline" for functions that
+ * Use "pg_always_inline" in place of "inline" for functions that
* we wish to force inlining of, even when the compiler's heuristics would
* choose not to. But, if possible, don't force inlining in unoptimized
* debug builds.
*/
#if defined(__GNUC__) && defined(__OPTIMIZE__)
/* GCC supports always_inline via __attribute__ */
-#define pg_attribute_always_inline __attribute__((always_inline)) inline
+#define pg_always_inline __attribute__((always_inline)) inline
#elif defined(_MSC_VER)
/* MSVC has a special keyword for this */
-#define pg_attribute_always_inline __forceinline
+#define pg_always_inline __forceinline
#else
/* Otherwise, the best we can do is to say "inline" */
-#define pg_attribute_always_inline inline
+#define pg_always_inline inline
#endif
/*
* This routine substitutes a test tuple if inside an EvalPlanQual recheck.
* Otherwise, it simply executes the access method's next-tuple routine.
*
- * The pg_attribute_always_inline attribute allows the compiler to inline
- * this function into its caller. When EPQState is NULL, the EvalPlanQual
- * logic is completely eliminated at compile time, avoiding unnecessary
- * run-time checks and code for cases where EPQ is not required.
+ * The pg_always_inline attribute allows the compiler to inline this function
+ * into its caller. When EPQState is NULL, the EvalPlanQual logic is completely
+ * eliminated at compile time, avoiding unnecessary run-time checks and code
+ * for cases where EPQ is not required.
*/
-static pg_attribute_always_inline TupleTableSlot *
+static pg_always_inline TupleTableSlot *
ExecScanFetch(ScanState *node,
EPQState *epqstate,
ExecScanAccessMtd accessMtd,
* conditions enforced by the access method.
*
* This function is an alternative to ExecScan, used when callers may omit
- * 'qual' or 'projInfo'. The pg_attribute_always_inline attribute allows the
- * compiler to eliminate non-relevant branches at compile time, avoiding
- * run-time checks in those cases.
+ * 'qual' or 'projInfo'. The pg_always_inline attribute allows the compiler
+ * to eliminate non-relevant branches at compile time, avoiding run-time
+ * checks in those cases.
*
* Conditions:
* -- The AMI "cursor" is positioned at the previously returned tuple.
* positioned before the first qualifying tuple.
* ----------------------------------------------------------------
*/
-static pg_attribute_always_inline TupleTableSlot *
+static pg_always_inline TupleTableSlot *
ExecScanExtended(ScanState *node,
ExecScanAccessMtd accessMtd, /* function returning a tuple */
ExecScanRecheckMtd recheckMtd,
* only inlining the function partially.
* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124795
*/
-static pg_attribute_always_inline instr_time
+static pg_always_inline instr_time
pg_get_ticks(void)
{
if (likely(timing_tsc_enabled))
return pg_get_ticks_system();
}
-static pg_attribute_always_inline instr_time
+static pg_always_inline instr_time
pg_get_ticks_fast(void)
{
if (likely(timing_tsc_enabled))
#else
-static pg_attribute_always_inline instr_time
+static pg_always_inline instr_time
pg_get_ticks(void)
{
return pg_get_ticks_system();
}
-static pg_attribute_always_inline instr_time
+static pg_always_inline instr_time
pg_get_ticks_fast(void)
{
return pg_get_ticks_system();