memdup_suffix0:
   19|  2.19k|void* memdup_suffix0(const void *p, size_t l) {
   20|  2.19k|        void *ret;
   21|       |
   22|  2.19k|        assert(l == 0 || p);
  ------------------
  |  |   72|  2.19k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.19k|        do {                                                            \
  |  |  |  |   59|  2.19k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  4.00k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.19k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 387, False: 1.81k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 1.81k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.19k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.19k|        } while (false)
  |  |  ------------------
  ------------------
   23|       |
   24|       |        /* The same as memdup() but place a safety NUL byte after the allocated memory */
   25|       |
   26|  2.19k|        if (_unlikely_(l == SIZE_MAX)) /* prevent overflow */
  ------------------
  |  |   95|  2.19k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 2.19k]
  |  |  ------------------
  ------------------
   27|      0|                return NULL;
   28|       |
   29|  2.19k|        ret = malloc(l + 1);
   30|  2.19k|        if (!ret)
  ------------------
  |  Branch (30:13): [True: 0, False: 2.19k]
  ------------------
   31|      0|                return NULL;
   32|       |
   33|  2.19k|        ((uint8_t*) ret)[l] = 0;
   34|  2.19k|        return memcpy_safe(ret, p, l);
   35|  2.19k|}
greedy_realloc:
   40|  79.9k|                size_t size) {
   41|       |
   42|  79.9k|        size_t newalloc;
   43|  79.9k|        void *q;
   44|       |
   45|  79.9k|        assert(p);
  ------------------
  |  |   72|  79.9k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  79.9k|        do {                                                            \
  |  |  |  |   59|  79.9k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  79.9k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 79.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  79.9k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  79.9k|        } while (false)
  |  |  ------------------
  ------------------
   46|       |
   47|       |        /* We use malloc_usable_size() for determining the current allocated size. On all systems we care
   48|       |         * about this should be safe to rely on. Should there ever arise the need to avoid relying on this we
   49|       |         * can instead locally fall back to realloc() on every call, rounded up to the next exponent of 2 or
   50|       |         * so. */
   51|       |
   52|  79.9k|        if (*p && (size == 0 || (MALLOC_SIZEOF_SAFE(*p) / size >= need)))
  ------------------
  |  |  198|  76.0k|        malloc_sizeof_safe((void**) &__builtin_choose_expr(__builtin_constant_p(x), (void*) { NULL }, (x)))
  ------------------
  |  Branch (52:13): [True: 76.0k, False: 3.96k]
  |  Branch (52:20): [True: 0, False: 76.0k]
  |  Branch (52:33): [True: 75.4k, False: 577]
  ------------------
   53|  75.4k|                return *p;
   54|       |
   55|  4.53k|        if (_unlikely_(need > SIZE_MAX/2)) /* Overflow check */
  ------------------
  |  |   95|  4.53k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 4.53k]
  |  |  ------------------
  ------------------
   56|      0|                return NULL;
   57|  4.53k|        newalloc = need * 2;
   58|       |
   59|  4.53k|        if (!MUL_ASSIGN_SAFE(&newalloc, size))
  ------------------
  |  |  273|  4.53k|#define MUL_ASSIGN_SAFE(a, b) __MUL_ASSIGN_SAFE(UNIQ, a, b)
  |  |  ------------------
  |  |  |  |  275|  4.53k|        ({                                                      \
  |  |  |  |  276|  4.53k|                const typeof(a) UNIQ_T(A, q) = (a);             \
  |  |  |  |  277|  4.53k|                MUL_SAFE(UNIQ_T(A, q), *UNIQ_T(A, q), b);       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  272|  4.53k|#define MUL_SAFE(ret, a, b) (!__builtin_mul_overflow(a, b, ret))
  |  |  |  |  ------------------
  |  |  |  |  278|  4.53k|        })
  |  |  ------------------
  ------------------
  |  Branch (59:13): [True: 0, False: 4.53k]
  ------------------
   60|      0|                return NULL;
   61|       |
   62|  4.53k|        if (newalloc < 64) /* Allocate at least 64 bytes */
  ------------------
  |  Branch (62:13): [True: 0, False: 4.53k]
  ------------------
   63|      0|                newalloc = 64;
   64|       |
   65|  4.53k|        q = realloc(*p, newalloc);
   66|  4.53k|        if (!q)
  ------------------
  |  Branch (66:13): [True: 0, False: 4.53k]
  ------------------
   67|      0|                return NULL;
   68|       |
   69|  4.53k|        return *p = q;
   70|  4.53k|}
expand_to_usable:
  128|  79.6k|void *expand_to_usable(void *ptr, size_t newsize _unused_) {
  129|  79.6k|        return ptr;
  130|  79.6k|}
malloc_sizeof_safe:
  132|  79.6k|size_t malloc_sizeof_safe(void **xp) {
  133|  79.6k|        if (_unlikely_(!xp || !*xp))
  ------------------
  |  |   95|   159k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 79.6k]
  |  |  |  Branch (95:44): [True: 0, False: 79.6k]
  |  |  |  Branch (95:44): [True: 0, False: 79.6k]
  |  |  ------------------
  ------------------
  134|      0|                return 0;
  135|       |
  136|  79.6k|        size_t sz = malloc_usable_size(*xp);
  137|  79.6k|        *xp = expand_to_usable(*xp, sz);
  138|       |        /* GCC doesn't see the _returns_nonnull_ when built with ubsan, so yet another hint to make it doubly
  139|       |         * clear that expand_to_usable won't return NULL.
  140|       |         * See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79265 */
  141|  79.6k|        if (!*xp)
  ------------------
  |  Branch (141:13): [True: 0, False: 79.6k]
  ------------------
  142|      0|                assert_not_reached();
  ------------------
  |  |   76|      0|        log_assert_failed_unreachable(PROJECT_FILE, __LINE__, __func__)
  |  |  ------------------
  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  ------------------
  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  143|  79.6k|        return sz;
  144|  79.6k|}

journald-manager.c:malloc_multiply:
   88|  1.08k|_malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t need, size_t size) {
   89|  1.08k|        if (size_multiply_overflow(size, need))
  ------------------
  |  Branch (89:13): [True: 0, False: 1.08k]
  ------------------
   90|      0|                return NULL;
   91|       |
   92|  1.08k|        return malloc(size * need ?: 1);
  ------------------
  |  Branch (92:23): [True: 1.08k, False: 0]
  ------------------
   93|  1.08k|}
journald-manager.c:size_multiply_overflow:
   84|  1.08k|static inline bool size_multiply_overflow(size_t size, size_t need) {
   85|  1.08k|        return _unlikely_(need != 0 && size > (SIZE_MAX / need));
  ------------------
  |  |   95|  2.16k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:44): [True: 1.08k, False: 0]
  |  |  |  Branch (95:44): [True: 0, False: 1.08k]
  |  |  ------------------
  ------------------
   86|  1.08k|}
journald-wall.c:freep:
   78|    236|static inline void freep(void *p) {
   79|    236|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|    236|        ({                                      \
  |  |  405|    236|                free(memory);                   \
  |  |  406|    236|                (typeof(memory)) NULL;          \
  |  |  407|    236|        })
  ------------------
   80|    236|}
hostname-setup.c:freep:
   78|    178|static inline void freep(void *p) {
   79|    178|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|    178|        ({                                      \
  |  |  405|    178|                free(memory);                   \
  |  |  406|    178|                (typeof(memory)) NULL;          \
  |  |  407|    178|        })
  ------------------
   80|    178|}
wall.c:freep:
   78|    356|static inline void freep(void *p) {
   79|    356|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|    356|        ({                                      \
  |  |  405|    356|                free(memory);                   \
  |  |  406|    356|                (typeof(memory)) NULL;          \
  |  |  407|    356|        })
  ------------------
   80|    356|}
log.c:freep:
   78|  1.08k|static inline void freep(void *p) {
   79|  1.08k|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  1.08k|        ({                                      \
  |  |  405|  1.08k|                free(memory);                   \
  |  |  406|  1.08k|                (typeof(memory)) NULL;          \
  |  |  407|  1.08k|        })
  ------------------
   80|  1.08k|}
prioq.c:malloc_multiply:
   88|  1.08k|_malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t need, size_t size) {
   89|  1.08k|        if (size_multiply_overflow(size, need))
  ------------------
  |  Branch (89:13): [True: 0, False: 1.08k]
  ------------------
   90|      0|                return NULL;
   91|       |
   92|  1.08k|        return malloc(size * need ?: 1);
  ------------------
  |  Branch (92:23): [True: 1.08k, False: 0]
  ------------------
   93|  1.08k|}
prioq.c:size_multiply_overflow:
   84|  1.08k|static inline bool size_multiply_overflow(size_t size, size_t need) {
   85|  1.08k|        return _unlikely_(need != 0 && size > (SIZE_MAX / need));
  ------------------
  |  |   95|  2.16k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:44): [True: 1.08k, False: 0]
  |  |  |  Branch (95:44): [True: 0, False: 1.08k]
  |  |  ------------------
  ------------------
   86|  1.08k|}
string-util.c:freep:
   78|     59|static inline void freep(void *p) {
   79|     59|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|     59|        ({                                      \
  |  |  405|     59|                free(memory);                   \
  |  |  406|     59|                (typeof(memory)) NULL;          \
  |  |  407|     59|        })
  ------------------
   80|     59|}
string-util.c:GREEDY_ALLOC_ROUND_UP:
  111|     59|static inline size_t GREEDY_ALLOC_ROUND_UP(size_t l) {
  112|     59|        size_t m;
  113|       |
  114|       |        /* Round up allocation sizes a bit to some reasonable, likely larger value. This is supposed to be
  115|       |         * used for cases which are likely called in an allocation loop of some form, i.e. that repetitively
  116|       |         * grow stuff, for example strv_extend() and suchlike.
  117|       |         *
  118|       |         * Note the difference to GREEDY_REALLOC() here, as this helper operates on a single size value only,
  119|       |         * and rounds up to next multiple of 2, needing no further counter.
  120|       |         *
  121|       |         * Note the benefits of direct ALIGN_POWER2() usage: type-safety for size_t, sane handling for very
  122|       |         * small (i.e. <= 2) and safe handling for very large (i.e. > SSIZE_MAX) values. */
  123|       |
  124|     59|        if (l <= 2)
  ------------------
  |  Branch (124:13): [True: 0, False: 59]
  ------------------
  125|      0|                return 2; /* Never allocate less than 2 of something.  */
  126|       |
  127|     59|        m = ALIGN_POWER2(l);
  128|     59|        if (m == 0) /* overflow? */
  ------------------
  |  Branch (128:13): [True: 0, False: 59]
  ------------------
  129|      0|                return l;
  130|       |
  131|     59|        return m;
  132|     59|}
terminal-util.c:freep:
   78|     89|static inline void freep(void *p) {
   79|     89|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|     89|        ({                                      \
  |  |  405|     89|                free(memory);                   \
  |  |  406|     89|                (typeof(memory)) NULL;          \
  |  |  407|     89|        })
  ------------------
   80|     89|}
sd-event.c:malloc_multiply:
   88|  1.08k|_malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t need, size_t size) {
   89|  1.08k|        if (size_multiply_overflow(size, need))
  ------------------
  |  Branch (89:13): [True: 0, False: 1.08k]
  ------------------
   90|      0|                return NULL;
   91|       |
   92|  1.08k|        return malloc(size * need ?: 1);
  ------------------
  |  Branch (92:23): [True: 1.08k, False: 0]
  ------------------
   93|  1.08k|}
sd-event.c:size_multiply_overflow:
   84|  1.08k|static inline bool size_multiply_overflow(size_t size, size_t need) {
   85|  1.08k|        return _unlikely_(need != 0 && size > (SIZE_MAX / need));
  ------------------
  |  |   95|  2.16k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:44): [True: 1.08k, False: 0]
  |  |  |  Branch (95:44): [True: 0, False: 1.08k]
  |  |  ------------------
  ------------------
   86|  1.08k|}

invoked_by_systemd:
   41|  1.08k|bool invoked_by_systemd(void) {
   42|  1.08k|        int r;
   43|       |
   44|       |        /* If the process is directly executed by PID1 (e.g. ExecStart= or generator), systemd-importd,
   45|       |         * or systemd-homed, then $SYSTEMD_EXEC_PID= is set, and read the command line. */
   46|  1.08k|        const char *e = getenv("SYSTEMD_EXEC_PID");
   47|  1.08k|        if (!e)
  ------------------
  |  Branch (47:13): [True: 1.08k, False: 0]
  ------------------
   48|  1.08k|                return false;
   49|       |
   50|      0|        if (streq(e, "*"))
  ------------------
  |  |   46|      0|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   51|       |                /* For testing. */
   52|      0|                return true;
   53|       |
   54|      0|        pid_t p;
   55|      0|        r = parse_pid(e, &p);
   56|      0|        if (r < 0) {
  ------------------
  |  Branch (56:13): [True: 0, False: 0]
  ------------------
   57|       |                /* We know that systemd sets the variable correctly. Something else must have set it. */
   58|      0|                log_debug_errno(r, "Failed to parse \"SYSTEMD_EXEC_PID=%s\", ignoring: %m", e);
  ------------------
  |  |  228|      0|#define log_debug_errno(error, ...)     log_full_errno(LOG_DEBUG,   error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
   59|      0|                return false;
   60|      0|        }
   61|       |
   62|      0|        return getpid_cached() == p;
   63|      0|}

log_set_assert_return_is_critical:
   16|  1.08k|void log_set_assert_return_is_critical(bool b) {
   17|  1.08k|        assert_return_is_critical = b;
   18|  1.08k|}

mmap_cache_unref:
   45|  1.08k|        scope type *name##_unref(type *p) {                      \
   46|  1.08k|                if (!p)                                          \
  ------------------
  |  Branch (46:21): [True: 1.08k, False: 0]
  ------------------
   47|  1.08k|                        return NULL;                             \
   48|  1.08k|                                                                 \
   49|  1.08k|                assert(p->n_ref > 0);                            \
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
   50|      0|                p->n_ref--;                                      \
   51|      0|                if (p->n_ref > 0)                                \
  ------------------
  |  Branch (51:21): [True: 0, False: 0]
  ------------------
   52|      0|                        return NULL;                             \
   53|      0|                                                                 \
   54|      0|                return free_func(p);                             \
   55|      0|        }
sd_event_source_unref:
   45|  18.3k|        scope type *name##_unref(type *p) {                      \
   46|  18.3k|                if (!p)                                          \
  ------------------
  |  Branch (46:21): [True: 18.3k, False: 0]
  ------------------
   47|  18.3k|                        return NULL;                             \
   48|  18.3k|                                                                 \
   49|  18.3k|                assert(p->n_ref > 0);                            \
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
   50|      0|                p->n_ref--;                                      \
   51|      0|                if (p->n_ref > 0)                                \
  ------------------
  |  Branch (51:21): [True: 0, False: 0]
  ------------------
   52|      0|                        return NULL;                             \
   53|      0|                                                                 \
   54|      0|                return free_func(p);                             \
   55|      0|        }
sd_varlink_server_unref:
   45|  1.08k|        scope type *name##_unref(type *p) {                      \
   46|  1.08k|                if (!p)                                          \
  ------------------
  |  Branch (46:21): [True: 1.08k, False: 0]
  ------------------
   47|  1.08k|                        return NULL;                             \
   48|  1.08k|                                                                 \
   49|  1.08k|                assert(p->n_ref > 0);                            \
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
   50|      0|                p->n_ref--;                                      \
   51|      0|                if (p->n_ref > 0)                                \
  ------------------
  |  Branch (51:21): [True: 0, False: 0]
  ------------------
   52|      0|                        return NULL;                             \
   53|      0|                                                                 \
   54|      0|                return free_func(p);                             \
   55|      0|        }

getenv_bool:
  991|  1.08k|int getenv_bool(const char *p) {
  992|  1.08k|        const char *e;
  993|       |
  994|  1.08k|        e = getenv(p);
  995|  1.08k|        if (!e)
  ------------------
  |  Branch (995:13): [True: 1.08k, False: 0]
  ------------------
  996|  1.08k|                return -ENXIO;
  997|       |
  998|      0|        return parse_boolean(e);
  999|  1.08k|}

fd-util.c:_reset_errno_:
   23|  2.16k|static inline void _reset_errno_(int *saved_errno) {
   24|  2.16k|        if (*saved_errno < 0) /* Invalidated by UNPROTECT_ERRNO? */
  ------------------
  |  Branch (24:13): [True: 0, False: 2.16k]
  ------------------
   25|      0|                return;
   26|       |
   27|  2.16k|        errno = *saved_errno;
   28|  2.16k|}
log.c:_reset_errno_:
   23|  1.08k|static inline void _reset_errno_(int *saved_errno) {
   24|  1.08k|        if (*saved_errno < 0) /* Invalidated by UNPROTECT_ERRNO? */
  ------------------
  |  Branch (24:13): [True: 0, False: 1.08k]
  ------------------
   25|      0|                return;
   26|       |
   27|  1.08k|        errno = *saved_errno;
   28|  1.08k|}

close_nointr:
   35|  1.08k|int close_nointr(int fd) {
   36|  1.08k|        assert(fd >= 0);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
   37|       |
   38|  1.08k|        if (close(fd) >= 0)
  ------------------
  |  Branch (38:13): [True: 1.08k, False: 0]
  ------------------
   39|  1.08k|                return 0;
   40|       |
   41|       |        /*
   42|       |         * Just ignore EINTR; a retry loop is the wrong thing to do on
   43|       |         * Linux.
   44|       |         *
   45|       |         * http://lkml.indiana.edu/hypermail/linux/kernel/0509.1/0877.html
   46|       |         * https://bugzilla.gnome.org/show_bug.cgi?id=682819
   47|       |         * http://utcc.utoronto.ca/~cks/space/blog/unix/CloseEINTR
   48|       |         * https://sites.google.com/site/michaelsafyan/software-engineering/checkforeintrwheninvokingclosethinkagain
   49|       |         */
   50|      0|        if (errno == EINTR)
  ------------------
  |  Branch (50:13): [True: 0, False: 0]
  ------------------
   51|      0|                return 0;
   52|       |
   53|      0|        return -errno;
   54|      0|}
safe_close:
   56|  18.3k|int safe_close(int fd) {
   57|       |        /*
   58|       |         * Like close_nointr() but cannot fail. Guarantees errno is unchanged. Is a noop for negative fds,
   59|       |         * and returns -EBADF, so that it can be used in this syntax:
   60|       |         *
   61|       |         * fd = safe_close(fd);
   62|       |         */
   63|       |
   64|  18.3k|        if (fd >= 0) {
  ------------------
  |  Branch (64:13): [True: 1.08k, False: 17.3k]
  ------------------
   65|  1.08k|                PROTECT_ERRNO;
  ------------------
  |  |   31|  1.08k|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|  1.08k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   66|       |
   67|       |                /* The kernel might return pretty much any error code
   68|       |                 * via close(), but the fd will be closed anyway. The
   69|       |                 * only condition we want to check for here is whether
   70|       |                 * the fd was invalid at all... */
   71|       |
   72|  1.08k|                assert_se(close_nointr(fd) != -EBADF);
  ------------------
  |  |   65|  1.08k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
   73|  1.08k|        }
   74|       |
   75|  18.3k|        return -EBADF;
   76|  18.3k|}
fd_move_above_stdio:
  712|  1.08k|int fd_move_above_stdio(int fd) {
  713|  1.08k|        int flags, copy;
  714|  1.08k|        PROTECT_ERRNO;
  ------------------
  |  |   31|  1.08k|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|  1.08k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  715|       |
  716|       |        /* Moves the specified file descriptor if possible out of the range [0…2], i.e. the range of
  717|       |         * stdin/stdout/stderr. If it can't be moved outside of this range the original file descriptor is
  718|       |         * returned. This call is supposed to be used for long-lasting file descriptors we allocate in our code that
  719|       |         * might get loaded into foreign code, and where we want ensure our fds are unlikely used accidentally as
  720|       |         * stdin/stdout/stderr of unrelated code.
  721|       |         *
  722|       |         * Note that this doesn't fix any real bugs, it just makes it less likely that our code will be affected by
  723|       |         * buggy code from others that mindlessly invokes 'fprintf(stderr, …' or similar in places where stderr has
  724|       |         * been closed before.
  725|       |         *
  726|       |         * This function is written in a "best-effort" and "least-impact" style. This means whenever we encounter an
  727|       |         * error we simply return the original file descriptor, and we do not touch errno. */
  728|       |
  729|  1.08k|        if (fd < 0 || fd > 2)
  ------------------
  |  Branch (729:13): [True: 0, False: 1.08k]
  |  Branch (729:23): [True: 1.08k, False: 0]
  ------------------
  730|  1.08k|                return fd;
  731|       |
  732|      0|        flags = fcntl(fd, F_GETFD, 0);
  733|      0|        if (flags < 0)
  ------------------
  |  Branch (733:13): [True: 0, False: 0]
  ------------------
  734|      0|                return fd;
  735|       |
  736|      0|        if (flags & FD_CLOEXEC)
  ------------------
  |  Branch (736:13): [True: 0, False: 0]
  ------------------
  737|      0|                copy = fcntl(fd, F_DUPFD_CLOEXEC, 3);
  738|      0|        else
  739|      0|                copy = fcntl(fd, F_DUPFD, 3);
  740|      0|        if (copy < 0)
  ------------------
  |  Branch (740:13): [True: 0, False: 0]
  ------------------
  741|      0|                return fd;
  742|       |
  743|      0|        assert(copy > 2);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  744|       |
  745|      0|        (void) close(fd);
  746|      0|        return copy;
  747|      0|}

