LCOV - differential code coverage report
Current view: top level - src/bin/pg_upgrade - slru_io.h (source / functions) Coverage Total Hit UNC
Current: 7a15cff1f11193467898da1c1fabf06fd2caee04 vs 84a3778c79c2d28b4dc281d03ef2ab019b16483b Lines: 0.0 % 8 0 8
Current Date: 2025-12-15 18:36:29 -0500 Functions: 0.0 % 2 0 2
Baseline: lcov-20251216-010103-baseline Branches: 0.0 % 8 0 8
Baseline Date: 2025-12-15 13:30:48 -0800 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(1,7] days: 0.0 % 8 0 8
Function coverage date bins:
(1,7] days: 0.0 % 2 0 2
Branch coverage date bins:
(1,7] days: 0.0 % 8 0 8

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*
                                  2                 :                :  * slru_io.h
                                  3                 :                :  *
                                  4                 :                :  * Copyright (c) 2025, PostgreSQL Global Development Group
                                  5                 :                :  * src/bin/pg_upgrade/slru_io.h
                                  6                 :                :  */
                                  7                 :                : 
                                  8                 :                : #ifndef SLRU_IO_H
                                  9                 :                : #define SLRU_IO_H
                                 10                 :                : 
                                 11                 :                : /*
                                 12                 :                :  * State for reading or writing an SLRU, with a one page buffer.
                                 13                 :                :  */
                                 14                 :                : typedef struct SlruSegState
                                 15                 :                : {
                                 16                 :                :     bool        writing;
                                 17                 :                :     bool        long_segment_names;
                                 18                 :                : 
                                 19                 :                :     char       *dir;
                                 20                 :                :     char       *fn;
                                 21                 :                :     int         fd;
                                 22                 :                :     int64       segno;
                                 23                 :                :     uint64      pageno;
                                 24                 :                : 
                                 25                 :                :     PGAlignedBlock buf;
                                 26                 :                : } SlruSegState;
                                 27                 :                : 
                                 28                 :                : extern SlruSegState *AllocSlruRead(const char *dir, bool long_segment_names);
                                 29                 :                : extern char *SlruReadSwitchPageSlow(SlruSegState *state, uint64 pageno);
                                 30                 :                : extern void FreeSlruRead(SlruSegState *state);
                                 31                 :                : 
                                 32                 :                : static inline char *
    7 heikki.linnakangas@i       33                 :UNC           0 : SlruReadSwitchPage(SlruSegState *state, uint64 pageno)
                                 34                 :                : {
                                 35   [ #  #  #  # ]:              0 :     if (state->segno != -1 && pageno == state->pageno)
                                 36                 :              0 :         return state->buf.data;
                                 37                 :              0 :     return SlruReadSwitchPageSlow(state, pageno);
                                 38                 :                : }
                                 39                 :                : 
                                 40                 :                : extern SlruSegState *AllocSlruWrite(const char *dir, bool long_segment_names);
                                 41                 :                : extern char *SlruWriteSwitchPageSlow(SlruSegState *state, uint64 pageno);
                                 42                 :                : extern void FreeSlruWrite(SlruSegState *state);
                                 43                 :                : 
                                 44                 :                : static inline char *
                                 45                 :              0 : SlruWriteSwitchPage(SlruSegState *state, uint64 pageno)
                                 46                 :                : {
                                 47   [ #  #  #  # ]:              0 :     if (state->segno != -1 && pageno == state->pageno)
                                 48                 :              0 :         return state->buf.data;
                                 49                 :              0 :     return SlruWriteSwitchPageSlow(state, pageno);
                                 50                 :                : }
                                 51                 :                : 
                                 52                 :                : #endif                          /* SLRU_IO_H */
        

Generated by: LCOV version 2.4-beta