LCOV - differential code coverage report
Current view: top level - src/include/port - pg_cpu.h (source / functions) Coverage Total Hit GNC
Current: 0e5ff9b9b45a657aea12440478dc002e9b01f138 vs 0123ce131fca454009439dfa3b2266d1d40737d7 Lines: 100.0 % 4 4 4
Current Date: 2026-03-14 14:10:32 -0400 Functions: 100.0 % 1 1 1
Baseline: lcov-20260315-024220-baseline Branches: 100.0 % 2 2 2
Baseline Date: 2026-03-14 15:27:56 +0100 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(7,30] days: 100.0 % 4 4 4
Function coverage date bins:
(7,30] days: 100.0 % 1 1 1
Branch coverage date bins:
(7,30] days: 100.0 % 2 2 2

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*-------------------------------------------------------------------------
                                  2                 :                :  *
                                  3                 :                :  * pg_cpu.h
                                  4                 :                :  *    Runtime CPU feature detection
                                  5                 :                :  *
                                  6                 :                :  * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
                                  7                 :                :  * Portions Copyright (c) 1994, Regents of the University of California
                                  8                 :                :  *
                                  9                 :                :  * src/include/port/pg_cpu.h
                                 10                 :                :  *
                                 11                 :                :  *-------------------------------------------------------------------------
                                 12                 :                :  */
                                 13                 :                : #ifndef PG_CPU_H
                                 14                 :                : #define PG_CPU_H
                                 15                 :                : 
                                 16                 :                : #if defined(USE_SSE2) || defined(__i386__)
                                 17                 :                : 
                                 18                 :                : typedef enum X86FeatureId
                                 19                 :                : {
                                 20                 :                :     /* Have we run feature detection? */
                                 21                 :                :     INIT_PG_X86,
                                 22                 :                : 
                                 23                 :                :     /* scalar registers and 128-bit XMM registers */
                                 24                 :                :     PG_SSE4_2,
                                 25                 :                :     PG_POPCNT,
                                 26                 :                : 
                                 27                 :                :     /* 512-bit ZMM registers */
                                 28                 :                :     PG_AVX512_BW,
                                 29                 :                :     PG_AVX512_VL,
                                 30                 :                :     PG_AVX512_VPCLMULQDQ,
                                 31                 :                :     PG_AVX512_VPOPCNTDQ,
                                 32                 :                : } X86FeatureId;
                                 33                 :                : #define X86FeaturesSize (PG_AVX512_VPOPCNTDQ + 1)
                                 34                 :                : 
                                 35                 :                : extern PGDLLIMPORT bool X86Features[];
                                 36                 :                : 
                                 37                 :                : extern void set_x86_features(void);
                                 38                 :                : 
                                 39                 :                : static inline bool
   16 john.naylor@postgres       40                 :GNC        3734 : x86_feature_available(X86FeatureId feature)
                                 41                 :                : {
                                 42         [ +  + ]:           3734 :     if (X86Features[INIT_PG_X86] == false)
                                 43                 :           1508 :         set_x86_features();
                                 44                 :                : 
                                 45                 :           3734 :     return X86Features[feature];
                                 46                 :                : }
                                 47                 :                : 
                                 48                 :                : #endif                          /* defined(USE_SSE2) || defined(__i386__) */
                                 49                 :                : 
                                 50                 :                : #endif                          /* PG_CPU_H */
        

Generated by: LCOV version 2.4-beta