_hashmap_free:
  905|  8.65k|HashmapBase* _hashmap_free(HashmapBase *h) {
  906|  8.65k|        if (h) {
  ------------------
  |  Branch (906:13): [True: 0, False: 8.65k]
  ------------------
  907|      0|                _hashmap_clear(h);
  908|      0|                hashmap_free_no_clear(h);
  909|      0|        }
  910|       |
  911|  8.65k|        return NULL;
  912|  8.65k|}
_hashmap_size:
 1596|  2.16k|unsigned _hashmap_size(HashmapBase *h) {
 1597|  2.16k|        if (!h)
  ------------------
  |  Branch (1597:13): [True: 2.16k, False: 0]
  ------------------
 1598|  2.16k|                return 0;
 1599|       |
 1600|      0|        return n_entries(h);
 1601|  2.16k|}

journald-context.c:hashmap_size:
  203|  2.16k|static inline unsigned hashmap_size(Hashmap *h) {
  204|  2.16k|        return _hashmap_size(HASHMAP_BASE(h));
  ------------------
  |  |   46|  2.16k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  2.16k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  2.16k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  2.16k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  2.16k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  2.16k|                (HashmapBase*)(h), \
  |  |   48|  2.16k|                (void)0)
  ------------------
  205|  2.16k|}
journald-context.c:hashmap_isempty:
  210|  1.08k|static inline bool hashmap_isempty(Hashmap *h) {
  211|  1.08k|        return hashmap_size(h) == 0;
  212|  1.08k|}
journald-context.c:hashmap_free:
   64|  1.08k|static inline Hashmap* hashmap_free(Hashmap *h) {
   65|  1.08k|        return (void*) _hashmap_free(HASHMAP_BASE(h));
  ------------------
  |  |   46|  1.08k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  1.08k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  1.08k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  1.08k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  1.08k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  1.08k|                (HashmapBase*)(h), \
  |  |   48|  1.08k|                (void)0)
  ------------------
   66|  1.08k|}
journald-manager.c:ordered_hashmap_free:
   67|  2.16k|static inline OrderedHashmap* ordered_hashmap_free(OrderedHashmap *h) {
   68|  2.16k|        return (void*) _hashmap_free(HASHMAP_BASE(h));
  ------------------
  |  |   46|  2.16k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  2.16k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  2.16k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  2.16k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  2.16k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  2.16k|                (HashmapBase*)(h), \
  |  |   48|  2.16k|                (void)0)
  ------------------
   69|  2.16k|}
sd-event.c:hashmap_free:
   64|  3.24k|static inline Hashmap* hashmap_free(Hashmap *h) {
   65|  3.24k|        return (void*) _hashmap_free(HASHMAP_BASE(h));
  ------------------
  |  |   46|  3.24k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  3.24k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  3.24k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  3.24k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  3.24k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  3.24k|                (HashmapBase*)(h), \
  |  |   48|  3.24k|                (void)0)
  ------------------
   66|  3.24k|}

iovec_make_string:
   55|  3.61k|struct iovec* iovec_make_string(struct iovec *iovec, const char *s) {
   56|  3.61k|        assert(iovec);
  ------------------
  |  |   72|  3.61k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.61k|        do {                                                            \
  |  |  |  |   59|  3.61k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.61k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.61k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.61k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  3.61k|        } while (false)
  |  |  ------------------
  ------------------
   57|       |
   58|  3.61k|        *iovec = IOVEC_MAKE(s, strlen_ptr(s));
  ------------------
  |  |   21|  3.61k|        (struct iovec) {                                                \
  |  |   22|  3.61k|                .iov_base = (void*) (base),                             \
  |  |   23|  3.61k|                .iov_len = (len),                                       \
  |  |   24|  3.61k|        }
  ------------------
   59|  3.61k|        return iovec;
   60|  3.61k|}

stderr_is_journal:
  233|  1.08k|bool stderr_is_journal(void) {
  234|  1.08k|        _cleanup_free_ char *w = NULL;
  ------------------
  |  |   82|  1.08k|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.08k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  235|  1.08k|        const char *e;
  236|  1.08k|        uint64_t dev, ino;
  237|  1.08k|        struct stat st;
  238|       |
  239|  1.08k|        e = getenv("JOURNAL_STREAM");
  240|  1.08k|        if (!e)
  ------------------
  |  Branch (240:13): [True: 1.08k, False: 0]
  ------------------
  241|  1.08k|                return false;
  242|       |
  243|      0|        if (extract_first_word(&e, &w, ":", EXTRACT_DONT_COALESCE_SEPARATORS) <= 0)
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|                return false;
  245|      0|        if (!e)
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|                return false;
  247|       |
  248|      0|        if (safe_atou64(w, &dev) < 0)
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  ------------------
  249|      0|                return false;
  250|      0|        if (safe_atou64(e, &ino) < 0)
  ------------------
  |  Branch (250:13): [True: 0, False: 0]
  ------------------
  251|      0|                return false;
  252|       |
  253|      0|        if (fstat(STDERR_FILENO, &st) < 0)
  ------------------
  |  Branch (253:13): [True: 0, False: 0]
  ------------------
  254|      0|                return false;
  255|       |
  256|      0|        return st.st_dev == dev && st.st_ino == ino;
  ------------------
  |  Branch (256:16): [True: 0, False: 0]
  |  Branch (256:36): [True: 0, False: 0]
  ------------------
  257|      0|}
log_open:
  259|  1.08k|int log_open(void) {
  260|  1.08k|        int r;
  261|       |
  262|       |        /* Do not call from library code. */
  263|       |
  264|       |        /* This function is often called in preparation for logging. Let's make sure we don't clobber errno,
  265|       |         * so that a call to a logging function immediately following a log_open() call can still easily
  266|       |         * reference an error that happened immediately before the log_open() call. */
  267|  1.08k|        PROTECT_ERRNO;
  ------------------
  |  |   31|  1.08k|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|  1.08k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  268|       |
  269|       |        /* If we don't use the console, we close it here to not get killed by SAK. If we don't use syslog, we
  270|       |         * close it here too, so that we are not confused by somebody deleting the socket in the fs, and to
  271|       |         * make sure we don't use it if prohibit_ipc is set. If we don't use /dev/kmsg we still keep it open,
  272|       |         * because there is no reason to close it. */
  273|       |
  274|  1.08k|        if (log_target == LOG_TARGET_NULL) {
  ------------------
  |  Branch (274:13): [True: 0, False: 1.08k]
  ------------------
  275|      0|                log_close_journal();
  276|      0|                log_close_syslog();
  277|      0|                log_close_console();
  278|      0|                return 0;
  279|      0|        }
  280|       |
  281|  1.08k|        if (getpid_cached() == 1 ||
  ------------------
  |  Branch (281:13): [True: 0, False: 1.08k]
  ------------------
  282|  1.08k|            stderr_is_journal() ||
  ------------------
  |  Branch (282:13): [True: 0, False: 1.08k]
  ------------------
  283|  1.08k|            IN_SET(log_target,
  ------------------
  |  |  361|  1.08k|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 1.08k]
  |  |  ------------------
  |  |  362|  1.08k|                bool _found = false;                                    \
  |  |  363|  1.08k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  1.08k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  1.08k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  1.08k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  1.08k|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  1.08k|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  337|      0|#define  CASE_F_5(X, ...) case X:  CASE_F_4( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  336|      0|#define  CASE_F_4(X, ...) case X:  CASE_F_3( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (336:27): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (337:27): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|  1.08k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 1.08k, False: 0]
  |  |  ------------------
  |  |  372|  1.08k|                        ;                                               \
  |  |  373|  1.08k|                }                                                       \
  |  |  374|  1.08k|                _found;                                                 \
  |  |  375|  1.08k|        })
  ------------------
  284|  1.08k|                   LOG_TARGET_KMSG,
  285|  1.08k|                   LOG_TARGET_JOURNAL,
  286|  1.08k|                   LOG_TARGET_JOURNAL_OR_KMSG,
  287|  1.08k|                   LOG_TARGET_SYSLOG,
  288|  1.08k|                   LOG_TARGET_SYSLOG_OR_KMSG)) {
  289|       |
  290|      0|                if (!prohibit_ipc) {
  ------------------
  |  Branch (290:21): [True: 0, False: 0]
  ------------------
  291|      0|                        if (IN_SET(log_target,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  292|      0|                                   LOG_TARGET_AUTO,
  293|      0|                                   LOG_TARGET_JOURNAL_OR_KMSG,
  294|      0|                                   LOG_TARGET_JOURNAL)) {
  295|       |
  296|      0|                                r = log_open_journal();
  297|      0|                                if (r >= 0) {
  ------------------
  |  Branch (297:37): [True: 0, False: 0]
  ------------------
  298|      0|                                        log_close_syslog();
  299|      0|                                        log_close_console();
  300|      0|                                        return r;
  301|      0|                                }
  302|      0|                        }
  303|       |
  304|      0|                        if (IN_SET(log_target,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  305|      0|                                   LOG_TARGET_SYSLOG_OR_KMSG,
  306|      0|                                   LOG_TARGET_SYSLOG)) {
  307|       |
  308|      0|                                r = log_open_syslog();
  309|      0|                                if (r >= 0) {
  ------------------
  |  Branch (309:37): [True: 0, False: 0]
  ------------------
  310|      0|                                        log_close_journal();
  311|      0|                                        log_close_console();
  312|      0|                                        return r;
  313|      0|                                }
  314|      0|                        }
  315|      0|                }
  316|       |
  317|      0|                if (IN_SET(log_target, LOG_TARGET_AUTO,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  336|      0|#define  CASE_F_4(X, ...) case X:  CASE_F_3( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (336:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  318|      0|                                       LOG_TARGET_JOURNAL_OR_KMSG,
  319|      0|                                       LOG_TARGET_SYSLOG_OR_KMSG,
  320|      0|                                       LOG_TARGET_KMSG)) {
  321|      0|                        r = log_open_kmsg();
  322|      0|                        if (r >= 0) {
  ------------------
  |  Branch (322:29): [True: 0, False: 0]
  ------------------
  323|      0|                                log_close_journal();
  324|      0|                                log_close_syslog();
  325|      0|                                log_close_console();
  326|      0|                                return r;
  327|      0|                        }
  328|      0|                }
  329|      0|        }
  330|       |
  331|  1.08k|        log_close_journal();
  332|  1.08k|        log_close_syslog();
  333|       |
  334|  1.08k|        return log_open_console();
  335|  1.08k|}
log_set_target:
  337|  1.08k|void log_set_target(LogTarget target) {
  338|  1.08k|        assert(target >= 0);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  339|  1.08k|        assert(target < _LOG_TARGET_MAX);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  340|       |
  341|  1.08k|        if (upgrade_syslog_to_journal) {
  ------------------
  |  Branch (341:13): [True: 0, False: 1.08k]
  ------------------
  342|      0|                if (target == LOG_TARGET_SYSLOG)
  ------------------
  |  Branch (342:21): [True: 0, False: 0]
  ------------------
  343|      0|                        target = LOG_TARGET_JOURNAL;
  344|      0|                else if (target == LOG_TARGET_SYSLOG_OR_KMSG)
  ------------------
  |  Branch (344:26): [True: 0, False: 0]
  ------------------
  345|      0|                        target = LOG_TARGET_JOURNAL_OR_KMSG;
  346|      0|        }
  347|       |
  348|  1.08k|        log_target = target;
  349|  1.08k|}
log_set_max_level:
  372|  1.08k|int log_set_max_level(int level) {
  373|  1.08k|        assert(level == LOG_NULL || log_level_is_valid(level));
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.16k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 1.08k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  374|       |
  375|  1.08k|        int old = log_max_level;
  376|  1.08k|        log_max_level = level;
  377|       |
  378|       |        /* Also propagate max log level to libc's syslog(), just in case some other component loaded into our
  379|       |         * process logs directly via syslog(). You might wonder why we maintain our own log level variable if
  380|       |         * libc has the same functionality. This has multiple reasons, first and foremost that we want to
  381|       |         * apply this to all our log targets, not just syslog and console. Moreover, we cannot query the
  382|       |         * current log mask from glibc without changing it, but that's useful for testing the current log
  383|       |         * level before even entering the log functions like we do in our macros. */
  384|  1.08k|        setlogmask(LOG_UPTO(level));
  385|       |
  386|       |        /* Ensure that our own LOG_NULL define maps sanely to the log mask */
  387|  1.08k|        assert_cc(LOG_UPTO(LOG_NULL) == 0);
  ------------------
  |  |  142|  1.08k|#define assert_cc(expr) _Static_assert(expr, #expr)
  ------------------
  388|       |
  389|  1.08k|        return old;
  390|  1.08k|}
log_parse_environment_variables:
 1321|  1.08k|void log_parse_environment_variables(void) {
 1322|  1.08k|        const char *e;
 1323|  1.08k|        int r;
 1324|       |
 1325|  1.08k|        e = getenv("SYSTEMD_LOG_TARGET");
 1326|  1.08k|        if (e && log_set_target_from_string(e) < 0)
  ------------------
  |  Branch (1326:13): [True: 0, False: 1.08k]
  |  Branch (1326:18): [True: 0, False: 0]
  ------------------
 1327|  1.08k|                log_warning("Failed to parse log target '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1328|       |
 1329|  1.08k|        e = getenv("SYSTEMD_LOG_LEVEL");
 1330|  1.08k|        if (e) {
  ------------------
  |  Branch (1330:13): [True: 0, False: 1.08k]
  ------------------
 1331|      0|                r = log_set_max_level_from_string(e);
 1332|      0|                if (r < 0)
  ------------------
  |  Branch (1332:21): [True: 0, False: 0]
  ------------------
 1333|      0|                        log_warning_errno(r, "Failed to parse log level '%s', ignoring: %m", e);
  ------------------
  |  |  231|      0|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
 1334|  1.08k|        } else {
 1335|       |                /* If no explicit log level is specified then let's see if this is a debug invocation, and if
 1336|       |                 * so raise the log level to debug too. Note that this is not symmetric: just because
 1337|       |                 * DEBUG_INVOCATION is explicitly set to 0 we won't lower the log level below debug. This
 1338|       |                 * follows the logic that debug logging is an opt-in thing anyway, and if there's any reason
 1339|       |                 * to enable it we should not disable it here automatically. */
 1340|  1.08k|                r = getenv_bool("DEBUG_INVOCATION");
 1341|  1.08k|                if (r < 0 && r != -ENXIO)
  ------------------
  |  Branch (1341:21): [True: 1.08k, False: 0]
  |  Branch (1341:30): [True: 0, False: 1.08k]
  ------------------
 1342|  1.08k|                        log_warning_errno(r, "Failed to parse $DEBUG_INVOCATION value, ignoring: %m");
  ------------------
  |  |  231|      0|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
 1343|  1.08k|                else if (r > 0)
  ------------------
  |  Branch (1343:26): [True: 0, False: 1.08k]
  ------------------
 1344|      0|                        log_set_max_level(LOG_DEBUG);
 1345|  1.08k|        }
 1346|       |
 1347|  1.08k|        e = getenv("SYSTEMD_LOG_COLOR");
 1348|  1.08k|        if (e && log_show_color_from_string(e) < 0)
  ------------------
  |  Branch (1348:13): [True: 0, False: 1.08k]
  |  Branch (1348:18): [True: 0, False: 0]
  ------------------
 1349|  1.08k|                log_warning("Failed to parse log color '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1350|       |
 1351|  1.08k|        e = getenv("SYSTEMD_LOG_LOCATION");
 1352|  1.08k|        if (e && log_show_location_from_string(e) < 0)
  ------------------
  |  Branch (1352:13): [True: 0, False: 1.08k]
  |  Branch (1352:18): [True: 0, False: 0]
  ------------------
 1353|  1.08k|                log_warning("Failed to parse log location '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1354|       |
 1355|  1.08k|        e = getenv("SYSTEMD_LOG_TIME");
 1356|  1.08k|        if (e && log_show_time_from_string(e) < 0)
  ------------------
  |  Branch (1356:13): [True: 0, False: 1.08k]
  |  Branch (1356:18): [True: 0, False: 0]
  ------------------
 1357|  1.08k|                log_warning("Failed to parse log time '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1358|       |
 1359|  1.08k|        e = getenv("SYSTEMD_LOG_TID");
 1360|  1.08k|        if (e && log_show_tid_from_string(e) < 0)
  ------------------
  |  Branch (1360:13): [True: 0, False: 1.08k]
  |  Branch (1360:18): [True: 0, False: 0]
  ------------------
 1361|  1.08k|                log_warning("Failed to parse log tid '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1362|       |
 1363|  1.08k|        e = getenv("SYSTEMD_LOG_RATELIMIT_KMSG");
 1364|  1.08k|        if (e && log_set_ratelimit_kmsg_from_string(e) < 0)
  ------------------
  |  Branch (1364:13): [True: 0, False: 1.08k]
  |  Branch (1364:18): [True: 0, False: 0]
  ------------------
 1365|  1.08k|                log_warning("Failed to parse log ratelimit kmsg boolean '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1366|  1.08k|}
log_parse_environment:
 1368|  1.08k|void log_parse_environment(void) {
 1369|       |        /* Do not call from library code. */
 1370|       |
 1371|  1.08k|        if (should_parse_proc_cmdline())
  ------------------
  |  Branch (1371:13): [True: 0, False: 1.08k]
  ------------------
 1372|      0|                (void) proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_STRIP_RD_PREFIX);
 1373|       |
 1374|  1.08k|        log_parse_environment_variables();
 1375|  1.08k|}
log_get_max_level:
 1399|    324|int log_get_max_level(void) {
 1400|    324|        return log_max_level;
 1401|    324|}
log_show_color:
 1409|      1|void log_show_color(bool b) {
 1410|      1|        show_color = b;
 1411|      1|}
log_on_console:
 1485|  1.08k|bool log_on_console(void) {
 1486|  1.08k|        if (IN_SET(log_target, LOG_TARGET_CONSOLE,
  ------------------
  |  |  361|  1.08k|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 1.08k]
  |  |  ------------------
  |  |  362|  1.08k|                bool _found = false;                                    \
  |  |  363|  1.08k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  1.08k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  1.08k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  1.08k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  1.08k|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  1.08k|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|  1.08k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 1.08k, False: 0]
  |  |  ------------------
  |  |  372|  1.08k|                        ;                                               \
  |  |  373|  1.08k|                }                                                       \
  |  |  374|  1.08k|                _found;                                                 \
  |  |  375|  1.08k|        })
  ------------------
 1487|  1.08k|                               LOG_TARGET_CONSOLE_PREFIXED))
 1488|      0|                return true;
 1489|       |
 1490|  1.08k|        return syslog_fd < 0 && kmsg_fd < 0 && journal_fd < 0;
  ------------------
  |  Branch (1490:16): [True: 1.08k, False: 0]
  |  Branch (1490:33): [True: 1.08k, False: 0]
  |  Branch (1490:48): [True: 1.08k, False: 0]
  ------------------
 1491|  1.08k|}
log_setup:
 1714|  1.08k|void log_setup(void) {
 1715|  1.08k|        log_set_target(LOG_TARGET_AUTO);
 1716|  1.08k|        log_parse_environment();
 1717|  1.08k|        (void) log_open();
 1718|  1.08k|        if (log_on_console() && show_color < 0)
  ------------------
  |  Branch (1718:13): [True: 1.08k, False: 0]
  |  Branch (1718:33): [True: 1, False: 1.08k]
  ------------------
 1719|      1|                log_show_color(true);
 1720|  1.08k|}
log.c:log_close_journal:
  202|  1.08k|static void log_close_journal(void) {
  203|       |        /* If the journal FD is bad, safe_close will fail, and will try to log, which will fail, so we'll
  204|       |         * try to close the journal FD, which is bad, so safe_close will fail... Whether we can close it
  205|       |         * or not, invalidate it immediately so that we don't get in a recursive loop until we run out of
  206|       |         * stack. */
  207|  1.08k|        (void) safe_close(TAKE_FD(journal_fd));
  ------------------
  |  |   99|  1.08k|#define TAKE_FD(fd) TAKE_GENERIC(fd, int, -EBADF)
  |  |  ------------------
  |  |  |  |  380|  1.08k|        ({                                                       \
  |  |  |  |  381|  1.08k|                type *_pvar_ = &(var);                           \
  |  |  |  |  382|  1.08k|                type _var_ = *_pvar_;                            \
  |  |  |  |  383|  1.08k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  384|  1.08k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  385|  1.08k|                _var_;                                           \
  |  |  |  |  386|  1.08k|        })
  |  |  ------------------
  ------------------
  208|  1.08k|}
log.c:log_close_syslog:
  136|  1.08k|static void log_close_syslog(void) {
  137|       |        /* See comment in log_close_journal() */
  138|  1.08k|        (void) safe_close(TAKE_FD(syslog_fd));
  ------------------
  |  |   99|  1.08k|#define TAKE_FD(fd) TAKE_GENERIC(fd, int, -EBADF)
  |  |  ------------------
  |  |  |  |  380|  1.08k|        ({                                                       \
  |  |  |  |  381|  1.08k|                type *_pvar_ = &(var);                           \
  |  |  |  |  382|  1.08k|                type _var_ = *_pvar_;                            \
  |  |  |  |  383|  1.08k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  384|  1.08k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  385|  1.08k|                _var_;                                           \
  |  |  |  |  386|  1.08k|        })
  |  |  ------------------
  ------------------
  139|  1.08k|}
log.c:log_open_console:
   96|  1.08k|static int log_open_console(void) {
   97|       |
   98|  1.08k|        if (!always_reopen_console) {
  ------------------
  |  Branch (98:13): [True: 1.08k, False: 0]
  ------------------
   99|  1.08k|                console_fd = STDERR_FILENO;
  100|  1.08k|                console_fd_is_tty = -1;
  101|  1.08k|                return 0;
  102|  1.08k|        }
  103|       |
  104|      0|        if (console_fd < 3) {
  ------------------
  |  Branch (104:13): [True: 0, False: 0]
  ------------------
  105|      0|                int fd;
  106|       |
  107|      0|                fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC);
  108|      0|                if (fd < 0)
  ------------------
  |  Branch (108:21): [True: 0, False: 0]
  ------------------
  109|      0|                        return fd;
  110|       |
  111|      0|                console_fd = fd_move_above_stdio(fd);
  112|      0|                console_fd_is_tty = true;
  113|      0|        }
  114|       |
  115|      0|        return 0;
  116|      0|}
