LCOV - differential code coverage report
Current view: top level - src/include/port - pg_cpu.h (source / functions) Coverage Total Hit GNC
Current: bed3ffbf9d952be6c7d739d068cdce44c046dfb7 vs 574581b50ac9c63dd9e4abebb731a3b67e5b50f6 Lines: 100.0 % 4 4 4
Current Date: 2026-05-05 10:23:31 +0900 Functions: 100.0 % 1 1 1
Baseline: lcov-20260505-025707-baseline Branches: 100.0 % 2 2 2
Baseline Date: 2026-05-05 10:27:06 +0900 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(30,360] days: 100.0 % 4 4 4
Function coverage date bins:
(30,360] days: 100.0 % 1 1 1
Branch coverage date bins:
(30,360] 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                 :                :     /* 256-bit YMM registers */
                                 28                 :                :     PG_AVX2,
                                 29                 :                : 
                                 30                 :                :     /* 512-bit ZMM registers */
                                 31                 :                :     PG_AVX512_BW,
                                 32                 :                :     PG_AVX512_VL,
                                 33                 :                :     PG_AVX512_VPCLMULQDQ,
                                 34                 :                :     PG_AVX512_VPOPCNTDQ,
                                 35                 :                : 
                                 36                 :                :     /* identification */
                                 37                 :                :     PG_HYPERVISOR,
                                 38                 :                : 
                                 39                 :                :     /* Time-Stamp Counter (TSC) flags */
                                 40                 :                :     PG_RDTSCP,
                                 41                 :                :     PG_TSC_INVARIANT,
                                 42                 :                :     PG_TSC_ADJUST,
                                 43                 :                : } X86FeatureId;
                                 44                 :                : #define X86FeaturesSize (PG_TSC_ADJUST + 1)
                                 45                 :                : 
                                 46                 :                : extern PGDLLIMPORT bool X86Features[];
                                 47                 :                : 
                                 48                 :                : extern void set_x86_features(void);
                                 49                 :                : 
                                 50                 :                : static inline bool
   67 john.naylor@postgres       51                 :GNC       20567 : x86_feature_available(X86FeatureId feature)
                                 52                 :                : {
                                 53         [ +  + ]:          20567 :     if (X86Features[INIT_PG_X86] == false)
                                 54                 :           1830 :         set_x86_features();
                                 55                 :                : 
                                 56                 :          20567 :     return X86Features[feature];
                                 57                 :                : }
                                 58                 :                : 
                                 59                 :                : extern uint32 x86_tsc_frequency_khz(void);
                                 60                 :                : 
                                 61                 :                : #endif                          /* defined(USE_SSE2) || defined(__i386__) */
                                 62                 :                : 
                                 63                 :                : #endif                          /* PG_CPU_H */
        

Generated by: LCOV version 2.5.0-beta