LCOV - differential code coverage report
Current view: top level - src/include/port - pg_numa.h (source / functions) Coverage Total Hit CBC
Current: 380a8b2ea024c33a35e7abc8628e7c4f52f9f9f9 vs db5ed03217b9c238703df8b4b286115d6e940488 Lines: 100.0 % 3 3 3
Current Date: 2026-05-29 21:51:00 -0400 Functions: 100.0 % 1 1 1
Baseline: lcov-20260530-034037-baseline Line coverage date bins:
Baseline Date: 2026-05-29 14:39:03 -0700 (30,360] days: 100.0 % 3 3 3
Legend: Lines:     hit not hit Function coverage date bins:
(30,360] days: 100.0 % 1 1 1

 Age         Owner                  TLA  Line data    Source code
                                  1                 : /*-------------------------------------------------------------------------
                                  2                 :  *
                                  3                 :  * pg_numa.h
                                  4                 :  *    Basic NUMA portability routines
                                  5                 :  *
                                  6                 :  *
                                  7                 :  * Copyright (c) 2025-2026, PostgreSQL Global Development Group
                                  8                 :  *
                                  9                 :  * IDENTIFICATION
                                 10                 :  *  src/include/port/pg_numa.h
                                 11                 :  *
                                 12                 :  *-------------------------------------------------------------------------
                                 13                 :  */
                                 14                 : #ifndef PG_NUMA_H
                                 15                 : #define PG_NUMA_H
                                 16                 : 
                                 17                 : extern PGDLLIMPORT int pg_numa_init(void);
                                 18                 : extern PGDLLIMPORT int pg_numa_query_pages(int pid, unsigned long count, void **pages, int *status);
                                 19                 : extern PGDLLIMPORT int pg_numa_get_max_node(void);
                                 20                 : 
                                 21                 : #ifdef USE_LIBNUMA
                                 22                 : 
                                 23                 : /*
                                 24                 :  * This is required on Linux, before pg_numa_query_pages() as we
                                 25                 :  * need to page-fault before move_pages(2) syscall returns valid results.
                                 26                 :  */
                                 27                 : static inline void
  333 tomas.vondra@postgre       28 CBC      156299 : pg_numa_touch_mem_if_required(void *ptr)
                                 29                 : {
                                 30                 :     volatile uint64 touch pg_attribute_unused();
                                 31                 : 
                                 32          156299 :     touch = *(volatile uint64 *) ptr;
                                 33          156299 : }
                                 34                 : 
                                 35                 : #else
                                 36                 : 
                                 37                 : #define pg_numa_touch_mem_if_required(ptr) \
                                 38                 :     do {} while(0)
                                 39                 : 
                                 40                 : #endif
                                 41                 : 
                                 42                 : #endif                          /* PG_NUMA_H */
        

Generated by: LCOV version 2.5.0-beta