log.c:should_parse_proc_cmdline:
 1312|  1.08k|static bool should_parse_proc_cmdline(void) {
 1313|       |        /* PID1 always reads the kernel command line. */
 1314|  1.08k|        if (getpid_cached() == 1)
  ------------------
  |  Branch (1314:13): [True: 0, False: 1.08k]
  ------------------
 1315|      0|                return true;
 1316|       |
 1317|       |        /* Otherwise, parse the command line if invoked directly by systemd. */
 1318|  1.08k|        return invoked_by_systemd();
 1319|  1.08k|}

string-util.c:ALIGN_POWER2:
   59|     59|static inline unsigned long ALIGN_POWER2(unsigned long u) {
   60|       |
   61|       |        /* Avoid subtraction overflow */
   62|     59|        if (u == 0)
  ------------------
  |  Branch (62:13): [True: 0, False: 59]
  ------------------
   63|      0|                return 0;
   64|       |
   65|       |        /* clz(0) is undefined */
   66|     59|        if (u == 1)
  ------------------
  |  Branch (66:13): [True: 0, False: 59]
  ------------------
   67|      0|                return 1;
   68|       |
   69|       |        /* left-shift overflow is undefined */
   70|     59|        if (__builtin_clzl(u - 1UL) < 1)
  ------------------
  |  Branch (70:13): [True: 0, False: 59]
  ------------------
   71|      0|                return 0;
   72|       |
   73|     59|        return 1UL << (sizeof(u) * 8 - __builtin_clzl(u - 1UL));
   74|     59|}

alloc-util.c:memcpy_safe:
   18|  2.19k|static inline void* memcpy_safe(void *dst, const void *src, size_t n) {
   19|  2.19k|        if (n == 0)
  ------------------
  |  Branch (19:13): [True: 387, False: 1.81k]
  ------------------
   20|    387|                return dst;
   21|  1.81k|        assert(src);
  ------------------
  |  |   72|  1.81k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.81k|        do {                                                            \
  |  |  |  |   59|  1.81k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.81k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.81k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.81k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.81k|        } while (false)
  |  |  ------------------
  ------------------
   22|  1.81k|        return memcpy(dst, src, n);
   23|  2.19k|}

sd-event.c:origin_id_query:
   22|  2.16k|static uint64_t origin_id_query(void) {                               \
   23|  2.16k|        static pthread_once_t once = PTHREAD_ONCE_INIT;               \
   24|  2.16k|        assert_se(pthread_once(&once, origin_id_initialize) == 0);    \
  ------------------
  |  |   65|  2.16k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.16k|        do {                                                            \
  |  |  |  |   59|  2.16k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.16k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.16k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.16k|        } while (false)
  |  |  ------------------
  ------------------
   25|  2.16k|        return origin_id ^ getpid_cached();                           \
   26|  2.16k|}                                                                     \
sd-event.c:origin_id_initialize:
   18|      1|static void origin_id_initialize(void) {                              \
   19|      1|        origin_id = random_u64();                                     \
   20|      1|}                                                                     \
sd-event.c:event_origin_changed:
   28|  1.08k|scope bool name##_origin_changed(type *p) {                           \
   29|  1.08k|        assert(p);                                                    \
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
   30|  1.08k|        return p->origin_id != origin_id_query();                     \
   31|  1.08k|}

prioq_new:
   27|  1.08k|Prioq* prioq_new(compare_func_t compare_func) {
   28|  1.08k|        Prioq *q;
   29|       |
   30|  1.08k|        q = new(Prioq, 1);
  ------------------
  |  |   17|  1.08k|#define new(t, n) ((t*) malloc_multiply(n, sizeof(t)))
  ------------------
   31|  1.08k|        if (!q)
  ------------------
  |  Branch (31:13): [True: 0, False: 1.08k]
  ------------------
   32|      0|                return q;
   33|       |
   34|  1.08k|        *q = (Prioq) {
   35|  1.08k|                .compare_func = compare_func,
   36|  1.08k|        };
   37|       |
   38|  1.08k|        return q;
   39|  1.08k|}
prioq_free:
   41|  17.3k|Prioq* prioq_free(Prioq *q) {
   42|  17.3k|        if (!q)
  ------------------
  |  Branch (42:13): [True: 16.2k, False: 1.08k]
  ------------------
   43|  16.2k|                return NULL;
   44|       |
   45|       |        /* Invalidate the index fields of any remaining objects */
   46|  1.08k|        FOREACH_ARRAY(item, q->items, q->n_items)
  ------------------
  |  |  463|  1.08k|        _FOREACH_ARRAY(i, array, num, UNIQ_T(m, UNIQ), UNIQ_T(end, UNIQ))
  |  |  ------------------
  |  |  |  |  457|  1.08k|        for (typeof(array[0]) *i = (array), *end = ({                   \
  |  |  |  |  458|  1.08k|                                typeof(num) m = (num);                  \
  |  |  |  |  459|  1.08k|                                (i && m > 0) ? i + m : NULL;            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (459:34): [True: 0, False: 1.08k]
  |  |  |  |  |  Branch (459:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  460|  1.08k|                        }); end && i < end; i++)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (460:29): [True: 0, False: 1.08k]
  |  |  |  |  |  Branch (460:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|      0|                if (item->idx)
  ------------------
  |  Branch (47:21): [True: 0, False: 0]
  ------------------
   48|      0|                        *(item->idx) = PRIOQ_IDX_NULL;
  ------------------
  |  |    8|  1.08k|#define PRIOQ_IDX_NULL (UINT_MAX)
  ------------------
   49|       |
   50|  1.08k|        free(q->items);
   51|  1.08k|        return mfree(q);
  ------------------
  |  |  404|  1.08k|        ({                                      \
  |  |  405|  1.08k|                free(memory);                   \
  |  |  406|  1.08k|                (typeof(memory)) NULL;          \
  |  |  407|  1.08k|        })
  ------------------
   52|  17.3k|}
prioq_ensure_allocated:
   54|  1.08k|int prioq_ensure_allocated(Prioq **q, compare_func_t compare_func) {
   55|  1.08k|        assert(q);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
   56|       |
   57|  1.08k|        if (*q) {
  ------------------
  |  Branch (57:13): [True: 0, False: 1.08k]
  ------------------
   58|      0|                assert((*q)->compare_func == compare_func);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
   59|      0|                return 0;
   60|      0|        }
   61|       |
   62|  1.08k|        *q = prioq_new(compare_func);
   63|  1.08k|        if (!*q)
  ------------------
  |  Branch (63:13): [True: 0, False: 1.08k]
  ------------------
   64|      0|                return -ENOMEM;
   65|       |
   66|  1.08k|        return 0;
   67|  1.08k|}
prioq_peek_by_index:
  270|  2.16k|void* prioq_peek_by_index(Prioq *q, unsigned idx) {
  271|  2.16k|        if (!q)
  ------------------
  |  Branch (271:13): [True: 2.16k, False: 0]
  ------------------
  272|  2.16k|                return NULL;
  273|       |
  274|      0|        if (idx >= q->n_items)
  ------------------
  |  Branch (274:13): [True: 0, False: 0]
  ------------------
  275|      0|                return NULL;
  276|       |
  277|      0|        return q->items[idx].data;
  278|      0|}
prioq_size:
  294|  1.08k|unsigned prioq_size(Prioq *q) {
  295|       |
  296|  1.08k|        if (!q)
  ------------------
  |  Branch (296:13): [True: 1.08k, False: 0]
  ------------------
  297|  1.08k|                return 0;
  298|       |
  299|      0|        return q->n_items;
  300|  1.08k|}
prioq_isempty:
  302|  1.08k|bool prioq_isempty(Prioq *q) {
  303|       |
  304|  1.08k|        if (!q)
  ------------------
  |  Branch (304:13): [True: 1.08k, False: 0]
  ------------------
  305|  1.08k|                return true;
  306|       |
  307|      0|        return q->n_items <= 0;
  308|  1.08k|}

journald-manager.c:prioq_peek:
   27|  2.16k|static inline void *prioq_peek(Prioq *q) {
   28|  2.16k|        return prioq_peek_by_index(q, 0);
   29|  2.16k|}

getpid_cached:
 1387|  4.32k|pid_t getpid_cached(void) {
 1388|  4.32k|        static bool installed = false;
 1389|  4.32k|        pid_t current_value = CACHED_PID_UNSET;
  ------------------
  |  | 1377|  4.32k|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
 1390|       |
 1391|       |        /* getpid_cached() is much like getpid(), but caches the value in local memory, to avoid having to invoke a
 1392|       |         * system call each time. This restores glibc behaviour from before 2.24, when getpid() was unconditionally
 1393|       |         * cached. Starting with 2.24 getpid() started to become prohibitively expensive when used for detecting when
 1394|       |         * objects were used across fork()s. With this caching the old behaviour is somewhat restored.
 1395|       |         *
 1396|       |         * https://bugzilla.redhat.com/show_bug.cgi?id=1443976
 1397|       |         * https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c579f48edba88380635ab98cb612030e3ed8691e
 1398|       |         */
 1399|       |
 1400|  4.32k|        (void) __atomic_compare_exchange_n(
 1401|  4.32k|                        &cached_pid,
 1402|  4.32k|                        &current_value,
 1403|  4.32k|                        CACHED_PID_BUSY,
  ------------------
  |  | 1378|  4.32k|#define CACHED_PID_BUSY ((pid_t) -1)
  ------------------
 1404|  4.32k|                        false,
 1405|  4.32k|                        __ATOMIC_SEQ_CST,
 1406|  4.32k|                        __ATOMIC_SEQ_CST);
 1407|       |
 1408|  4.32k|        switch (current_value) {
 1409|       |
 1410|      1|        case CACHED_PID_UNSET: { /* Not initialized yet, then do so now */
  ------------------
  |  | 1377|      1|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
  |  Branch (1410:9): [True: 1, False: 4.32k]
  ------------------
 1411|      1|                pid_t new_pid;
 1412|       |
 1413|      1|                new_pid = getpid();
 1414|       |
 1415|      1|                if (!installed) {
  ------------------
  |  Branch (1415:21): [True: 1, False: 0]
  ------------------
 1416|       |                        /* __register_atfork() either returns 0 or -ENOMEM, in its glibc implementation. Since it's
 1417|       |                         * only half-documented (glibc doesn't document it but LSB does — though only superficially)
 1418|       |                         * we'll check for errors only in the most generic fashion possible. */
 1419|       |
 1420|      1|                        if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) {
  ------------------
  |  Branch (1420:29): [True: 0, False: 1]
  ------------------
 1421|       |                                /* OOM? Let's try again later */
 1422|      0|                                cached_pid = CACHED_PID_UNSET;
  ------------------
  |  | 1377|      0|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
 1423|      0|                                return new_pid;
 1424|      0|                        }
 1425|       |
 1426|      1|                        installed = true;
 1427|      1|                }
 1428|       |
 1429|      1|                cached_pid = new_pid;
 1430|      1|                return new_pid;
 1431|      1|        }
 1432|       |
 1433|      0|        case CACHED_PID_BUSY: /* Somebody else is currently initializing */
  ------------------
  |  | 1378|      0|#define CACHED_PID_BUSY ((pid_t) -1)
  ------------------
  |  Branch (1433:9): [True: 0, False: 4.32k]
  ------------------
 1434|      0|                return getpid();
 1435|       |
 1436|  4.32k|        default: /* Properly initialized */
  ------------------
  |  Branch (1436:9): [True: 4.32k, False: 1]
  ------------------
 1437|  4.32k|                return current_value;
 1438|  4.32k|        }
 1439|  4.32k|}

random_bytes:
   69|      1|void random_bytes(void *p, size_t n) {
   70|      1|        static bool have_grndinsecure = true;
   71|       |
   72|      1|        assert(p || n == 0);
  ------------------
  |  |   72|      1|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      1|        do {                                                            \
  |  |  |  |   59|      1|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      1|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1]
  |  |  |  |  |  |  |  Branch (95:44): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      1|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      1|        } while (false)
  |  |  ------------------
  ------------------
   73|       |
   74|      1|        if (n == 0)
  ------------------
  |  Branch (74:13): [True: 0, False: 1]
  ------------------
   75|      0|                return;
   76|       |
   77|      1|        for (;;) {
   78|      1|                ssize_t l;
   79|       |
   80|      1|                l = getrandom(p, n, have_grndinsecure ? GRND_INSECURE : GRND_NONBLOCK);
  ------------------
  |  Branch (80:37): [True: 1, False: 0]
  ------------------
   81|      1|                if (l < 0 && errno == EINVAL && have_grndinsecure) {
  ------------------
  |  Branch (81:21): [True: 0, False: 1]
  |  Branch (81:30): [True: 0, False: 0]
  |  Branch (81:49): [True: 0, False: 0]
  ------------------
   82|       |                        /* No GRND_INSECURE; fallback to GRND_NONBLOCK. */
   83|      0|                        have_grndinsecure = false;
   84|      0|                        continue;
   85|      0|                }
   86|      1|                if (l <= 0)
  ------------------
  |  Branch (86:21): [True: 0, False: 1]
  ------------------
   87|      0|                        break; /* Will block (with GRND_NONBLOCK), or unexpected error. Give up and fallback
   88|       |                                  to /dev/urandom. */
   89|       |
   90|      1|                if ((size_t) l == n)
  ------------------
  |  Branch (90:21): [True: 1, False: 0]
  ------------------
   91|      1|                        return; /* Done reading, success. */
   92|       |
   93|      0|                p = (uint8_t *) p + l;
   94|      0|                n -= l;
   95|       |                /* Interrupted by a signal; keep going. */
   96|      0|        }
   97|       |
   98|      0|        _cleanup_close_ int fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY);
  ------------------
  |  |   60|      0|#define _cleanup_close_ _cleanup_(closep)
  |  |  ------------------
  |  |  |  |   78|      0|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   99|      0|        if (fd >= 0 && loop_read_exact(fd, p, n, false) >= 0)
  ------------------
  |  Branch (99:13): [True: 0, False: 0]
  |  Branch (99:24): [True: 0, False: 0]
  ------------------
  100|      0|                return;
  101|       |
  102|       |        /* This is a terrible fallback. Oh well. */
  103|      0|        fallback_random_bytes(p, n);
  104|      0|}

sd-event.c:random_u64:
   10|      1|static inline uint64_t random_u64(void) {
   11|      1|        uint64_t u;
   12|      1|        random_bytes(&u, sizeof(u));
   13|      1|        return u;
   14|      1|}

journald-manager.c:set_free:
   12|  1.08k|static inline Set* set_free(Set *s) {
   13|  1.08k|        return (Set*) _hashmap_free(HASHMAP_BASE(s));
  ------------------
  |  |   46|  1.08k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  1.08k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  1.08k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  1.08k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  1.08k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  1.08k|                (HashmapBase*)(h), \
  |  |   48|  1.08k|                (void)0)
  ------------------
   14|  1.08k|}
sd-event.c:set_free:
   12|  1.08k|static inline Set* set_free(Set *s) {
   13|  1.08k|        return (Set*) _hashmap_free(HASHMAP_BASE(s));
  ------------------
  |  |   46|  1.08k|        __builtin_choose_expr(PTR_COMPATIBLE_WITH_HASHMAP_BASE(h), \
  |  |  ------------------
  |  |  |  |   36|  1.08k|        (__builtin_types_compatible_p(typeof(h), HashmapBase*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   37|  1.08k|         __builtin_types_compatible_p(typeof(h), Hashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (37:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   38|  1.08k|         __builtin_types_compatible_p(typeof(h), OrderedHashmap*) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   39|  1.08k|         __builtin_types_compatible_p(typeof(h), Set*))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|  1.08k|                (HashmapBase*)(h), \
  |  |   48|  1.08k|                (void)0)
  ------------------
   14|  1.08k|}

journald-native.c:le64toh:
   84|  1.19k|static inline uint64_t le64toh(le64_t value) { return bswap_64_on_be((uint64_t __sd_force)value); }
  ------------------
  |  |   64|  1.19k|#define bswap_64_on_be(x) (x)
  ------------------

strextend_with_separator_internal:
  796|     59|char* strextend_with_separator_internal(char **x, const char *separator, ...) {
  797|     59|        _cleanup_free_ char *buffer = NULL;
  ------------------
  |  |   82|     59|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|     59|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  798|     59|        size_t f, l, l_separator;
  799|     59|        bool need_separator;
  800|     59|        char *nr, *p;
  801|     59|        va_list ap;
  802|       |
  803|     59|        if (!x)
  ------------------
  |  Branch (803:13): [True: 59, False: 0]
  ------------------
  804|     59|                x = &buffer;
  805|       |
  806|     59|        l = f = strlen_ptr(*x);
  807|       |
  808|     59|        need_separator = !isempty(*x);
  809|     59|        l_separator = strlen_ptr(separator);
  810|       |
  811|     59|        va_start(ap, separator);
  812|    236|        for (const char *t;;) {
  813|    236|                size_t n;
  814|       |
  815|    236|                t = va_arg(ap, const char *);
  816|    236|                if (!t)
  ------------------
  |  Branch (816:21): [True: 59, False: 177]
  ------------------
  817|     59|                        break;
  818|    177|                if (t == POINTER_MAX)
  ------------------
  |  |  159|    177|#define POINTER_MAX ((void*) UINTPTR_MAX)
  ------------------
  |  Branch (818:21): [True: 0, False: 177]
  ------------------
  819|      0|                        continue;
  820|       |
  821|    177|                n = strlen(t);
  822|       |
  823|    177|                if (need_separator)
  ------------------
  |  Branch (823:21): [True: 118, False: 59]
  ------------------
  824|    118|                        n += l_separator;
  825|       |
  826|    177|                if (n >= SIZE_MAX - l) {
  ------------------
  |  Branch (826:21): [True: 0, False: 177]
  ------------------
  827|      0|                        va_end(ap);
  828|      0|                        return NULL;
  829|      0|                }
  830|       |
  831|    177|                l += n;
  832|    177|                need_separator = true;
  833|    177|        }
  834|     59|        va_end(ap);
  835|       |
  836|     59|        need_separator = !isempty(*x);
  837|       |
  838|     59|        nr = realloc(*x, GREEDY_ALLOC_ROUND_UP(l+1));
  839|     59|        if (!nr)
  ------------------
  |  Branch (839:13): [True: 0, False: 59]
  ------------------
  840|      0|                return NULL;
  841|       |
  842|     59|        *x = nr;
  843|     59|        p = nr + f;
  844|       |
  845|     59|        va_start(ap, separator);
  846|    236|        for (;;) {
  847|    236|                const char *t;
  848|       |
  849|    236|                t = va_arg(ap, const char *);
  850|    236|                if (!t)
  ------------------
  |  Branch (850:21): [True: 59, False: 177]
  ------------------
  851|     59|                        break;
  852|    177|                if (t == POINTER_MAX)
  ------------------
  |  |  159|    177|#define POINTER_MAX ((void*) UINTPTR_MAX)
  ------------------
  |  Branch (852:21): [True: 0, False: 177]
  ------------------
  853|      0|                        continue;
  854|       |
  855|    177|                if (need_separator && separator)
  ------------------
  |  Branch (855:21): [True: 118, False: 59]
  |  Branch (855:39): [True: 0, False: 118]
  ------------------
  856|      0|                        p = stpcpy(p, separator);
  857|       |
  858|    177|                p = stpcpy(p, t);
  859|       |
  860|    177|                need_separator = true;
  861|    177|        }
  862|     59|        va_end(ap);
  863|       |
  864|     59|        assert(p == nr + l);
  ------------------
  |  |   72|     59|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     59|        do {                                                            \
  |  |  |  |   59|     59|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     59|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     59|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     59|        } while (false)
  |  |  ------------------
  ------------------
  865|     59|        *p = 0;
  866|       |
  867|       |        /* If no buffer to extend was passed in return the start of the buffer */
  868|     59|        if (buffer)
  ------------------
  |  Branch (868:13): [True: 59, False: 0]
  ------------------
  869|     59|                return TAKE_PTR(buffer);
  ------------------
  |  |  388|     59|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|     59|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|     59|        ({                                                       \
  |  |  |  |  |  |  381|     59|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|     59|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|     59|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|     59|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|     59|                _var_;                                           \
  |  |  |  |  |  |  386|     59|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  870|       |
  871|       |        /* Otherwise we extended the buffer: return the end */
  872|      0|        return p;
  873|     59|}

log_level_is_valid:
  101|  1.08k|bool log_level_is_valid(int level) {
  102|  1.08k|        return level >= 0 && level <= LOG_DEBUG;
  ------------------
  |  Branch (102:16): [True: 1.08k, False: 0]
  |  Branch (102:30): [True: 1.08k, False: 0]
  ------------------
  103|  1.08k|}

getttyname_malloc:
 1455|     89|int getttyname_malloc(int fd, char **ret) {
 1456|     89|        char path[PATH_MAX]; /* PATH_MAX is counted *with* the trailing NUL byte */
 1457|     89|        int r;
 1458|       |
 1459|     89|        assert(fd >= 0);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
 1460|     89|        assert(ret);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
 1461|       |
 1462|     89|        r = ttyname_r(fd, path, sizeof path); /* positive error */
 1463|     89|        assert(r >= 0);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
 1464|     89|        if (r == ERANGE)
  ------------------
  |  Branch (1464:13): [True: 0, False: 89]
  ------------------
 1465|      0|                return -ENAMETOOLONG;
 1466|     89|        if (r > 0)
  ------------------
  |  Branch (1466:13): [True: 89, False: 0]
  ------------------
 1467|     89|                return -r;
 1468|       |
 1469|      0|        return strdup_to(ret, skip_dev_prefix(path));
 1470|     89|}
getttyname_harder:
 1472|     89|int getttyname_harder(int fd, char **ret) {
 1473|     89|        _cleanup_free_ char *s = NULL;
  ------------------
  |  |   82|     89|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|     89|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
 1474|     89|        int r;
 1475|       |
 1476|     89|        r = getttyname_malloc(fd, &s);
 1477|     89|        if (r < 0)
  ------------------
  |  Branch (1477:13): [True: 89, False: 0]
  ------------------
 1478|     89|                return r;
 1479|       |
 1480|      0|        if (streq(s, "tty"))
  ------------------
  |  |   46|      0|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1481|      0|                return get_ctty(0, NULL, ret);
 1482|       |
 1483|      0|        *ret = TAKE_PTR(s);
  ------------------
  |  |  388|      0|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|      0|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|      0|        ({                                                       \
  |  |  |  |  |  |  381|      0|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|      0|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|      0|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|      0|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|      0|                _var_;                                           \
  |  |  |  |  |  |  386|      0|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1484|      0|        return 0;
 1485|      0|}

now:
   47|  1.17k|usec_t now(clockid_t clock_id) {
   48|  1.17k|        struct timespec ts;
   49|       |
   50|  1.17k|        assert_se(clock_gettime(map_clock_id(clock_id), &ts) == 0);
  ------------------
  |  |   65|  1.17k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.17k|        do {                                                            \
  |  |  |  |   59|  1.17k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.17k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.17k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.17k|        } while (false)
  |  |  ------------------
  ------------------
   51|       |
   52|  1.17k|        return timespec_load(&ts);
   53|  1.17k|}
timespec_load:
  224|  1.17k|usec_t timespec_load(const struct timespec *ts) {
  225|  1.17k|        assert(ts);
  ------------------
  |  |   72|  1.17k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.17k|        do {                                                            \
  |  |  |  |   59|  1.17k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.17k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.17k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.17k|        } while (false)
  |  |  ------------------
  ------------------
  226|       |
  227|  1.17k|        if (ts->tv_sec < 0 || ts->tv_nsec < 0)
  ------------------
  |  Branch (227:13): [True: 0, False: 1.17k]
  |  Branch (227:31): [True: 0, False: 1.17k]
  ------------------
  228|      0|                return USEC_INFINITY;
  ------------------
  |  |   35|      0|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  229|       |
  230|  1.17k|        if ((usec_t) ts->tv_sec > (UINT64_MAX - (ts->tv_nsec / NSEC_PER_USEC)) / USEC_PER_SEC)
  ------------------
  |  |   43|  1.17k|#define NSEC_PER_USEC ((nsec_t) 1000ULL)
  ------------------
                      if ((usec_t) ts->tv_sec > (UINT64_MAX - (ts->tv_nsec / NSEC_PER_USEC)) / USEC_PER_SEC)
  ------------------
  |  |   39|  1.17k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  |  Branch (230:13): [True: 0, False: 1.17k]
  ------------------
  231|      0|                return USEC_INFINITY;
  ------------------
  |  |   35|      0|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  232|       |
  233|  1.17k|        return
  234|  1.17k|                (usec_t) ts->tv_sec * USEC_PER_SEC +
  ------------------
  |  |   39|  1.17k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  235|  1.17k|                (usec_t) ts->tv_nsec / NSEC_PER_USEC;
  ------------------
  |  |   43|  1.17k|#define NSEC_PER_USEC ((nsec_t) 1000ULL)
  ------------------
  236|  1.17k|}
format_timestamp_style:
  315|     89|                TimestampStyle style) {
  316|       |
  317|       |        /* The weekdays in non-localized (English) form. We use this instead of the localized form, so that
  318|       |         * our generated timestamps may be parsed with parse_timestamp(), and always read the same. */
  319|     89|        static const char * const weekdays[] = {
  320|     89|                [0] = "Sun",
  321|     89|                [1] = "Mon",
  322|     89|                [2] = "Tue",
  323|     89|                [3] = "Wed",
  324|     89|                [4] = "Thu",
  325|     89|                [5] = "Fri",
  326|     89|                [6] = "Sat",
  327|     89|        };
  328|       |
  329|     89|        struct tm tm;
  330|     89|        bool utc, us;
  331|     89|        size_t n;
  332|       |
  333|     89|        assert(buf);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
  334|     89|        assert(style >= 0);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
  335|     89|        assert(style < _TIMESTAMP_STYLE_MAX);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
  336|       |
  337|     89|        if (!timestamp_is_set(t))
  ------------------
  |  Branch (337:13): [True: 0, False: 89]
  ------------------
  338|      0|                return NULL; /* Timestamp is unset */
  339|       |
  340|     89|        if (style == TIMESTAMP_UNIX) {
  ------------------
  |  Branch (340:13): [True: 0, False: 89]
  ------------------
  341|      0|                if (l < (size_t) (1 + 1 + 1))
  ------------------
  |  Branch (341:21): [True: 0, False: 0]
  ------------------
  342|      0|                        return NULL; /* not enough space for even the shortest of forms */
  343|       |
  344|      0|                return snprintf_ok(buf, l, "@" USEC_FMT, t / USEC_PER_SEC);  /* round down μs → s */
  ------------------
  |  |   11|      0|#define USEC_FMT "%" PRI_USEC
  |  |  ------------------
  |  |  |  |    9|      0|#define PRI_USEC PRIu64
  |  |  ------------------
  ------------------
                              return snprintf_ok(buf, l, "@" USEC_FMT, t / USEC_PER_SEC);  /* round down μs → s */
  ------------------
  |  |   39|      0|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  345|      0|        }
  346|       |
  347|     89|        utc = IN_SET(style, TIMESTAMP_UTC, TIMESTAMP_US_UTC, TIMESTAMP_DATE);
  ------------------
  |  |  361|     89|        ({                                                              \
  |  |  362|     89|                bool _found = false;                                    \
  |  |  363|     89|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|     89|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|     89|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|     89|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|     89|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|     89|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 89]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 89]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 89]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|     89|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 89, False: 0]
  |  |  ------------------
  |  |  372|     89|                        ;                                               \
  |  |  373|     89|                }                                                       \
  |  |  374|     89|                _found;                                                 \
  |  |  375|     89|        })
  ------------------
  348|     89|        us = IN_SET(style, TIMESTAMP_US, TIMESTAMP_US_UTC);
  ------------------
  |  |  361|     89|        ({                                                              \
  |  |  362|     89|                bool _found = false;                                    \
  |  |  363|     89|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|     89|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|     89|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|     89|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|     89|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|     89|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 89]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 89]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|     89|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 89, False: 0]
  |  |  ------------------
  |  |  372|     89|                        ;                                               \
  |  |  373|     89|                }                                                       \
  |  |  374|     89|                _found;                                                 \
  |  |  375|     89|        })
  ------------------
  349|       |
  350|     89|        if (l < (size_t) (3 +                   /* week day */
  ------------------
  |  Branch (350:13): [True: 0, False: 89]
  |  Branch (350:27): [True: 0, False: 89]
  ------------------
  351|     89|                          1 + 10 +              /* space and date */
  352|     89|                          style == TIMESTAMP_DATE ? 0 :
  353|     89|                          (1 + 8 +              /* space and time */
  354|     89|                           (us ? 1 + 6 : 0) +   /* "." and microsecond part */
  ------------------
  |  Branch (354:29): [True: 0, False: 89]
  ------------------
  355|     89|                           1 + (utc ? 3 : 1)) + /* space and shortest possible zone */
  ------------------
  |  Branch (355:33): [True: 0, False: 89]
  ------------------
  356|     89|                          1))
  357|      0|                return NULL; /* Not enough space even for the shortest form. */
  358|       |
  359|       |        /* Let's not format times with years > 9999 */
  360|     89|        if (t > USEC_TIMESTAMP_FORMATTABLE_MAX) {
  ------------------
  |  |  229|     89|#  define USEC_TIMESTAMP_FORMATTABLE_MAX USEC_TIMESTAMP_FORMATTABLE_MAX_64BIT
  |  |  ------------------
  |  |  |  |  223|     89|#define USEC_TIMESTAMP_FORMATTABLE_MAX_64BIT ((usec_t) 253402214399000000) /* Thu 9999-12-30 23:59:59 UTC */
  |  |  ------------------
  ------------------
  |  Branch (360:13): [True: 0, False: 89]
  ------------------
  361|      0|                static const char* const xxx[_TIMESTAMP_STYLE_MAX] = {
  362|      0|                        [TIMESTAMP_PRETTY] = "--- XXXX-XX-XX XX:XX:XX",
  363|      0|                        [TIMESTAMP_US]     = "--- XXXX-XX-XX XX:XX:XX.XXXXXX",
  364|      0|                        [TIMESTAMP_UTC]    = "--- XXXX-XX-XX XX:XX:XX UTC",
  365|      0|                        [TIMESTAMP_US_UTC] = "--- XXXX-XX-XX XX:XX:XX.XXXXXX UTC",
  366|      0|                        [TIMESTAMP_DATE]   = "--- XXXX-XX-XX",
  367|      0|                };
  368|       |
  369|      0|                assert(l >= strlen(xxx[style]) + 1);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  370|      0|                return strcpy(buf, xxx[style]);
  371|      0|        }
  372|       |
  373|     89|        if (localtime_or_gmtime_usec(t, utc, &tm) < 0)
  ------------------
  |  Branch (373:13): [True: 0, False: 89]
  ------------------
  374|      0|                return NULL;
  375|       |
  376|       |        /* Start with the week day */
  377|     89|        assert((size_t) tm.tm_wday < ELEMENTSOF(weekdays));
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
  378|     89|        memcpy(buf, weekdays[tm.tm_wday], 4);
  379|       |
  380|     89|        if (style == TIMESTAMP_DATE) {
  ------------------
  |  Branch (380:13): [True: 0, False: 89]
  ------------------
  381|       |                /* Special format string if only date should be shown. */
  382|      0|                if (strftime(buf + 3, l - 3, " %Y-%m-%d", &tm) <= 0)
  ------------------
  |  Branch (382:21): [True: 0, False: 0]
  ------------------
  383|      0|                        return NULL; /* Doesn't fit */
  384|       |
  385|      0|                return buf;
  386|      0|        }
  387|       |
  388|       |        /* Add the main components */
  389|     89|        if (strftime(buf + 3, l - 3, " %Y-%m-%d %H:%M:%S", &tm) <= 0)
  ------------------
  |  Branch (389:13): [True: 0, False: 89]
  ------------------
  390|      0|                return NULL; /* Doesn't fit */
  391|       |
  392|       |        /* Append the microseconds part, if that's requested */
  393|     89|        if (us) {
  ------------------
  |  Branch (393:13): [True: 0, False: 89]
  ------------------
  394|      0|                n = strlen(buf);
  395|      0|                if (n + 8 > l)
  ------------------
  |  Branch (395:21): [True: 0, False: 0]
  ------------------
  396|      0|                        return NULL; /* Microseconds part doesn't fit. */
  397|       |
  398|      0|                sprintf(buf + n, ".%06"PRI_USEC, t % USEC_PER_SEC);
  ------------------
  |  |    9|      0|#define PRI_USEC PRIu64
  ------------------
                              sprintf(buf + n, ".%06"PRI_USEC, t % USEC_PER_SEC);
  ------------------
  |  |   39|      0|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  399|      0|        }
  400|       |
  401|       |        /* Append the timezone */
  402|     89|        n = strlen(buf);
  403|     89|        if (utc) {
  ------------------
  |  Branch (403:13): [True: 0, False: 89]
  ------------------
  404|       |                /* If this is UTC then let's explicitly use the "UTC" string here, because gmtime_r()
  405|       |                 * normally uses the obsolete "GMT" instead. */
  406|      0|                if (n + 5 > l)
  ------------------
  |  Branch (406:21): [True: 0, False: 0]
  ------------------
  407|      0|                        return NULL; /* "UTC" doesn't fit. */
  408|       |
  409|      0|                strcpy(buf + n, " UTC");
  410|       |
  411|     89|        } else if (!isempty(tm.tm_zone)) {
  ------------------
  |  Branch (411:20): [True: 89, False: 0]
  ------------------
  412|     89|                size_t tn;
  413|       |
  414|       |                /* An explicit timezone is specified, let's use it, if it fits */
  415|     89|                tn = strlen(tm.tm_zone);
  416|     89|                if (n + 1 + tn + 1 > l) {
  ------------------
  |  Branch (416:21): [True: 0, False: 89]
  ------------------
  417|       |                        /* The full time zone does not fit in. Yuck. */
  418|       |
  419|      0|                        if (n + 1 + _POSIX_TZNAME_MAX + 1 > l)
  ------------------
  |  Branch (419:29): [True: 0, False: 0]
  ------------------
  420|      0|                                return NULL; /* Not even enough space for the POSIX minimum (of 6)? In that
  421|       |                                              * case, complain that it doesn't fit. */
  422|       |
  423|       |                        /* So the time zone doesn't fit in fully, but the caller passed enough space for the
  424|       |                         * POSIX minimum time zone length. In this case suppress the timezone entirely, in
  425|       |                         * order not to dump an overly long, hard to read string on the user. This should be
  426|       |                         * safe, because the user will assume the local timezone anyway if none is shown. And
  427|       |                         * so does parse_timestamp(). */
  428|     89|                } else {
  429|     89|                        buf[n++] = ' ';
  430|     89|                        strcpy(buf + n, tm.tm_zone);
  431|     89|                }
  432|     89|        }
  433|       |
  434|     89|        return buf;
  435|     89|}
localtime_or_gmtime_usec:
 1659|     89|                struct tm *ret) {
 1660|       |
 1661|     89|        t /= USEC_PER_SEC; /* Round down */
  ------------------
  |  |   39|     89|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
 1662|     89|        if (t > (usec_t) TIME_T_MAX)
  ------------------
  |  |   64|     89|#define TIME_T_MAX (time_t)((UINTMAX_C(1) << ((sizeof(time_t) << 3) - 1)) - 1)
  ------------------
  |  Branch (1662:13): [True: 0, False: 89]
  ------------------
 1663|      0|                return -ERANGE;
 1664|     89|        time_t sec = (time_t) t;
 1665|       |
 1666|     89|        struct tm buf = {};
 1667|     89|        if (!(utc ? gmtime_r(&sec, &buf) : localtime_r(&sec, &buf)))
  ------------------
  |  Branch (1667:13): [True: 0, False: 89]
  |  Branch (1667:15): [True: 0, False: 89]
  ------------------
 1668|      0|                return -EINVAL;
 1669|       |
 1670|     89|        if (ret)
  ------------------
  |  Branch (1670:13): [True: 89, False: 0]
  ------------------
 1671|     89|                *ret = buf;
 1672|       |
 1673|     89|        return 0;
 1674|     89|}
time-util.c:map_clock_id:
   27|  1.17k|static clockid_t map_clock_id(clockid_t c) {
   28|       |
   29|       |        /* Some more exotic archs (s390, ppc, …) lack the "ALARM" flavour of the clocks. Thus,
   30|       |         * clock_gettime() will fail for them. Since they are essentially the same as their non-ALARM
   31|       |         * pendants (their only difference is when timers are set on them), let's just map them
   32|       |         * accordingly. This way, we can get the correct time even on those archs. */
   33|       |
   34|  1.17k|        switch (c) {
   35|       |
   36|      0|        case CLOCK_BOOTTIME_ALARM:
  ------------------
  |  Branch (36:9): [True: 0, False: 1.17k]
  ------------------
   37|      0|                return CLOCK_BOOTTIME;
   38|       |
   39|      0|        case CLOCK_REALTIME_ALARM:
  ------------------
  |  Branch (39:9): [True: 0, False: 1.17k]
  ------------------
   40|      0|                return CLOCK_REALTIME;
   41|       |
   42|  1.17k|        default:
  ------------------
  |  Branch (42:9): [True: 1.17k, False: 0]
  ------------------
   43|  1.17k|                return c;
   44|  1.17k|        }
   45|  1.17k|}

wall.c:format_timestamp:
  136|     89|static inline char* format_timestamp(char *buf, size_t l, usec_t t) {
  137|     89|        return format_timestamp_style(buf, l, t, TIMESTAMP_PRETTY);
  138|     89|}
time-util.c:timestamp_is_set:
   93|     89|static inline bool timestamp_is_set(usec_t timestamp) {
   94|     89|        return timestamp > 0 && timestamp != USEC_INFINITY;
  ------------------
  |  |   35|    178|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  |  Branch (94:16): [True: 89, False: 0]
  |  Branch (94:33): [True: 89, False: 0]
  ------------------
   95|     89|}

journald-native.c:unaligned_read_le64:
   61|  1.19k|static inline uint64_t unaligned_read_le64(const void *_u) {
   62|  1.19k|        const struct __attribute__((__packed__, __may_alias__)) { uint64_t x; } *u = _u;
   63|       |
   64|  1.19k|        return le64toh(u->x);
   65|  1.19k|}

journald-manager.c:manager_freep:
   15|  1.08k|        static inline void func##p(type *p) {           \
   16|  1.08k|                if (*p)                                 \
  ------------------
  |  Branch (16:21): [True: 0, False: 1.08k]
  ------------------
   17|  1.08k|                        *p = func(*p);                  \
   18|  1.08k|        }
fuzz-journald.c:manager_freep:
   15|  1.08k|        static inline void func##p(type *p) {           \
   16|  1.08k|                if (*p)                                 \
  ------------------
  |  Branch (16:21): [True: 1.08k, False: 0]
  ------------------
   17|  1.08k|                        *p = func(*p);                  \
   18|  1.08k|        }

startswith:
    6|  60.5k|sd_char *startswith(const sd_char *s, const sd_char *prefix) {
    7|  60.5k|        size_t l;
    8|       |
    9|  60.5k|        assert(s);
  ------------------
  |  |   72|  60.5k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  60.5k|        do {                                                            \
  |  |  |  |   59|  60.5k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  60.5k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 60.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  60.5k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  60.5k|        } while (false)
  |  |  ------------------
  ------------------
   10|  60.5k|        assert(prefix);
  ------------------
  |  |   72|  60.5k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  60.5k|        do {                                                            \
  |  |  |  |   59|  60.5k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  60.5k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 60.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  60.5k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  60.5k|        } while (false)
  |  |  ------------------
  ------------------
   11|       |
   12|  60.5k|        l = strlen(prefix);
   13|  60.5k|        if (!strneq(s, prefix, l))
  ------------------
  |  |   47|  60.5k|#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
  ------------------
  |  Branch (13:13): [True: 40.8k, False: 19.7k]
  ------------------
   14|  40.8k|                return NULL;
   15|       |
   16|  19.7k|        return (sd_char*) s + l;
   17|  60.5k|}

hostname-setup.c:isempty:
   85|     89|static inline bool isempty(const sd_char *a) {
   86|     89|        return !a || a[0] == '\0';
  ------------------
  |  Branch (86:16): [True: 0, False: 89]
  |  Branch (86:22): [True: 0, False: 89]
  ------------------
   87|     89|}
wall.c:strempty:
   89|     89|static inline const sd_char *strempty(const sd_char *s) {
   90|     89|        return s ?: STR_C("");
  ------------------
  |  |   42|     89|#  define STR_C(str)       (str)
  ------------------
  |  Branch (90:16): [True: 0, False: 89]
  ------------------
   91|     89|}
iovec-util.c:strlen_ptr:
   73|  3.61k|static inline size_t strlen_ptr(const sd_char *s) {
   74|  3.61k|        if (!s)
  ------------------
  |  Branch (74:13): [True: 0, False: 3.61k]
  ------------------
   75|      0|                return 0;
   76|       |
   77|  3.61k|        return strlen(s);
   78|  3.61k|}
string-util.c:isempty:
   85|    118|static inline bool isempty(const sd_char *a) {
   86|    118|        return !a || a[0] == '\0';
  ------------------
  |  Branch (86:16): [True: 118, False: 0]
  |  Branch (86:22): [True: 0, False: 0]
  ------------------
   87|    118|}
string-util.c:strlen_ptr:
   73|    118|static inline size_t strlen_ptr(const sd_char *s) {
   74|    118|        if (!s)
  ------------------
  |  Branch (74:13): [True: 118, False: 0]
  ------------------
   75|    118|                return 0;
   76|       |
   77|      0|        return strlen(s);
   78|    118|}
time-util.c:isempty:
   85|     89|static inline bool isempty(const sd_char *a) {
   86|     89|        return !a || a[0] == '\0';
  ------------------
  |  Branch (86:16): [True: 0, False: 89]
  |  Branch (86:22): [True: 0, False: 89]
  ------------------
   87|     89|}
journal-file.c:ascii_isdigit:
  123|   125k|static inline bool ascii_isdigit(sd_char a) {
  124|       |        /* A pure ASCII, locale independent version of isdigit() */
  125|   125k|        return a >= '0' && a <= '9';
  ------------------
  |  Branch (125:16): [True: 119k, False: 5.96k]
  |  Branch (125:28): [True: 7.54k, False: 112k]
  ------------------
  126|   125k|}

fuzz-journald-native.c:fuzz_setup_logging:
   32|  1.08k|static inline void fuzz_setup_logging(void) {
   33|       |        /* We don't want to fill the logs and slow down stuff when running
   34|       |         * in a fuzzing mode, so disable most of the logging. */
   35|  1.08k|        log_set_assert_return_is_critical(true);
   36|  1.08k|        log_set_max_level(LOG_CRIT);
   37|  1.08k|        log_setup();
   38|  1.08k|}

LLVMFuzzerTestOneInput:
    7|  1.08k|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
    8|  1.08k|        fuzz_setup_logging();
    9|       |
   10|  1.08k|        fuzz_journald_processing_function(data, size, manager_process_native_message);
   11|  1.08k|        return 0;
   12|  1.08k|}

dummy_manager_init:
    9|  1.08k|void dummy_manager_init(Manager *m, const uint8_t *buffer, size_t size) {
   10|  1.08k|        assert(m);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
   11|       |
   12|  1.08k|        m->storage = STORAGE_NONE;
   13|  1.08k|        assert_se(sd_event_default(&m->event) >= 0);
  ------------------
  |  |   65|  1.08k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
   14|       |
   15|  1.08k|        if (buffer) {
  ------------------
  |  Branch (15:13): [True: 1.08k, False: 0]
  ------------------
   16|  1.08k|                m->buffer = memdup_suffix0(buffer, size);
   17|  1.08k|                assert_se(m->buffer);
  ------------------
  |  |   65|  1.08k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
   18|  1.08k|        }
   19|  1.08k|}
fuzz_journald_processing_function:
   25|  1.08k|        ) {
   26|       |
   27|  1.08k|        _cleanup_(manager_freep) Manager *m = NULL;
  ------------------
  |  |   78|  1.08k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  ------------------
   28|  1.08k|        char *label = NULL;
   29|  1.08k|        size_t label_len = 0;
   30|  1.08k|        struct ucred *ucred = NULL;
   31|  1.08k|        struct timeval *tv = NULL;
   32|       |
   33|  1.08k|        if (size == 0)
  ------------------
  |  Branch (33:13): [True: 0, False: 1.08k]
  ------------------
   34|      0|                return;
   35|       |
   36|  1.08k|        assert_se(manager_new(&m) >= 0);
  ------------------
  |  |   65|  1.08k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
   37|  1.08k|        dummy_manager_init(m, data, size);
   38|  1.08k|        (*f)(m, m->buffer, size, ucred, tv, label, label_len);
   39|  1.08k|}

client_context_check_keep_log:
  106|    118|int client_context_check_keep_log(ClientContext *c, const char *message, size_t len) {
  107|    118|        pcre2_code *regex;
  108|       |
  109|    118|        if (!c || !message)
  ------------------
  |  Branch (109:13): [True: 118, False: 0]
  |  Branch (109:19): [True: 0, False: 0]
  ------------------
  110|    118|                return true;
  111|       |
  112|      0|        SET_FOREACH(regex, c->log_filter_denied_patterns)
  ------------------
  |  |  112|      0|        _SET_FOREACH(e, s, UNIQ_T(i, UNIQ))
  |  |  ------------------
  |  |  |  |  110|      0|        for (Iterator i = ITERATOR_FIRST; set_iterate((s), &i, (void**)&(e)); )
  |  |  |  |  ------------------
  |  |  |  |  |  |   20|      0|#define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL })
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   19|      0|#define _IDX_ITERATOR_FIRST (UINT_MAX - 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (110:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|      0|                if (pattern_matches_and_log(regex, message, len, NULL) > 0)
  ------------------
  |  Branch (113:21): [True: 0, False: 0]
  ------------------
  114|      0|                        return false;
  115|       |
  116|      0|        SET_FOREACH(regex, c->log_filter_allowed_patterns)
  ------------------
  |  |  112|      0|        _SET_FOREACH(e, s, UNIQ_T(i, UNIQ))
  |  |  ------------------
  |  |  |  |  110|      0|        for (Iterator i = ITERATOR_FIRST; set_iterate((s), &i, (void**)&(e)); )
  |  |  |  |  ------------------
  |  |  |  |  |  |   20|      0|#define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL })
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   19|      0|#define _IDX_ITERATOR_FIRST (UINT_MAX - 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (110:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  117|      0|                if (pattern_matches_and_log(regex, message, len, NULL) > 0)
  ------------------
  |  Branch (117:21): [True: 0, False: 0]
  ------------------
  118|      0|                        return true;
  119|       |
  120|      0|        return set_isempty(c->log_filter_allowed_patterns);
  121|      0|}

client_context_flush_regular:
  648|  1.08k|void client_context_flush_regular(Manager *m) {
  649|  1.08k|        client_context_try_shrink_to(m, 0);
  650|  1.08k|}
client_context_flush_all:
  652|  1.08k|void client_context_flush_all(Manager *m) {
  653|  1.08k|        assert(m);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  654|       |
  655|       |        /* Flush out all remaining entries. This assumes all references are already dropped. */
  656|       |
  657|  1.08k|        m->my_context = client_context_release(m, m->my_context);
  658|  1.08k|        m->pid1_context = client_context_release(m, m->pid1_context);
  659|       |
  660|  1.08k|        client_context_flush_regular(m);
  661|       |
  662|  1.08k|        assert(prioq_isempty(m->client_contexts_lru));
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  663|  1.08k|        assert(hashmap_isempty(m->client_contexts));
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  664|       |
  665|  1.08k|        m->client_contexts_lru = prioq_free(m->client_contexts_lru);
  666|  1.08k|        m->client_contexts = hashmap_free(m->client_contexts);
  667|  1.08k|}
client_context_release:
  753|  2.16k|ClientContext *client_context_release(Manager *m, ClientContext *c) {
  754|  2.16k|        assert(m);
  ------------------
  |  |   72|  2.16k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.16k|        do {                                                            \
  |  |  |  |   59|  2.16k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.16k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.16k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.16k|        } while (false)
  |  |  ------------------
  ------------------
  755|       |
  756|  2.16k|        if (!c)
  ------------------
  |  Branch (756:13): [True: 2.16k, False: 0]
  ------------------
  757|  2.16k|                return NULL;
  758|       |
  759|      0|        assert(c->n_ref > 0);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  760|      0|        assert(!c->in_lru);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  761|       |
  762|      0|        c->n_ref--;
  763|      0|        if (c->n_ref > 0)
  ------------------
  |  Branch (763:13): [True: 0, False: 0]
  ------------------
  764|      0|                return NULL;
  765|       |
  766|       |        /* The entry is not pinned anymore, let's add it to the LRU prioq if we can. If we can't we'll drop it
  767|       |         * right-away */
  768|       |
  769|      0|        if (prioq_put(m->client_contexts_lru, c, &c->lru_index) < 0)
  ------------------
  |  Branch (769:13): [True: 0, False: 0]
  ------------------
  770|      0|                client_context_free(m, c);
  771|      0|        else
  772|      0|                c->in_lru = true;
  773|       |
  774|      0|        return NULL;
  775|      0|}
journald-context.c:client_context_try_shrink_to:
  601|  1.08k|static void client_context_try_shrink_to(Manager *m, size_t limit) {
  602|  1.08k|        ClientContext *c;
  603|  1.08k|        usec_t t;
  604|       |
  605|  1.08k|        assert(m);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  606|       |
  607|       |        /* Flush any cache entries for PIDs that have already moved on. Don't do this
  608|       |         * too often, since it's a slow process. */
  609|  1.08k|        t = now(CLOCK_MONOTONIC);
  610|  1.08k|        if (m->last_cache_pid_flush + MAX_USEC < t) {
  ------------------
  |  |   70|  1.08k|#define MAX_USEC (5*USEC_PER_SEC)
  |  |  ------------------
  |  |  |  |   39|  1.08k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
  |  Branch (610:13): [True: 1.08k, False: 0]
  ------------------
  611|  1.08k|                unsigned n = prioq_size(m->client_contexts_lru), idx = 0;
  612|       |
  613|       |                /* We do a number of iterations based on the initial size of the prioq.  When we remove an
  614|       |                 * item, a new item is moved into its places, and items to the right might be reshuffled.
  615|       |                 */
  616|  1.08k|                for (unsigned i = 0; i < n; i++) {
  ------------------
  |  Branch (616:38): [True: 0, False: 1.08k]
  ------------------
  617|      0|                        c = prioq_peek_by_index(m->client_contexts_lru, idx);
  618|       |
  619|      0|                        assert(c->n_ref == 0);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  620|       |
  621|      0|                        if (pid_is_unwaited(c->pid) == 0)
  ------------------
  |  Branch (621:29): [True: 0, False: 0]
  ------------------
  622|      0|                                client_context_free(m, c);
  623|      0|                        else
  624|      0|                                idx++;
  625|      0|                }
  626|       |
  627|  1.08k|                m->last_cache_pid_flush = t;
  628|  1.08k|        }
  629|       |
  630|       |        /* Bring the number of cache entries below the indicated limit, so that we can create a new entry without
  631|       |         * breaching the limit. Note that we only flush out entries that aren't pinned here. This means the number of
  632|       |         * cache entries may very well grow beyond the limit, if all entries stored remain pinned. */
  633|       |
  634|  1.08k|        while (hashmap_size(m->client_contexts) > limit) {
  ------------------
  |  Branch (634:16): [True: 0, False: 1.08k]
  ------------------
  635|      0|                c = prioq_pop(m->client_contexts_lru);
  636|      0|                if (!c)
  ------------------
  |  Branch (636:21): [True: 0, False: 0]
  ------------------
  637|      0|                        break; /* All remaining entries are pinned, give up */
  638|       |
  639|      0|                assert(c->in_lru);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  640|      0|                assert(c->n_ref == 0);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  641|       |
  642|      0|                c->in_lru = false;
  643|       |
  644|      0|                client_context_free(m, c);
  645|      0|        }
  646|  1.08k|}

journald-native.c:client_context_extra_fields_n_iovec:
   88|  79.9k|static inline size_t client_context_extra_fields_n_iovec(const ClientContext *c) {
   89|  79.9k|        return c ? c->extra_fields_n_iovec : 0;
  ------------------
  |  Branch (89:16): [True: 0, False: 79.9k]
  ------------------
   90|  79.9k|}
journald-native.c:client_context_test_priority:
   92|  3.61k|static inline bool client_context_test_priority(const ClientContext *c, int priority) {
   93|  3.61k|        if (!c)
  ------------------
  |  Branch (93:13): [True: 3.61k, False: 0]
  ------------------
   94|  3.61k|                return true;
   95|       |
   96|      0|        if (c->log_level_max < 0)
  ------------------
  |  Branch (96:13): [True: 0, False: 0]
  ------------------
   97|      0|                return true;
   98|       |
   99|      0|        return LOG_PRI(priority) <= c->log_level_max;
  100|      0|}

manager_dispatch_message:
 1270|  3.61k|                pid_t object_pid) {
 1271|       |
 1272|  3.61k|        uint64_t available = 0;
 1273|  3.61k|        int rl;
 1274|       |
 1275|  3.61k|        assert(m);
  ------------------
  |  |   72|  3.61k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.61k|        do {                                                            \
  |  |  |  |   59|  3.61k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.61k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.61k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.61k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  3.61k|        } while (false)
  |  |  ------------------
  ------------------
 1276|  3.61k|        assert(iovec || n == 0);
  ------------------
  |  |   72|  3.61k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.61k|        do {                                                            \
  |  |  |  |   59|  3.61k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.61k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.61k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 3.61k, False: 0]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.61k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  3.61k|        } while (false)
  |  |  ------------------
  ------------------
 1277|       |
 1278|  3.61k|        if (n == 0)
  ------------------
  |  Branch (1278:13): [True: 0, False: 3.61k]
  ------------------
 1279|      0|                return;
 1280|       |
 1281|  3.61k|        if (LOG_PRI(priority) > m->max_level_store)
  ------------------
  |  Branch (1281:13): [True: 0, False: 3.61k]
  ------------------
 1282|      0|                return;
 1283|       |
 1284|       |        /* Stop early in case the information will not be stored
 1285|       |         * in a journal. */
 1286|  3.61k|        if (m->storage == STORAGE_NONE)
  ------------------
  |  Branch (1286:13): [True: 3.61k, False: 0]
  ------------------
 1287|  3.61k|                return;
 1288|       |
 1289|      0|        if (c && c->unit) {
  ------------------
  |  Branch (1289:13): [True: 0, False: 0]
  |  Branch (1289:18): [True: 0, False: 0]
  ------------------
 1290|      0|                (void) manager_determine_space(m, &available, /* limit= */ NULL);
 1291|       |
 1292|      0|                rl = journal_ratelimit_test(
 1293|      0|                                &m->ratelimit_groups_by_id,
 1294|      0|                                c->unit,
 1295|      0|                                c->log_ratelimit_interval,
 1296|      0|                                c->log_ratelimit_burst,
 1297|      0|                                LOG_PRI(priority),
 1298|      0|                                available);
 1299|      0|                if (rl == 0)
  ------------------
  |  Branch (1299:21): [True: 0, False: 0]
  ------------------
 1300|      0|                        return;
 1301|       |
 1302|       |                /* Write a suppression message if we suppressed something */
 1303|      0|                if (rl > 1)
  ------------------
  |  Branch (1303:21): [True: 0, False: 0]
  ------------------
 1304|      0|                        manager_driver_message(m, c->pid,
  ------------------
  |  |  210|      0|#define manager_driver_message(...) manager_driver_message_internal(__VA_ARGS__, NULL)
  ------------------
 1305|      0|                                              LOG_MESSAGE_ID(SD_MESSAGE_JOURNAL_DROPPED_STR),
 1306|      0|                                              LOG_MESSAGE("Suppressed %i messages from %s", rl - 1, c->unit),
 1307|      0|                                              LOG_ITEM("N_DROPPED=%i", rl - 1));
 1308|      0|        }
 1309|       |
 1310|      0|        manager_dispatch_message_real(m, iovec, n, mm, c, tv, priority, object_pid);
 1311|      0|}
manager_new:
 2415|  1.08k|int manager_new(Manager **ret) {
 2416|  1.08k|        _cleanup_(manager_freep) Manager *m = NULL;
  ------------------
  |  |   78|  1.08k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  ------------------
 2417|       |
 2418|  1.08k|        assert(ret);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
 2419|       |
 2420|  1.08k|        m = new(Manager, 1);
  ------------------
  |  |   17|  1.08k|#define new(t, n) ((t*) malloc_multiply(n, sizeof(t)))
  ------------------
 2421|  1.08k|        if (!m)
  ------------------
  |  Branch (2421:13): [True: 0, False: 1.08k]
  ------------------
 2422|      0|                return -ENOMEM;
 2423|       |
 2424|  1.08k|        *m = (Manager) {
 2425|  1.08k|                .syslog_fd = -EBADF,
 2426|  1.08k|                .native_fd = -EBADF,
 2427|  1.08k|                .stdout_fd = -EBADF,
 2428|  1.08k|                .dev_kmsg_fd = -EBADF,
 2429|  1.08k|                .audit_fd = -EBADF,
 2430|  1.08k|                .hostname_fd = -EBADF,
 2431|  1.08k|                .notify_fd = -EBADF,
 2432|  1.08k|                .forward_socket_fd = -EBADF,
 2433|       |
 2434|  1.08k|                .compress.enabled = true,
 2435|  1.08k|                .compress.threshold_bytes = UINT64_MAX,
 2436|  1.08k|                .seal = true,
 2437|       |
 2438|  1.08k|                .set_audit = true,
 2439|       |
 2440|  1.08k|                .watchdog_usec = USEC_INFINITY,
  ------------------
  |  |   35|  1.08k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
 2441|       |
 2442|  1.08k|                .sync_interval_usec = DEFAULT_SYNC_INTERVAL_USEC,
  ------------------
  |  |   75|  1.08k|#define DEFAULT_SYNC_INTERVAL_USEC (5*USEC_PER_MINUTE)
  |  |  ------------------
  |  |  |  |   45|  1.08k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.08k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2443|  1.08k|                .sync_scheduled = false,
 2444|       |
 2445|  1.08k|                .ratelimit_interval = DEFAULT_RATE_LIMIT_INTERVAL,
  ------------------
  |  |   76|  1.08k|#define DEFAULT_RATE_LIMIT_INTERVAL (30*USEC_PER_SEC)
  |  |  ------------------
  |  |  |  |   39|  1.08k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 2446|  1.08k|                .ratelimit_burst = DEFAULT_RATE_LIMIT_BURST,
  ------------------
  |  |   77|  1.08k|#define DEFAULT_RATE_LIMIT_BURST 10000
  ------------------
 2447|       |
 2448|  1.08k|                .forward_to_wall = true,
 2449|  1.08k|                .forward_to_socket = { .sockaddr.sa.sa_family = AF_UNSPEC },
 2450|       |
 2451|  1.08k|                .max_file_usec = DEFAULT_MAX_FILE_USEC,
  ------------------
  |  |   78|  1.08k|#define DEFAULT_MAX_FILE_USEC USEC_PER_MONTH
  |  |  ------------------
  |  |  |  |   53|  1.08k|#define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.08k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2452|       |
 2453|  1.08k|                .max_level_store = LOG_DEBUG,
 2454|  1.08k|                .max_level_syslog = LOG_DEBUG,
 2455|  1.08k|                .max_level_kmsg = LOG_NOTICE,
 2456|  1.08k|                .max_level_console = LOG_INFO,
 2457|  1.08k|                .max_level_wall = LOG_EMERG,
 2458|  1.08k|                .max_level_socket = LOG_DEBUG,
 2459|       |
 2460|  1.08k|                .line_max = DEFAULT_LINE_MAX,
  ------------------
  |  |   92|  1.08k|#define DEFAULT_LINE_MAX (48*1024)
  ------------------
 2461|       |
 2462|  1.08k|                .runtime_storage.name = "Runtime Journal",
 2463|  1.08k|                .system_storage.name = "System Journal",
 2464|       |
 2465|  1.08k|                .kmsg_own_ratelimit = {
 2466|  1.08k|                        .interval = DEFAULT_KMSG_OWN_INTERVAL,
  ------------------
  |  |   80|  1.08k|#define DEFAULT_KMSG_OWN_INTERVAL (5 * USEC_PER_SEC)
  |  |  ------------------
  |  |  |  |   39|  1.08k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 2467|  1.08k|                        .burst = DEFAULT_KMSG_OWN_BURST,
  ------------------
  |  |   81|  1.08k|#define DEFAULT_KMSG_OWN_BURST 50
  ------------------
 2468|  1.08k|                },
 2469|       |
 2470|  1.08k|                .sigrtmin18_info.memory_pressure_handler = manager_memory_pressure,
 2471|  1.08k|                .sigrtmin18_info.memory_pressure_userdata = m,
 2472|  1.08k|        };
 2473|       |
 2474|  1.08k|        *ret = TAKE_PTR(m);
  ------------------
  |  |  388|  1.08k|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|  1.08k|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|  1.08k|        ({                                                       \
  |  |  |  |  |  |  381|  1.08k|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|  1.08k|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|  1.08k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|  1.08k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|  1.08k|                _var_;                                           \
  |  |  |  |  |  |  386|  1.08k|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2475|  1.08k|        return 0;
 2476|  1.08k|}
manager_free:
 2723|  1.08k|Manager* manager_free(Manager *m) {
 2724|  1.08k|        if (!m)
  ------------------
  |  Branch (2724:13): [True: 0, False: 1.08k]
  ------------------
 2725|      0|                return NULL;
 2726|       |
 2727|  1.08k|        free(m->namespace);
 2728|  1.08k|        free(m->namespace_field);
 2729|       |
 2730|  1.08k|        set_free(m->deferred_closes);
 2731|       |
 2732|  1.08k|        while (m->stdout_streams)
  ------------------
  |  Branch (2732:16): [True: 0, False: 1.08k]
  ------------------
 2733|      0|                stdout_stream_free(m->stdout_streams);
 2734|       |
 2735|  1.08k|        client_context_flush_all(m);
 2736|       |
 2737|  1.08k|        (void) journal_file_offline_close(m->system_journal);
 2738|  1.08k|        (void) journal_file_offline_close(m->runtime_journal);
 2739|       |
 2740|  1.08k|        ordered_hashmap_free(m->user_journals);
 2741|       |
 2742|  1.08k|        sd_varlink_server_unref(m->varlink_server);
 2743|       |
 2744|  1.08k|        sd_event_source_unref(m->syslog_event_source);
 2745|  1.08k|        sd_event_source_unref(m->native_event_source);
 2746|  1.08k|        sd_event_source_unref(m->stdout_event_source);
 2747|  1.08k|        sd_event_source_unref(m->dev_kmsg_event_source);
 2748|  1.08k|        sd_event_source_unref(m->audit_event_source);
 2749|  1.08k|        sd_event_source_unref(m->sync_event_source);
 2750|  1.08k|        sd_event_source_unref(m->sigusr1_event_source);
 2751|  1.08k|        sd_event_source_unref(m->sigusr2_event_source);
 2752|  1.08k|        sd_event_source_unref(m->sigterm_event_source);
 2753|  1.08k|        sd_event_source_unref(m->sigint_event_source);
 2754|  1.08k|        sd_event_source_unref(m->sigrtmin1_event_source);
 2755|  1.08k|        sd_event_source_unref(m->hostname_event_source);
 2756|  1.08k|        sd_event_source_unref(m->notify_event_source);
 2757|  1.08k|        sd_event_source_unref(m->watchdog_event_source);
 2758|  1.08k|        sd_event_source_unref(m->idle_event_source);
 2759|  1.08k|        sd_event_unref(m->event);
 2760|       |
 2761|  1.08k|        safe_close(m->syslog_fd);
 2762|  1.08k|        safe_close(m->native_fd);
 2763|  1.08k|        safe_close(m->stdout_fd);
 2764|  1.08k|        safe_close(m->dev_kmsg_fd);
 2765|  1.08k|        safe_close(m->audit_fd);
 2766|  1.08k|        safe_close(m->hostname_fd);
 2767|  1.08k|        safe_close(m->notify_fd);
 2768|  1.08k|        safe_close(m->forward_socket_fd);
 2769|       |
 2770|  1.08k|        ordered_hashmap_free(m->ratelimit_groups_by_id);
 2771|       |
 2772|  1.08k|        manager_unmap_seqnum_file(m->seqnum, sizeof(*m->seqnum));
 2773|  1.08k|        manager_unmap_seqnum_file(m->kernel_seqnum, sizeof(*m->kernel_seqnum));
 2774|       |
 2775|  1.08k|        free(m->buffer);
 2776|  1.08k|        free(m->tty_path);
 2777|  1.08k|        free(m->cgroup_root);
 2778|  1.08k|        free(m->hostname_field);
 2779|  1.08k|        free(m->runtime_storage.path);
 2780|  1.08k|        free(m->system_storage.path);
 2781|  1.08k|        free(m->runtime_directory);
 2782|       |
 2783|  1.08k|        mmap_cache_unref(m->mmap);
 2784|       |
 2785|  1.08k|        SyncReq *req;
 2786|  1.08k|        while ((req = prioq_peek(m->sync_req_realtime_prioq)))
  ------------------
  |  Branch (2786:16): [True: 0, False: 1.08k]
  ------------------
 2787|      0|                sync_req_free(req);
 2788|  1.08k|        prioq_free(m->sync_req_realtime_prioq);
 2789|       |
 2790|  1.08k|        while ((req = prioq_peek(m->sync_req_boottime_prioq)))
  ------------------
  |  Branch (2790:16): [True: 0, False: 1.08k]
  ------------------
 2791|      0|                sync_req_free(req);
 2792|  1.08k|        prioq_free(m->sync_req_boottime_prioq);
 2793|       |
 2794|  1.08k|        return mfree(m);
  ------------------
  |  |  404|  1.08k|        ({                                      \
  |  |  405|  1.08k|                free(memory);                   \
  |  |  406|  1.08k|                (typeof(memory)) NULL;          \
  |  |  407|  1.08k|        })
  ------------------
 2795|  1.08k|}
journald-manager.c:manager_unmap_seqnum_file:
 2244|  2.16k|static void manager_unmap_seqnum_file(void *p, size_t size) {
 2245|  2.16k|        assert(size > 0);
  ------------------
  |  |   72|  2.16k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  2.16k|        do {                                                            \
  |  |  |  |   59|  2.16k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  2.16k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  2.16k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  2.16k|        } while (false)
  |  |  ------------------
  ------------------
 2246|       |
 2247|  2.16k|        if (!p)
  ------------------
  |  Branch (2247:13): [True: 2.16k, False: 0]
  ------------------
 2248|  2.16k|                return;
 2249|       |
 2250|      0|        assert_se(munmap(p, size) >= 0);
  ------------------
  |  |   65|      0|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
 2251|      0|}

manager_process_native_message:
  308|  1.08k|                const char *label, size_t label_len) {
  309|       |
  310|  1.08k|        size_t remaining = buffer_size;
  311|  1.08k|        ClientContext *context = NULL;
  312|  1.08k|        int r;
  313|       |
  314|  1.08k|        assert(m);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  315|  1.08k|        assert(buffer || buffer_size == 0);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 1.08k, False: 0]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  316|       |
  317|  1.08k|        if (ucred && pid_is_valid(ucred->pid)) {
  ------------------
  |  Branch (317:13): [True: 0, False: 1.08k]
  |  Branch (317:22): [True: 0, False: 0]
  ------------------
  318|      0|                r = client_context_get(m, ucred->pid, ucred, label, label_len, NULL, &context);
  319|      0|                if (r < 0)
  ------------------
  |  Branch (319:21): [True: 0, False: 0]
  ------------------
  320|      0|                        log_ratelimit_warning_errno(r, JOURNAL_LOG_RATELIMIT,
  ------------------
  |  |   55|      0|#define log_ratelimit_warning_errno(error, ...)   log_ratelimit_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   34|      0|        ({                                                              \
  |  |  |  |   35|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |   36|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:22): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   37|      0|                        ? log_ratelimit_internal(_level, _e, _ratelimit, PROJECT_FILE, __LINE__, __func__, format, ##__VA_ARGS__) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   13|      0|#define log_ratelimit_internal(_level, _error, _ratelimit, _file, _line, _func, _format, ...)        \
  |  |  |  |  |  |   14|      0|({                                                                              \
  |  |  |  |  |  |   15|      0|        int _log_ratelimit_error = (_error);                                    \
  |  |  |  |  |  |   16|      0|        int _log_ratelimit_level = (_level);                                    \
  |  |  |  |  |  |   17|      0|        static LogRateLimit _log_ratelimit = {                                  \
  |  |  |  |  |  |   18|      0|                .ratelimit = (_ratelimit),                                      \
  |  |  |  |  |  |   19|      0|        };                                                                      \
  |  |  |  |  |  |   20|      0|        unsigned _num_dropped_errors = ratelimit_num_dropped(&_log_ratelimit.ratelimit); \
  |  |  |  |  |  |   21|      0|        if (_log_ratelimit_error != _log_ratelimit.error || _log_ratelimit_level != _log_ratelimit.level) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (21:13): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (21:61): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   22|      0|                ratelimit_reset(&_log_ratelimit.ratelimit);                     \
  |  |  |  |  |  |   23|      0|                _log_ratelimit.error = _log_ratelimit_error;                    \
  |  |  |  |  |  |   24|      0|                _log_ratelimit.level = _log_ratelimit_level;                    \
  |  |  |  |  |  |   25|      0|        }                                                                       \
  |  |  |  |  |  |   26|      0|        if (log_get_max_level() == LOG_DEBUG || ratelimit_below(&_log_ratelimit.ratelimit)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (26:13): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (26:49): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                _log_ratelimit_error = _num_dropped_errors > 0                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (27:40): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                ? log_internal(_log_ratelimit_level, _log_ratelimit_error, _file, _line, _func, _format " (Dropped %u similar message(s))", ##__VA_ARGS__, _num_dropped_errors) \
  |  |  |  |  |  |   29|      0|                : log_internal(_log_ratelimit_level, _log_ratelimit_error, _file, _line, _func, _format, ##__VA_ARGS__); \
  |  |  |  |  |  |   30|      0|        _log_ratelimit_error;                                                   \
  |  |  |  |  |  |   31|      0|})
  |  |  |  |  ------------------
  |  |  |  |   38|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   39|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (39:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   40|      0|        })
  |  |  ------------------
  ------------------
  321|      0|                                                    "Failed to retrieve credentials for PID " PID_FMT ", ignoring: %m",
  322|      0|                                                    ucred->pid);
  323|      0|        }
  324|       |
  325|  4.58k|        do {
  326|  4.58k|                r = manager_process_entry(m,
  327|  4.58k|                                         (const uint8_t*) buffer + (buffer_size - remaining), &remaining,
  328|  4.58k|                                         context, ucred, tv, label, label_len);
  329|  4.58k|        } while (r == 0);
  ------------------
  |  Branch (329:18): [True: 3.50k, False: 1.08k]
  ------------------
  330|  1.08k|}
journald-native.c:manager_process_entry:
  102|  4.58k|                const char *label, size_t label_len) {
  103|       |
  104|       |        /* Process a single entry from a native message. Returns 0 if nothing special happened and the message
  105|       |         * processing should continue, and a negative or positive value otherwise.
  106|       |         *
  107|       |         * Note that *remaining is altered on both success and failure. */
  108|       |
  109|  4.58k|        size_t n = 0, j, tn = SIZE_MAX, entry_size = 0;
  110|  4.58k|        char *identifier = NULL, *message = NULL;
  111|  4.58k|        struct iovec *iovec = NULL;
  112|  4.58k|        int priority = LOG_INFO;
  113|  4.58k|        pid_t object_pid = 0;
  114|  4.58k|        const char *p;
  115|  4.58k|        int r = 1;
  116|       |
  117|  4.58k|        p = buffer;
  118|       |
  119|  84.5k|        while (*remaining > 0) {
  ------------------
  |  Branch (119:16): [True: 83.2k, False: 1.36k]
  ------------------
  120|  83.2k|                const char *e, *q;
  121|       |
  122|  83.2k|                e = memchr(p, '\n', *remaining);
  123|       |
  124|  83.2k|                if (!e) {
  ------------------
  |  Branch (124:21): [True: 69, False: 83.1k]
  ------------------
  125|       |                        /* Trailing noise, let's ignore it, and flush what we collected */
  126|     69|                        log_debug("Received message with trailing noise, ignoring.");
  ------------------
  |  |  220|     69|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|     69|        ({                                                             \
  |  |  |  |  212|     69|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|     69|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|     69|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|     69|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|     69|        do {                                                            \
  |  |  |  |  |  |  |  |   59|     69|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|     69|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 69]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     69|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     69|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|     69|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|     69|        ({                                                              \
  |  |  |  |  |  |  190|     69|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|     69|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 69]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|     69|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|     69|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|    138|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|     69|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|     69|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 69]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|     69|        })
  |  |  |  |  ------------------
  |  |  |  |  215|     69|        })
  |  |  ------------------
  ------------------
  127|     69|                        break; /* finish processing of the message */
  128|     69|                }
  129|       |
  130|  83.1k|                if (e == p) {
  ------------------
  |  Branch (130:21): [True: 2.89k, False: 80.2k]
  ------------------
  131|       |                        /* Entry separator */
  132|  2.89k|                        *remaining -= 1;
  133|  2.89k|                        break;
  134|  2.89k|                }
  135|       |
  136|  80.2k|                if (IN_SET(*p, '.', '#')) {
  ------------------
  |  |  361|  80.2k|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 264, False: 79.9k]
  |  |  ------------------
  |  |  362|  80.2k|                bool _found = false;                                    \
  |  |  363|  80.2k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  80.2k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  80.2k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  80.2k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  80.2k|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  80.2k|                switch (x) {                                            \
  |  |  368|    264|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|     55|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|     55|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|     55|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|    264|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|    264|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 209, False: 80.0k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 55, False: 80.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|    264|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|    264|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|    264|                        _found = true;                                  \
  |  |  370|    264|                        break;                                          \
  |  |  371|  79.9k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 79.9k, False: 264]
  |  |  ------------------
  |  |  372|  79.9k|                        ;                                               \
  |  |  373|  80.2k|                }                                                       \
  |  |  374|  80.2k|                _found;                                                 \
  |  |  375|  80.2k|        })
  ------------------
  137|       |                        /* Ignore control commands for now, and comments too. */
  138|    264|                        *remaining -= (e - p) + 1;
  139|    264|                        p = e + 1;
  140|    264|                        continue;
  141|    264|                }
  142|       |
  143|       |                /* A property follows */
  144|  79.9k|                if (n > ENTRY_FIELD_COUNT_MAX) {
  ------------------
  |  |   23|  79.9k|#define ENTRY_FIELD_COUNT_MAX 1024u
  ------------------
  |  Branch (144:21): [True: 1, False: 79.9k]
  ------------------
  145|      1|                        log_debug("Received an entry that has more than " STRINGIFY(ENTRY_FIELD_COUNT_MAX) " fields, ignoring entry.");
  ------------------
  |  |  220|      1|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      1|        ({                                                             \
  |  |  |  |  212|      1|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      1|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      1|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      1|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      1|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      1|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      1|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      1|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      1|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      1|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      1|        ({                                                              \
  |  |  |  |  |  |  190|      1|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      1|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      1|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      1|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      2|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      1|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      1|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      1|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      1|        })
  |  |  ------------------
  ------------------
  146|      1|                        goto finish;
  147|      1|                }
  148|       |
  149|       |                /* n existing properties, 1 new, +1 for _TRANSPORT */
  150|  79.9k|                if (!GREEDY_REALLOC(iovec,
  ------------------
  |  |  139|  79.9k|        greedy_realloc((void**) &(array), (need), sizeof((array)[0]))
  ------------------
  |  Branch (150:21): [True: 0, False: 79.9k]
  ------------------
  151|  79.9k|                                    n + 2 +
  152|  79.9k|                                    N_IOVEC_META_FIELDS + N_IOVEC_OBJECT_FIELDS +
  153|  79.9k|                                    client_context_extra_fields_n_iovec(context))) {
  154|      0|                        r = log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|      0|                        goto finish;
  156|      0|                }
  157|       |
  158|  79.9k|                q = memchr(p, '=', e - p);
  159|  79.9k|                if (q) {
  ------------------
  |  Branch (159:21): [True: 78.7k, False: 1.29k]
  ------------------
  160|  78.7k|                        if (journal_field_valid(p, q - p, false)) {
  ------------------
  |  Branch (160:29): [True: 69.8k, False: 8.83k]
  ------------------
  161|  69.8k|                                size_t l;
  162|       |
  163|  69.8k|                                l = e - p;
  164|  69.8k|                                if (l > DATA_SIZE_MAX) {
  ------------------
  |  |   18|  69.8k|#define DATA_SIZE_MAX (1024*1024*11u)
  ------------------
  |  Branch (164:37): [True: 0, False: 69.8k]
  ------------------
  165|      0|                                        log_debug("Received text block of %zu bytes is too large, ignoring entry.", l);
  ------------------
  |  |  220|      0|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
  166|      0|                                        goto finish;
  167|      0|                                }
  168|       |
  169|  69.8k|                                if (entry_size + l + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
  ------------------
  |  |   17|  69.8k|#define ENTRY_SIZE_MAX (1024*1024*13u)
  ------------------
  |  Branch (169:37): [True: 0, False: 69.8k]
  ------------------
  170|      0|                                        log_debug("Entry is too big (%zu bytes after processing %zu entries), ignoring entry.",
  ------------------
  |  |  220|      0|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
  171|      0|                                                  entry_size + l, n + 1);
  172|      0|                                        goto finish;
  173|      0|                                }
  174|       |
  175|       |                                /* If the field name starts with an underscore, skip the variable, since that indicates
  176|       |                                 * a trusted field */
  177|  69.8k|                                iovec[n++] = IOVEC_MAKE((char*) p, l);
  ------------------
  |  |   21|  69.8k|        (struct iovec) {                                                \
  |  |   22|  69.8k|                .iov_base = (void*) (base),                             \
  |  |   23|  69.8k|                .iov_len = (len),                                       \
  |  |   24|  69.8k|        }
  ------------------
  178|  69.8k|                                entry_size += l;
  179|       |
  180|  69.8k|                                manager_process_entry_meta(p, l, ucred,
  181|  69.8k|                                                          &priority,
  182|  69.8k|                                                          &identifier,
  183|  69.8k|                                                          &message,
  184|  69.8k|                                                          &object_pid);
  185|  69.8k|                        }
  186|       |
  187|  78.7k|                        *remaining -= (e - p) + 1;
  188|  78.7k|                        p = e + 1;
  189|  78.7k|                        continue;
  190|  78.7k|                } else {
  191|  1.29k|                        uint64_t l, total;
  192|  1.29k|                        char *k;
  193|       |
  194|  1.29k|                        if (*remaining < e - p + 1 + sizeof(uint64_t) + 1) {
  ------------------
  |  Branch (194:29): [True: 91, False: 1.19k]
  ------------------
  195|     91|                                log_debug("Failed to parse message, ignoring.");
  ------------------
  |  |  220|     91|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|     91|        ({                                                             \
  |  |  |  |  212|     91|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|     91|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|     91|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|     91|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|     91|        do {                                                            \
  |  |  |  |  |  |  |  |   59|     91|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|     91|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 91]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     91|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     91|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|     91|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|     91|        ({                                                              \
  |  |  |  |  |  |  190|     91|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|     91|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 91]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|     91|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|     91|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|    182|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|     91|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|     91|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 91]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|     91|        })
  |  |  |  |  ------------------
  |  |  |  |  215|     91|        })
  |  |  ------------------
  ------------------
  196|     91|                                break;
  197|     91|                        }
  198|       |
  199|  1.19k|                        l = unaligned_read_le64(e + 1);
  200|  1.19k|                        if (l > DATA_SIZE_MAX) {
  ------------------
  |  |   18|  1.19k|#define DATA_SIZE_MAX (1024*1024*11u)
  ------------------
  |  Branch (200:29): [True: 86, False: 1.11k]
  ------------------
  201|     86|                                log_debug("Received binary data block of %"PRIu64" bytes is too large, ignoring entry.", l);
  ------------------
  |  |  220|     86|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|     86|        ({                                                             \
  |  |  |  |  212|     86|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|     86|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|     86|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|     86|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|     86|        do {                                                            \
  |  |  |  |  |  |  |  |   59|     86|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|     86|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 86]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     86|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     86|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|     86|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|     86|        ({                                                              \
  |  |  |  |  |  |  190|     86|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|     86|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 86]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|     86|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|     86|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|    172|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|     86|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|     86|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 86]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|     86|        })
  |  |  |  |  ------------------
  |  |  |  |  215|     86|        })
  |  |  ------------------
  ------------------
  202|     86|                                goto finish;
  203|     86|                        }
  204|       |
  205|  1.11k|                        total = (e - p) + 1 + l;
  206|  1.11k|                        if (entry_size + total + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
  ------------------
  |  |   17|  1.11k|#define ENTRY_SIZE_MAX (1024*1024*13u)
  ------------------
  |  Branch (206:29): [True: 0, False: 1.11k]
  ------------------
  207|      0|                                log_debug("Entry is too big (%"PRIu64"bytes after processing %zu fields), ignoring.",
  ------------------
  |  |  220|      0|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
  208|      0|                                          entry_size + total, n + 1);
  209|      0|                                goto finish;
  210|      0|                        }
  211|       |
  212|  1.11k|                        if ((uint64_t) *remaining < e - p + 1 + sizeof(uint64_t) + l + 1 ||
  ------------------
  |  Branch (212:29): [True: 56, False: 1.05k]
  ------------------
  213|  1.11k|                            e[1+sizeof(uint64_t)+l] != '\n') {
  ------------------
  |  Branch (213:29): [True: 21, False: 1.03k]
  ------------------
  214|     77|                                log_debug("Failed to parse message, ignoring.");
  ------------------
  |  |  220|     77|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|     77|        ({                                                             \
  |  |  |  |  212|     77|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|     77|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|     77|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|     77|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|     77|        do {                                                            \
  |  |  |  |  |  |  |  |   59|     77|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|     77|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 77]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     77|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     77|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|     77|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|     77|        ({                                                              \
  |  |  |  |  |  |  190|     77|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|     77|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 77]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|     77|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|     77|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|    154|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|     77|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|     77|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 77]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|     77|        })
  |  |  |  |  ------------------
  |  |  |  |  215|     77|        })
  |  |  ------------------
  ------------------
  215|     77|                                break;
  216|     77|                        }
  217|       |
  218|  1.03k|                        k = malloc(total);
  219|  1.03k|                        if (!k) {
  ------------------
  |  Branch (219:29): [True: 0, False: 1.03k]
  ------------------
  220|      0|                                log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  221|      0|                                break;
  222|      0|                        }
  223|       |
  224|  1.03k|                        memcpy(k, p, e - p);
  225|  1.03k|                        k[e - p] = '=';
  226|  1.03k|                        memcpy(k + (e - p) + 1, e + 1 + sizeof(uint64_t), l);
  227|       |
  228|  1.03k|                        if (journal_field_valid(p, e - p, false)) {
  ------------------
  |  Branch (228:29): [True: 785, False: 251]
  ------------------
  229|    785|                                iovec[n] = IOVEC_MAKE(k, (e - p) + 1 + l);
  ------------------
  |  |   21|    785|        (struct iovec) {                                                \
  |  |   22|    785|                .iov_base = (void*) (base),                             \
  |  |   23|    785|                .iov_len = (len),                                       \
  |  |   24|    785|        }
  ------------------
  230|    785|                                entry_size += iovec[n].iov_len;
  231|    785|                                n++;
  232|       |
  233|    785|                                manager_process_entry_meta(k, (e - p) + 1 + l, ucred,
  234|    785|                                                          &priority,
  235|    785|                                                          &identifier,
  236|    785|                                                          &message,
  237|    785|                                                          &object_pid);
  238|    785|                        } else
  239|    251|                                free(k);
  240|       |
  241|  1.03k|                        *remaining -= (e - p) + 1 + sizeof(uint64_t) + l + 1;
  242|  1.03k|                        p = e + 1 + sizeof(uint64_t) + l + 1;
  243|  1.03k|                }
  244|  79.9k|        }
  245|       |
  246|  4.49k|        if (n <= 0)
  ------------------
  |  Branch (246:13): [True: 877, False: 3.61k]
  ------------------
  247|    877|                goto finish;
  248|       |
  249|  3.61k|        tn = n++;
  250|  3.61k|        iovec[tn] = IOVEC_MAKE_STRING("_TRANSPORT=journal");
  ------------------
  |  |   19|  3.61k|        *iovec_make_string(&(struct iovec) {}, s)
  ------------------
  251|  3.61k|        entry_size += STRLEN("_TRANSPORT=journal");
  ------------------
  |  |  397|  3.61k|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  ------------------
  252|       |
  253|  3.61k|        if (entry_size + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
  ------------------
  |  |   17|  3.61k|#define ENTRY_SIZE_MAX (1024*1024*13u)
  ------------------
  |  Branch (253:13): [True: 0, False: 3.61k]
  ------------------
  254|      0|                log_debug("Entry is too big with %zu properties and %zu bytes, ignoring.", n, entry_size);
  ------------------
  |  |  220|      0|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
  255|      0|                goto finish;
  256|      0|        }
  257|       |
  258|  3.61k|        r = 0; /* Success, we read the message. */
  259|       |
  260|  3.61k|        if (!client_context_test_priority(context, priority))
  ------------------
  |  Branch (260:13): [True: 0, False: 3.61k]
  ------------------
  261|      0|                goto finish;
  262|       |
  263|  3.61k|        if (message) {
  ------------------
  |  Branch (263:13): [True: 118, False: 3.50k]
  ------------------
  264|       |                /* Ensure message is not NULL, otherwise strlen(message) would crash. This check needs to
  265|       |                 * be here until manager_process_entry() is able to process messages containing \0 characters,
  266|       |                 * as we would have access to the actual size of message. */
  267|    118|                r = client_context_check_keep_log(context, message, strlen(message));
  268|    118|                if (r <= 0)
  ------------------
  |  Branch (268:21): [True: 0, False: 118]
  ------------------
  269|      0|                        goto finish;
  270|       |
  271|    118|                if (m->forward_to_syslog)
  ------------------
  |  Branch (271:21): [True: 0, False: 118]
  ------------------
  272|      0|                        manager_forward_syslog(m, syslog_fixup_facility(priority), identifier, message, ucred, tv);
  273|       |
  274|    118|                if (m->forward_to_kmsg)
  ------------------
  |  Branch (274:21): [True: 0, False: 118]
  ------------------
  275|      0|                        manager_forward_kmsg(m, priority, identifier, message, ucred);
  276|       |
  277|    118|                if (m->forward_to_console)
  ------------------
  |  Branch (277:21): [True: 0, False: 118]
  ------------------
  278|      0|                        manager_forward_console(m, priority, identifier, message, ucred);
  279|       |
  280|    118|                if (m->forward_to_wall)
  ------------------
  |  Branch (280:21): [True: 118, False: 0]
  ------------------
  281|    118|                        manager_forward_wall(m, priority, identifier, message, ucred);
  282|    118|        }
  283|       |
  284|  3.61k|        manager_dispatch_message(m, iovec, n, MALLOC_ELEMENTSOF(iovec), context, tv, priority, object_pid);
  ------------------
  |  |  203|  3.61k|        (__builtin_choose_expr(                                         \
  |  |  204|  3.61k|                __builtin_types_compatible_p(typeof(x), typeof(&*(x))), \
  |  |  205|  3.61k|                MALLOC_SIZEOF_SAFE(x)/sizeof((x)[0]),                   \
  |  |  ------------------
  |  |  |  |  198|  3.61k|        malloc_sizeof_safe((void**) &__builtin_choose_expr(__builtin_constant_p(x), (void*) { NULL }, (x)))
  |  |  ------------------
  |  |  206|  3.61k|                VOID_0))
  |  |  ------------------
  |  |  |  |  128|  3.61k|#  define VOID_0 ((void)0)
  |  |  ------------------
  ------------------
  285|       |
  286|  4.58k|finish:
  287|  78.8k|        for (j = 0; j < n; j++)  {
  ------------------
  |  Branch (287:21): [True: 74.2k, False: 4.58k]
  ------------------
  288|  74.2k|                if (j == tn)
  ------------------
  |  Branch (288:21): [True: 3.61k, False: 70.6k]
  ------------------
  289|  3.61k|                        continue;
  290|       |
  291|  70.6k|                if (iovec[j].iov_base < buffer ||
  ------------------
  |  Branch (291:21): [True: 716, False: 69.9k]
  ------------------
  292|  70.6k|                    (const char*) iovec[j].iov_base >= p + *remaining)
  ------------------
  |  Branch (292:21): [True: 69, False: 69.8k]
  ------------------
  293|    785|                        free(iovec[j].iov_base);
  294|  70.6k|        }
  295|       |
  296|  4.58k|        free(iovec);
  297|  4.58k|        free(identifier);
  298|  4.58k|        free(message);
  299|       |
  300|  4.58k|        return r;
  301|  3.61k|}
journald-native.c:manager_process_entry_meta:
   47|  70.6k|                pid_t *object_pid) {
   48|       |
   49|       |        /* We need to determine the priority of this entry for the rate limiting logic */
   50|       |
   51|  70.6k|        if (l == 10 &&
  ------------------
  |  Branch (51:13): [True: 1.33k, False: 69.3k]
  ------------------
   52|  70.6k|            startswith(p, "PRIORITY=") &&
  ------------------
  |  Branch (52:13): [True: 902, False: 429]
  ------------------
   53|  70.6k|            p[9] >= '0' && p[9] <= '9')
  ------------------
  |  Branch (53:13): [True: 683, False: 219]
  |  Branch (53:28): [True: 484, False: 199]
  ------------------
   54|    484|                *priority = (*priority & LOG_FACMASK) | (p[9] - '0');
   55|       |
   56|  70.1k|        else if (l == 17 &&
  ------------------
  |  Branch (56:18): [True: 2.69k, False: 67.4k]
  ------------------
   57|  70.1k|                 startswith(p, "SYSLOG_FACILITY=") &&
  ------------------
  |  Branch (57:18): [True: 1.01k, False: 1.68k]
  ------------------
   58|  70.1k|                 p[16] >= '0' && p[16] <= '9')
  ------------------
  |  Branch (58:18): [True: 810, False: 201]
  |  Branch (58:34): [True: 573, False: 237]
  ------------------
   59|    573|                *priority = LOG_PRI(*priority) | ((p[16] - '0') << 3);
   60|       |
   61|  69.6k|        else if (l == 18 &&
  ------------------
  |  Branch (61:18): [True: 17.5k, False: 52.0k]
  ------------------
   62|  69.6k|                 startswith(p, "SYSLOG_FACILITY=") &&
  ------------------
  |  Branch (62:18): [True: 16.2k, False: 1.38k]
  ------------------
   63|  69.6k|                 p[16] >= '0' && p[16] <= '9' &&
  ------------------
  |  Branch (63:18): [True: 15.0k, False: 1.15k]
  |  Branch (63:34): [True: 14.7k, False: 258]
  ------------------
   64|  69.6k|                 p[17] >= '0' && p[17] <= '9')
  ------------------
  |  Branch (64:18): [True: 12.5k, False: 2.25k]
  |  Branch (64:34): [True: 12.3k, False: 218]
  ------------------
   65|  12.3k|                *priority = LOG_PRI(*priority) | (((p[16] - '0')*10 + (p[17] - '0')) << 3);
   66|       |
   67|  57.2k|        else if (l >= 19 &&
  ------------------
  |  Branch (67:18): [True: 7.93k, False: 49.3k]
  ------------------
   68|  57.2k|                 startswith(p, "SYSLOG_IDENTIFIER=")) {
  ------------------
  |  Branch (68:18): [True: 370, False: 7.56k]
  ------------------
   69|    370|                char *t;
   70|       |
   71|    370|                t = memdup_suffix0(p + 18, l - 18);
   72|    370|                if (t)
  ------------------
  |  Branch (72:21): [True: 370, False: 0]
  ------------------
   73|    370|                        free_and_replace(*identifier, t);
  ------------------
  |  |   49|    370|        free_and_replace_full(a, b, free)
  |  |  ------------------
  |  |  |  |   10|    370|        ({                                      \
  |  |  |  |   11|    370|                typeof(a)* _a = &(a);           \
  |  |  |  |   12|    370|                typeof(b)* _b = &(b);           \
  |  |  |  |   13|    370|                free_func(*_a);                 \
  |  |  |  |   14|    370|                *_a = *_b;                      \
  |  |  |  |   15|    370|                *_b = NULL;                     \
  |  |  |  |   16|    370|                0;                              \
  |  |  |  |   17|    370|        })
  |  |  ------------------
  ------------------
   74|       |
   75|  56.9k|        } else if (l >= 8 &&
  ------------------
  |  Branch (75:20): [True: 18.4k, False: 38.4k]
  ------------------
   76|  56.9k|                   startswith(p, "MESSAGE=")) {
  ------------------
  |  Branch (76:20): [True: 745, False: 17.7k]
  ------------------
   77|    745|                char *t;
   78|       |
   79|    745|                t = memdup_suffix0(p + 8, l - 8);
   80|    745|                if (t)
  ------------------
  |  Branch (80:21): [True: 745, False: 0]
  ------------------
   81|    745|                        free_and_replace(*message, t);
  ------------------
  |  |   49|    745|        free_and_replace_full(a, b, free)
  |  |  ------------------
  |  |  |  |   10|    745|        ({                                      \
  |  |  |  |   11|    745|                typeof(a)* _a = &(a);           \
  |  |  |  |   12|    745|                typeof(b)* _b = &(b);           \
  |  |  |  |   13|    745|                free_func(*_a);                 \
  |  |  |  |   14|    745|                *_a = *_b;                      \
  |  |  |  |   15|    745|                *_b = NULL;                     \
  |  |  |  |   16|    745|                0;                              \
  |  |  |  |   17|    745|        })
  |  |  ------------------
  ------------------
   82|       |
   83|  56.1k|        } else if (l > STRLEN("OBJECT_PID=") &&
  ------------------
  |  |  397|   112k|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  ------------------
  |  Branch (83:20): [True: 16.4k, False: 39.6k]
  ------------------
   84|  56.1k|                   l < STRLEN("OBJECT_PID=")  + DECIMAL_STR_MAX(pid_t) &&
  ------------------
  |  |  397|  16.4k|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  ------------------
                                 l < STRLEN("OBJECT_PID=")  + DECIMAL_STR_MAX(pid_t) &&
  ------------------
  |  |  123|  72.6k|        ((size_t) IS_SIGNED_INTEGER_TYPE(type) + 1U +                   \
  |  |  ------------------
  |  |  |  |  186|  16.4k|        (__builtin_types_compatible_p(typeof(type), signed char) ||   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (186:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  187|  16.4k|         __builtin_types_compatible_p(typeof(type), signed short) ||  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (187:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  188|  16.4k|         __builtin_types_compatible_p(typeof(type), signed) ||        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (188:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  189|  16.4k|         __builtin_types_compatible_p(typeof(type), signed long) ||   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  190|  16.4k|         __builtin_types_compatible_p(typeof(type), signed long long))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  124|  72.6k|            (sizeof(type) <= 1 ? 3U :                                   \
  |  |  ------------------
  |  |  |  Branch (124:14): [Folded - Ignored]
  |  |  ------------------
  |  |  125|  72.6k|             sizeof(type) <= 2 ? 5U :                                   \
  |  |  ------------------
  |  |  |  Branch (125:14): [Folded - Ignored]
  |  |  ------------------
  |  |  126|  16.4k|             sizeof(type) <= 4 ? 10U :                                  \
  |  |  ------------------
  |  |  |  Branch (126:14): [Folded - Ignored]
  |  |  ------------------
  |  |  127|  16.4k|             sizeof(type) <= 8 ? (IS_SIGNED_INTEGER_TYPE(type) ? 19U : 20U) : sizeof(int[-2*(sizeof(type) > 8)])))
  |  |  ------------------
  |  |  |  |  186|      0|        (__builtin_types_compatible_p(typeof(type), signed char) ||   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (186:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  187|      0|         __builtin_types_compatible_p(typeof(type), signed short) ||  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (187:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  188|      0|         __builtin_types_compatible_p(typeof(type), signed) ||        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (188:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  189|      0|         __builtin_types_compatible_p(typeof(type), signed long) ||   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  190|      0|         __builtin_types_compatible_p(typeof(type), signed long long))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:10): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (127:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (84:20): [True: 12.5k, False: 3.91k]
  ------------------
   85|  56.1k|                   startswith(p, "OBJECT_PID=") &&
  ------------------
  |  Branch (85:20): [True: 503, False: 12.0k]
  ------------------
   86|  56.1k|                   allow_object_pid(ucred)) {
  ------------------
  |  Branch (86:20): [True: 0, False: 503]
  ------------------
   87|      0|                char buf[DECIMAL_STR_MAX(pid_t)];
   88|      0|                memcpy(buf, p + STRLEN("OBJECT_PID="),
  ------------------
  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  ------------------
   89|      0|                       l - STRLEN("OBJECT_PID="));
  ------------------
  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  ------------------
   90|      0|                buf[l-STRLEN("OBJECT_PID=")] = '\0';
  ------------------
  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  ------------------
   91|       |
   92|      0|                (void) parse_pid(buf, object_pid);
   93|      0|        }
   94|  70.6k|}
journald-native.c:allow_object_pid:
   37|    503|static bool allow_object_pid(const struct ucred *ucred) {
   38|    503|        return ucred && ucred->uid == 0;
  ------------------
  |  Branch (38:16): [True: 0, False: 503]
  |  Branch (38:25): [True: 0, False: 0]
  ------------------
   39|    503|}

manager_forward_wall:
   17|    118|                const struct ucred *ucred) {
   18|       |
   19|    118|        _cleanup_free_ char *ident_buf = NULL, *l_buf = NULL;
  ------------------
  |  |   82|    118|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|    118|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   20|    118|        const char *l;
   21|    118|        int r;
   22|       |
   23|    118|        assert(m);
  ------------------
  |  |   72|    118|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    118|        do {                                                            \
  |  |  |  |   59|    118|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    118|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 118]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    118|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    118|        } while (false)
  |  |  ------------------
  ------------------
   24|    118|        assert(message);
  ------------------
  |  |   72|    118|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    118|        do {                                                            \
  |  |  |  |   59|    118|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    118|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 118]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    118|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    118|        } while (false)
  |  |  ------------------
  ------------------
   25|       |
   26|    118|        if (LOG_PRI(priority) > m->max_level_wall)
  ------------------
  |  Branch (26:13): [True: 29, False: 89]
  ------------------
   27|     29|                return;
   28|       |
   29|     89|        if (ucred) {
  ------------------
  |  Branch (29:13): [True: 0, False: 89]
  ------------------
   30|      0|                if (!identifier) {
  ------------------
  |  Branch (30:21): [True: 0, False: 0]
  ------------------
   31|      0|                        (void) pid_get_comm(ucred->pid, &ident_buf);
   32|      0|                        identifier = ident_buf;
   33|      0|                }
   34|       |
   35|      0|                if (asprintf(&l_buf, "%s["PID_FMT"]: %s", strempty(identifier), ucred->pid, message) < 0) {
  ------------------
  |  Branch (35:21): [True: 0, False: 0]
  ------------------
   36|      0|                        log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   37|      0|                        return;
   38|      0|                }
   39|       |
   40|      0|                l = l_buf;
   41|       |
   42|     89|        } else if (identifier) {
  ------------------
  |  Branch (42:20): [True: 59, False: 30]
  ------------------
   43|       |
   44|     59|                l = l_buf = strjoin(identifier, ": ", message);
  ------------------
  |  |   91|     59|#define strjoin(a, ...) strextend_with_separator_internal(NULL, NULL, a, __VA_ARGS__, NULL)
  ------------------
   45|     59|                if (!l_buf) {
  ------------------
  |  Branch (45:21): [True: 0, False: 59]
  ------------------
   46|      0|                        log_oom();
  ------------------
  |  |  280|      0|#define log_oom()           log_oom_full(LOG_ERR)
  |  |  ------------------
  |  |  |  |  279|      0|#define log_oom_full(level) log_oom_internal(level, PROJECT_FILE, __LINE__, __func__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|      0|                        return;
   48|      0|                }
   49|     59|        } else
   50|     30|                l = message;
   51|       |
   52|     89|        r = wall(l, "systemd-journald", NULL, NULL, NULL);
   53|     89|        if (r < 0)
  ------------------
  |  Branch (53:13): [True: 0, False: 89]
  ------------------
   54|     89|                log_debug_errno(r, "Failed to send wall message: %m");
  ------------------
  |  |  228|      0|#define log_debug_errno(error, ...)     log_full_errno(LOG_DEBUG,   error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
   55|     89|}

sd_event_new:
  388|  1.08k|_public_ int sd_event_new(sd_event** ret) {
  389|  1.08k|        sd_event *e;
  390|  1.08k|        int r;
  391|       |
  392|  1.08k|        assert_return(ret, -EINVAL);
  ------------------
  |  |   18|  1.08k|        do {                                                            \
  |  |   19|  1.08k|                if (!assert_log(expr, #expr))                           \
  |  |  ------------------
  |  |  |  |   13|  1.08k|#define assert_log(expr, message) ((_likely_(expr))                     \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|  1.08k|#define _likely_(x) (__builtin_expect(!!(x), 1))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (13:36): [True: 1.08k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   14|  1.08k|        ? (true)                                                        \
  |  |  |  |   15|  1.08k|        : (log_assert_failed_return(message, PROJECT_FILE, __LINE__, __func__), false))
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (19:21): [True: 0, False: 1.08k]
  |  |  ------------------
  |  |   20|  1.08k|                        return (r);                                     \
  |  |   21|  1.08k|        } while (false)
  ------------------
  393|       |
  394|  1.08k|        e = new(sd_event, 1);
  ------------------
  |  |   17|  1.08k|#define new(t, n) ((t*) malloc_multiply(n, sizeof(t)))
  ------------------
  395|  1.08k|        if (!e)
  ------------------
  |  Branch (395:13): [True: 0, False: 1.08k]
  ------------------
  396|      0|                return -ENOMEM;
  397|       |
  398|  1.08k|        *e = (sd_event) {
  399|  1.08k|                .n_ref = 1,
  400|  1.08k|                .epoll_fd = -EBADF,
  401|  1.08k|                .watchdog_fd = -EBADF,
  402|  1.08k|                .realtime.wakeup = WAKEUP_CLOCK_DATA,
  403|  1.08k|                .realtime.fd = -EBADF,
  404|  1.08k|                .realtime.next = USEC_INFINITY,
  ------------------
  |  |   35|  1.08k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  405|  1.08k|                .boottime.wakeup = WAKEUP_CLOCK_DATA,
  406|  1.08k|                .boottime.fd = -EBADF,
  407|  1.08k|                .boottime.next = USEC_INFINITY,
  ------------------
  |  |   35|  1.08k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  408|  1.08k|                .monotonic.wakeup = WAKEUP_CLOCK_DATA,
  409|  1.08k|                .monotonic.fd = -EBADF,
  410|  1.08k|                .monotonic.next = USEC_INFINITY,
  ------------------
  |  |   35|  1.08k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  411|  1.08k|                .realtime_alarm.wakeup = WAKEUP_CLOCK_DATA,
  412|  1.08k|                .realtime_alarm.fd = -EBADF,
  413|  1.08k|                .realtime_alarm.next = USEC_INFINITY,
  ------------------
  |  |   35|  1.08k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  414|  1.08k|                .boottime_alarm.wakeup = WAKEUP_CLOCK_DATA,
  415|  1.08k|                .boottime_alarm.fd = -EBADF,
  416|  1.08k|                .boottime_alarm.next = USEC_INFINITY,
  ------------------
  |  |   35|  1.08k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  417|  1.08k|                .perturb = USEC_INFINITY,
  ------------------
  |  |   35|  1.08k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  418|  1.08k|                .origin_id = origin_id_query(),
  419|  1.08k|        };
  420|       |
  421|  1.08k|        r = prioq_ensure_allocated(&e->pending, pending_prioq_compare);
  422|  1.08k|        if (r < 0)
  ------------------
  |  Branch (422:13): [True: 0, False: 1.08k]
  ------------------
  423|      0|                goto fail;
  424|       |
  425|  1.08k|        e->epoll_fd = epoll_create1(EPOLL_CLOEXEC);
  426|  1.08k|        if (e->epoll_fd < 0) {
  ------------------
  |  Branch (426:13): [True: 0, False: 1.08k]
  ------------------
  427|      0|                r = -errno;
  428|      0|                goto fail;
  429|      0|        }
  430|       |
  431|  1.08k|        e->epoll_fd = fd_move_above_stdio(e->epoll_fd);
  432|       |
  433|  1.08k|        if (secure_getenv("SD_EVENT_PROFILE_DELAYS")) {
  ------------------
  |  Branch (433:13): [True: 0, False: 1.08k]
  ------------------
  434|      0|                log_debug("Event loop profiling enabled. Logarithmic histogram of event loop iterations in the range 2^0 %s 2^63 us will be logged every 5s.",
  ------------------
  |  |  220|      0|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
  435|      0|                          glyph(GLYPH_ELLIPSIS));
  436|      0|                e->profile_delays = true;
  437|      0|        }
  438|       |
  439|  1.08k|        *ret = e;
  440|  1.08k|        return 0;
  441|       |
  442|      0|fail:
  443|      0|        event_free(e);
  444|      0|        return r;
  445|  1.08k|}
sd_event_unref:
  459|  1.08k|_public_ sd_event* sd_event_unref(sd_event *e) {
  460|  1.08k|        if (!e)
  ------------------
  |  Branch (460:13): [True: 0, False: 1.08k]
  ------------------
  461|      0|                return NULL;
  462|  1.08k|        if (event_origin_changed(e))
  ------------------
  |  Branch (462:13): [True: 0, False: 1.08k]
  ------------------
  463|      0|                return NULL;
  464|       |
  465|  1.08k|        assert(e->n_ref > 0);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  466|  1.08k|        if (--e->n_ref > 0)
  ------------------
  |  Branch (466:13): [True: 0, False: 1.08k]
  ------------------
  467|      0|                return NULL;
  468|       |
  469|  1.08k|        return event_free(e);
  470|  1.08k|}
sd_event_default:
 4951|  1.08k|_public_ int sd_event_default(sd_event **ret) {
 4952|  1.08k|        sd_event *e = NULL;
 4953|  1.08k|        int r;
 4954|       |
 4955|  1.08k|        if (!ret)
  ------------------
  |  Branch (4955:13): [True: 0, False: 1.08k]
  ------------------
 4956|      0|                return !!default_event;
 4957|       |
 4958|  1.08k|        if (default_event) {
  ------------------
  |  Branch (4958:13): [True: 0, False: 1.08k]
  ------------------
 4959|      0|                *ret = sd_event_ref(default_event);
 4960|      0|                return 0;
 4961|      0|        }
 4962|       |
 4963|  1.08k|        r = sd_event_new(&e);
 4964|  1.08k|        if (r < 0)
  ------------------
  |  Branch (4964:13): [True: 0, False: 1.08k]
  ------------------
 4965|      0|                return r;
 4966|       |
 4967|  1.08k|        e->default_event_ptr = &default_event;
 4968|  1.08k|        e->tid = gettid();
 4969|  1.08k|        default_event = e;
 4970|       |
 4971|  1.08k|        *ret = e;
 4972|  1.08k|        return 1;
 4973|  1.08k|}
sd-event.c:event_free:
  343|  1.08k|static sd_event* event_free(sd_event *e) {
  344|  1.08k|        sd_event_source *s;
  345|       |
  346|  1.08k|        assert(e);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  347|       |
  348|  1.08k|        e->sigterm_event_source = sd_event_source_unref(e->sigterm_event_source);
  349|  1.08k|        e->sigint_event_source = sd_event_source_unref(e->sigint_event_source);
  350|       |
  351|  1.08k|        while ((s = e->sources)) {
  ------------------
  |  Branch (351:16): [True: 0, False: 1.08k]
  ------------------
  352|      0|                assert(s->floating);
  ------------------
  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
  353|      0|                source_disconnect(s);
  354|      0|                sd_event_source_unref(s);
  355|      0|        }
  356|       |
  357|  1.08k|        assert(e->n_sources == 0);
  ------------------
  |  |   72|  1.08k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.08k|        do {                                                            \
  |  |  |  |   59|  1.08k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.08k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.08k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  1.08k|        } while (false)
  |  |  ------------------
  ------------------
  358|       |
  359|  1.08k|        if (e->default_event_ptr)
  ------------------
  |  Branch (359:13): [True: 1.08k, False: 0]
  ------------------
  360|  1.08k|                *(e->default_event_ptr) = NULL;
  361|       |
  362|  1.08k|        safe_close(e->epoll_fd);
  363|  1.08k|        safe_close(e->watchdog_fd);
  364|       |
  365|  1.08k|        free_clock_data(&e->realtime);
  366|  1.08k|        free_clock_data(&e->boottime);
  367|  1.08k|        free_clock_data(&e->monotonic);
  368|  1.08k|        free_clock_data(&e->realtime_alarm);
  369|  1.08k|        free_clock_data(&e->boottime_alarm);
  370|       |
  371|  1.08k|        prioq_free(e->pending);
  372|  1.08k|        prioq_free(e->prepare);
  373|  1.08k|        prioq_free(e->exit);
  374|       |
  375|  1.08k|        free(e->signal_sources);
  376|  1.08k|        hashmap_free(e->signal_data);
  377|       |
  378|  1.08k|        hashmap_free(e->inotify_data);
  379|       |
  380|  1.08k|        hashmap_free(e->child_sources);
  381|  1.08k|        set_free(e->post_sources);
  382|       |
  383|  1.08k|        free(e->event_queue);
  384|       |
  385|  1.08k|        return mfree(e);
  ------------------
  |  |  404|  1.08k|        ({                                      \
  |  |  405|  1.08k|                free(memory);                   \
  |  |  406|  1.08k|                (typeof(memory)) NULL;          \
  |  |  407|  1.08k|        })
  ------------------
  386|  1.08k|}
sd-event.c:free_clock_data:
  334|  5.41k|static void free_clock_data(struct clock_data *d) {
  335|  5.41k|        assert(d);
  ------------------
  |  |   72|  5.41k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  5.41k|        do {                                                            \
  |  |  |  |   59|  5.41k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  5.41k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 5.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  5.41k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  5.41k|        } while (false)
  |  |  ------------------
  ------------------
  336|  5.41k|        assert(d->wakeup == WAKEUP_CLOCK_DATA);
  ------------------
  |  |   72|  5.41k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  5.41k|        do {                                                            \
  |  |  |  |   59|  5.41k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  5.41k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 5.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  5.41k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  5.41k|        } while (false)
  |  |  ------------------
  ------------------
  337|       |
  338|  5.41k|        safe_close(d->fd);
  339|  5.41k|        prioq_free(d->earliest);
  340|  5.41k|        prioq_free(d->latest);
  341|  5.41k|}

journal_field_valid:
 1708|  79.7k|bool journal_field_valid(const char *p, size_t l, bool allow_protected) {
 1709|       |        /* We kinda enforce POSIX syntax recommendations for
 1710|       |           environment variables here, but make a couple of additional
 1711|       |           requirements.
 1712|       |
 1713|       |           http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html */
 1714|       |
 1715|  79.7k|        assert(p);
  ------------------
  |  |   72|  79.7k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  79.7k|        do {                                                            \
  |  |  |  |   59|  79.7k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  79.7k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 79.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  79.7k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  79.7k|        } while (false)
  |  |  ------------------
  ------------------
 1716|       |
 1717|  79.7k|        if (l == SIZE_MAX)
  ------------------
  |  Branch (1717:13): [True: 0, False: 79.7k]
  ------------------
 1718|      0|                l = strlen(p);
 1719|       |
 1720|       |        /* No empty field names */
 1721|  79.7k|        if (l <= 0)
  ------------------
  |  Branch (1721:13): [True: 962, False: 78.7k]
  ------------------
 1722|    962|                return false;
 1723|       |
 1724|       |        /* Don't allow names longer than 64 chars */
 1725|  78.7k|        if (l > 64)
  ------------------
  |  Branch (1725:13): [True: 1.00k, False: 77.7k]
  ------------------
 1726|  1.00k|                return false;
 1727|       |
 1728|       |        /* Variables starting with an underscore are protected */
 1729|  77.7k|        if (!allow_protected && p[0] == '_')
  ------------------
  |  Branch (1729:13): [True: 77.7k, False: 0]
  |  Branch (1729:33): [True: 504, False: 77.2k]
  ------------------
 1730|    504|                return false;
 1731|       |
 1732|       |        /* Don't allow digits as first character */
 1733|  77.2k|        if (ascii_isdigit(p[0]))
  ------------------
  |  Branch (1733:13): [True: 521, False: 76.7k]
  ------------------
 1734|    521|                return false;
 1735|       |
 1736|       |        /* Only allow A-Z0-9 and '_' */
 1737|   640k|        for (const char *a = p; a < p + l; a++)
  ------------------
  |  Branch (1737:33): [True: 570k, False: 70.6k]
  ------------------
 1738|   570k|                if ((*a < 'A' || *a > 'Z') &&
  ------------------
  |  Branch (1738:22): [True: 12.4k, False: 557k]
  |  Branch (1738:34): [True: 35.9k, False: 521k]
  ------------------
 1739|   570k|                    !ascii_isdigit(*a) &&
  ------------------
  |  Branch (1739:21): [True: 41.3k, False: 7.02k]
  ------------------
 1740|   570k|                    *a != '_')
  ------------------
  |  Branch (1740:21): [True: 6.08k, False: 35.2k]
  ------------------
 1741|  6.08k|                        return false;
 1742|       |
 1743|  70.6k|        return true;
 1744|  76.7k|}

gethostname_full:
  312|     89|int gethostname_full(GetHostnameFlags flags, char **ret) {
  313|     89|        _cleanup_free_ char *buf = NULL, *fallback = NULL;
  ------------------
  |  |   82|     89|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|     89|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  314|     89|        struct utsname u;
  315|     89|        const char *s;
  316|       |
  317|     89|        assert(ret);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
  318|       |
  319|     89|        assert_se(uname(&u) >= 0);
  ------------------
  |  |   65|     89|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
  320|       |
  321|     89|        s = u.nodename;
  322|     89|        if (isempty(s) || streq(s, "(none)") ||
  ------------------
  |  |   46|    178|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 0, False: 89]
  |  |  ------------------
  ------------------
  |  Branch (322:13): [True: 0, False: 89]
  ------------------
  323|     89|            (!FLAGS_SET(flags, GET_HOSTNAME_ALLOW_LOCALHOST) && is_localhost(s)) ||
  ------------------
  |  |  414|    178|        ((~(v) & (flags)) == 0)
  ------------------
  |  Branch (323:14): [True: 0, False: 89]
  |  Branch (323:65): [True: 0, False: 0]
  ------------------
  324|     89|            (FLAGS_SET(flags, GET_HOSTNAME_SHORT) && s[0] == '.')) {
  ------------------
  |  |  414|    178|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 0, False: 89]
  |  |  ------------------
  ------------------
  |  Branch (324:54): [True: 0, False: 0]
  ------------------
  325|      0|                if (!FLAGS_SET(flags, GET_HOSTNAME_FALLBACK_DEFAULT))
  ------------------
  |  |  414|      0|        ((~(v) & (flags)) == 0)
  ------------------
  |  Branch (325:21): [True: 0, False: 0]
  ------------------
  326|      0|                        return -ENXIO;
  327|       |
  328|      0|                s = fallback = get_default_hostname();
  329|      0|                if (!s)
  ------------------
  |  Branch (329:21): [True: 0, False: 0]
  ------------------
  330|      0|                        return -ENOMEM;
  331|       |
  332|      0|                if (FLAGS_SET(flags, GET_HOSTNAME_SHORT) && s[0] == '.')
  ------------------
  |  |  414|      0|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (332:61): [True: 0, False: 0]
  ------------------
  333|      0|                        return -ENXIO;
  334|      0|        }
  335|       |
  336|     89|        if (FLAGS_SET(flags, GET_HOSTNAME_SHORT))
  ------------------
  |  |  414|     89|        ((~(v) & (flags)) == 0)
  |  |  ------------------
  |  |  |  Branch (414:9): [True: 0, False: 89]
  |  |  ------------------
  ------------------
  337|      0|                buf = strdupcspn(s, ".");
  338|     89|        else
  339|     89|                buf = strdup(s);
  340|     89|        if (!buf)
  ------------------
  |  Branch (340:13): [True: 0, False: 89]
  ------------------
  341|      0|                return -ENOMEM;
  342|       |
  343|     89|        *ret = TAKE_PTR(buf);
  ------------------
  |  |  388|     89|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|     89|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|     89|        ({                                                       \
  |  |  |  |  |  |  381|     89|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|     89|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|     89|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|     89|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|     89|                _var_;                                           \
  |  |  |  |  |  |  386|     89|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  344|     89|        return 0;
  345|     89|}

wall.c:gethostname_malloc:
   42|     89|static inline char* gethostname_malloc(void) {
   43|     89|        char *s;
   44|       |
   45|     89|        if (gethostname_full(GET_HOSTNAME_ALLOW_LOCALHOST | GET_HOSTNAME_FALLBACK_DEFAULT, &s) < 0)
  ------------------
  |  Branch (45:13): [True: 0, False: 89]
  ------------------
   46|      0|                return NULL;
   47|       |
   48|     89|        return s;
   49|     89|}

journal_file_offline_close:
  398|  2.16k|JournalFile* journal_file_offline_close(JournalFile *f) {
  399|  2.16k|        if (!f)
  ------------------
  |  Branch (399:13): [True: 2.16k, False: 0]
  ------------------
  400|  2.16k|                return NULL;
  401|       |
  402|      0|        journal_file_write_final_tag(f);
  403|       |
  404|      0|        if (sd_event_source_get_enabled(f->post_change_timer, NULL) > 0)
  ------------------
  |  Branch (404:13): [True: 0, False: 0]
  ------------------
  405|      0|                journal_file_post_change(f);
  406|      0|        f->post_change_timer = sd_event_source_disable_unref(f->post_change_timer);
  407|       |
  408|      0|        journal_file_set_offline(f, true);
  409|       |
  410|      0|        return journal_file_close(f);
  411|  2.16k|}

wall.c:utxent_cleanup:
   22|     89|static inline void utxent_cleanup(bool *initialized) {
   23|     89|        assert(initialized);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
   24|     89|        if (*initialized)
  ------------------
  |  Branch (24:13): [True: 89, False: 0]
  ------------------
   25|     89|                endutxent();
   26|     89|}
wall.c:utxent_start:
   18|     89|static inline bool utxent_start(void) {
   19|     89|        setutxent();
   20|     89|        return true;
   21|     89|}

wall:
  148|     89|        void *userdata) {
  149|       |
  150|     89|        _cleanup_free_ char *text = NULL, *hostname = NULL, *username_alloc = NULL, *stdin_tty = NULL;
  ------------------
  |  |   82|     89|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|     89|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  151|     89|        int r;
  152|       |
  153|     89|        assert(message);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
  154|       |
  155|     89|        hostname = gethostname_malloc();
  156|     89|        if (!hostname)
  ------------------
  |  Branch (156:13): [True: 0, False: 89]
  ------------------
  157|      0|                return -ENOMEM;
  158|       |
  159|     89|        if (!username) {
  ------------------
  |  Branch (159:13): [True: 0, False: 89]
  ------------------
  160|      0|                username_alloc = getlogname_malloc();
  161|      0|                if (!username_alloc)
  ------------------
  |  Branch (161:21): [True: 0, False: 0]
  ------------------
  162|      0|                        return -ENOMEM;
  163|       |
  164|      0|                username = username_alloc;
  165|      0|        }
  166|       |
  167|     89|        if (!origin_tty) {
  ------------------
  |  Branch (167:13): [True: 89, False: 0]
  ------------------
  168|     89|                (void) getttyname_harder(STDIN_FILENO, &stdin_tty);
  169|     89|                origin_tty = stdin_tty;
  170|     89|        }
  171|       |
  172|     89|        if (asprintf(&text,
  ------------------
  |  Branch (172:13): [True: 0, False: 89]
  ------------------
  173|     89|                     "\r\n"
  174|     89|                     "Broadcast message from %s@%s%s%s (%s):\r\n\r\n"
  175|     89|                     "%s\r\n\r\n",
  176|     89|                     username, hostname,
  177|     89|                     origin_tty ? " on " : "", strempty(origin_tty),
  ------------------
  |  Branch (177:22): [True: 0, False: 89]
  ------------------
  178|     89|                     FORMAT_TIMESTAMP(now(CLOCK_REALTIME)),
  ------------------
  |  |  143|     89|#define FORMAT_TIMESTAMP(t) format_timestamp((char[FORMAT_TIMESTAMP_MAX]){}, FORMAT_TIMESTAMP_MAX, t)
  |  |  ------------------
  |  |  |  |   60|     89|#define FORMAT_TIMESTAMP_MAX (3U+1U+10U+1U+8U+1U+6U+1U+6U+1U)
  |  |  ------------------
  ------------------
  179|     89|                     message) < 0)
  180|      0|                return -ENOMEM;
  181|       |
  182|     89|        r = wall_utmp(text, match_tty, userdata);
  183|     89|        if (r == -ENOPROTOOPT)
  ------------------
  |  Branch (183:13): [True: 0, False: 89]
  ------------------
  184|      0|                r = wall_logind(text, match_tty, userdata);
  185|       |
  186|     89|        return r == -ENOPROTOOPT ? 0 : r;
  ------------------
  |  Branch (186:16): [True: 0, False: 89]
  ------------------
  187|     89|}
wall.c:wall_utmp:
   44|     89|        void *userdata) {
   45|       |
   46|     89|#if ENABLE_UTMP
   47|     89|        _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
  ------------------
  |  |   96|     89|#define _unused_ __attribute__((__unused__))
  ------------------
   48|     89|        struct utmpx *u;
   49|     89|        int r = 0;
   50|       |
   51|     89|        assert(message);
  ------------------
  |  |   72|     89|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     89|        do {                                                            \
  |  |  |  |   59|     89|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     89|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 89]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     89|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|     89|        } while (false)
  |  |  ------------------
  ------------------
   52|       |
   53|       |        /* libc's setutxent() unfortunately doesn't inform us about success, i.e. whether /var/run/utmp
   54|       |         * exists. Hence we have to check manually first. */
   55|     89|        if (access(UTMPX_FILE, F_OK) < 0) {
  ------------------
  |  Branch (55:13): [True: 0, False: 89]
  ------------------
   56|      0|                if (errno == ENOENT)
  ------------------
  |  Branch (56:21): [True: 0, False: 0]
  ------------------
   57|      0|                        return -ENOPROTOOPT;
   58|       |
   59|      0|                return -errno;
   60|      0|        }
   61|       |
   62|     89|        utmpx = utxent_start();
   63|       |
   64|     89|        while ((u = getutxent())) {
  ------------------
  |  Branch (64:16): [True: 0, False: 89]
  ------------------
   65|      0|                _cleanup_free_ char *p = NULL;
  ------------------
  |  |   82|      0|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|      0|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   66|      0|                const char *tty_path;
   67|      0|                bool is_local;
   68|       |
   69|      0|                if (u->ut_type != USER_PROCESS || isempty(u->ut_user))
  ------------------
  |  Branch (69:21): [True: 0, False: 0]
  |  Branch (69:51): [True: 0, False: 0]
  ------------------
   70|      0|                        continue;
   71|       |
   72|       |                /* This access is fine, because strlen("/dev/") < 32 (UT_LINESIZE) */
   73|      0|                if (path_startswith(u->ut_line, "/dev/"))
  ------------------
  |  Branch (73:21): [True: 0, False: 0]
  ------------------
   74|      0|                        tty_path = u->ut_line;
   75|      0|                else {
   76|      0|                        if (asprintf(&p, "/dev/%.*s", (int) sizeof(u->ut_line), u->ut_line) < 0)
  ------------------
  |  Branch (76:29): [True: 0, False: 0]
  ------------------
   77|      0|                                return -ENOMEM;
   78|       |
   79|      0|                        tty_path = p;
   80|      0|                }
   81|       |
   82|       |                /* It seems that the address field is always set for remote logins. For local logins and
   83|       |                 * other local entries, we get [0,0,0,0]. */
   84|      0|                is_local = eqzero(u->ut_addr_v6);
  ------------------
  |  |   64|      0|#define eqzero(x) memeqzero(x, sizeof(x))
  |  |  ------------------
  |  |  |  |   62|      0|#define memeqzero(data, length) memeqbyte(0x00, data, length)
  |  |  ------------------
  ------------------
   85|       |
   86|      0|                if (!match_tty || match_tty(tty_path, is_local, userdata))
  ------------------
  |  Branch (86:21): [True: 0, False: 0]
  |  Branch (86:35): [True: 0, False: 0]
  ------------------
   87|      0|                        RET_GATHER(r, write_to_terminal(tty_path, message));
  ------------------
  |  |   84|      0|        ({                                      \
  |  |   85|      0|                int *__a = &(acc), __e = (err); \
  |  |   86|      0|                if (*__a >= 0 && __e < 0)       \
  |  |  ------------------
  |  |  |  Branch (86:21): [True: 0, False: 0]
  |  |  |  Branch (86:34): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|                        *__a = __e;             \
  |  |   88|      0|                *__a;                           \
  |  |   89|      0|        })
  ------------------
   88|      0|        }
   89|       |
   90|     89|        return r;
   91|       |
   92|       |#else
   93|       |        return -ENOPROTOOPT;
   94|       |#endif
   95|     89|}

