linux-test-project/lcov

geninfo: ERROR: (negative) Unexpected negative hit count '-88'

Naresh-ibm opened this issue · 7 comments

I am trying to get the code coverage using lcov and getting following errors and warnings,

#lcov -o /home/test.info -c -f -d /sys/kernel/debug/gcov/root/kernel/linux -b  /root/kernel/linux --keep-going
12:46:03 lcov -o /home/test.info -c -f -d /sys/kernel/debug/gcov/root/kernel/linux -b  /root/kernel/linux --keep-going
12:46:03 Capturing coverage data from /sys/kernel/debug/gcov/root/kernel/linux
12:46:03 geninfo cmd: '/usr/local/bin/geninfo /sys/kernel/debug/gcov/root/kernel/linux --output-filename /home/test.info --follow --keep-going --base-directory /root/kernel/linux'
12:46:03 Found gcov version: 11.4.1
12:46:03 Using intermediate gcov format
12:46:03 Recording 'internal' directories:
12:46:03 	/sys/kernel/debug/gcov/root/kernel/linux
12:46:03 Writing temporary data to /tmp/geninfo_datYWI8
12:46:03 Scanning /sys/kernel/debug/gcov/root/kernel/linux for .gcda files ...
12:46:04 Found 2007 data files in /sys/kernel/debug/gcov/root/kernel/linux
12:46:04 using: chunkSize: 1, nchunks:2007, intervalLength:100
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 	(use "geninfo --ignore-errors inconsistent,inconsistent ..." to suppress this warning)
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/book3s/64/kup.h:365: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/thread_info.h:87: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: ERROR: (inconsistent) mismatched end line for __se_sys_swapcontext at /root/kernel/linux/arch/powerpc/kernel/signal_64.c:649: 729 -> 649
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/current.h:15: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/ptrace.h:155: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/current.h:15: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/kernel/cacheinfo.c:137: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/kernel/time.c:683: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: ERROR: (negative) Unexpected negative hit count '-88' for line /root/kernel/linux/arch/powerpc/kernel/time.c:714" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/arch/powerpc/kernel/time.gcda.
12:46:04 	Perhaps you need to compile with '-fprofile-update=atomic.
12:46:04 	(use "geninfo --ignore-errors negative ..." to bypass this error)
12:46:04 geninfo: ERROR: (negative) Unexpected negative hit count '-88' for line /root/kernel/linux/include/linux/sched/clock.h:48" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/arch/powerpc/kernel/time.gcda.
12:46:04 geninfo: ERROR: (negative) Unexpected negative hit count '-88' for line /root/kernel/linux/include/linux/sched/clock.h:50" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/arch/powerpc/kernel/time.gcda.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/jump_label.h:210: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/find.h:52: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/cpu_has_feature.h:23: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/current.h:15: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: ERROR: (negative) Unexpected negative hit count '-6081' for line /root/kernel/linux/arch/powerpc/kernel/interrupt.c:312" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/arch/powerpc/kernel/interrupt.gcda.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/asm-generic/access_ok.h:31: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/cpu_has_feature.h:23: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/fortify-string.h:355: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/fortify-string.h:355: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/current.h:15: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/asm-generic/bitops/instrumented-atomic.h:39: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/hw_breakpoint.h:89: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/seq_buf.h:26: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/qspinlock.h:36: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_rtas at /root/kernel/linux/arch/powerpc/kernel/rtas.c:1110: 1110 -> 1198
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/vdso/timebase.h:46: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/cpumask.h:125: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/eeh.h:248: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/kernel/module.c:95: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/context_tracking_state.h:104: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/iommu.h:142: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/bitmap.h:437: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/thread_info.h:116: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:04 geninfo: ERROR: (inconsistent) mismatched end line for __se_sys_pciconfig_iobase at /root/kernel/linux/arch/powerpc/kernel/pci_64.c:226: 278 -> 226
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/thread_info.h:116: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/pgtable-be-types.h:16: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/mm/pageattr.c:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/atomic.h:35: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/fortify-string.h:274: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/cache.h:134: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/mm/book3s64/mmu_context.c:29: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/atomic/atomic-instrumented.h:39: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: ERROR: (inconsistent) mismatched end line for __se_sys_subpage_prot at /root/kernel/linux/arch/powerpc/mm/book3s64/subpage_prot.c:190: 287 -> 190
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/mm_types.h:705: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/mmu.h:249: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/mm/numa.c:243: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/mm/hugetlbpage.c:304: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/lib/code-patching.c:225: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/lib/sstep.c:128: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:05 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/fortify-string.h:274: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/spinlock.h:323: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/of.h:280: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/plpar_wrappers.h:237: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/rtas.h:130: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/io.h:904: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/cputhreads.h:48: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/jump_label.h:18: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/current.h:15: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/slab.h:366: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/net/bpf_jit_comp64.c:75: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/thread_info.h:116: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/fortify-string.h:274: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/cpu_has_feature.h:23: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/thread_info.h:87: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: ERROR: (inconsistent) mismatched end line for __se_sys_set_tid_address at /root/kernel/linux/kernel/fork.c:1765: 1770 -> 1765
12:46:06 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_clone at /root/kernel/linux/kernel/fork.c:2752: 2752 -> 2785
12:46:06 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_clone3 at /root/kernel/linux/kernel/fork.c:2926: 2926 -> 2943
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/current.h:15: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/kernel/panic.c:441: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/arch/powerpc/include/asm/hw_irq.h:159: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/sched/task.h:106: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:06 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_exit at /root/kernel/linux/kernel/exit.c:889: 889 -> 892
12:46:06 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_exit_group at /root/kernel/linux/kernel/exit.c:933: 933 -> 938
12:46:06 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_waitid at /root/kernel/linux/kernel/exit.c:1612: 1612 -> 1643
12:46:06 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_wait4 at /root/kernel/linux/kernel/exit.c:1704: 1704 -> 1715
12:46:06 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/kernel/exit.c:1112" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/exit.gcda.
12:46:06 geninfo: WARNING: (inconsistent) /root/kernel/linux/kernel/softirq.c:408: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:07 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/atomic/atomic-arch-fallback.h:355: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:07 geninfo: WARNING: (inconsistent) /root/kernel/linux/kernel/sysctl.c:427: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_capget at /root/kernel/linux/kernel/capability.c:148: 148 -> 202
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_capset at /root/kernel/linux/kernel/capability.c:222: 222 -> 281
12:46:07 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/asm-generic/access_ok.h:33: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:07 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/sched.h:1959: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_ptrace at /root/kernel/linux/kernel/ptrace.c:1275: 1275 -> 1310
12:46:07 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/list.h:928: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:07 geninfo: WARNING: (inconsistent) /root/kernel/linux/include/linux/thread_info.h:92: unexecuted block on non-branch line with non-zero hit count.  Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __se_sys_rt_sigprocmask at /root/kernel/linux/kernel/signal.c:3119: 3147 -> 3119
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_rt_sigpending at /root/kernel/linux/kernel/signal.c:3191: 3191 -> 3204
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_rt_sigtimedwait at /root/kernel/linux/kernel/signal.c:3602: 3602 -> 3632
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_rt_sigtimedwait_time32 at /root/kernel/linux/kernel/signal.c:3635: 3635 -> 3664
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_kill at /root/kernel/linux/kernel/signal.c:3746: 3746 -> 3753
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_pidfd_send_signal at /root/kernel/linux/kernel/signal.c:3821: 3821 -> 3871
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_tgkill at /root/kernel/linux/kernel/signal.c:3927: 3927 -> 3934
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_rt_sigqueueinfo at /root/kernel/linux/kernel/signal.c:3971: 3971 -> 3979
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __do_sys_rt_tgsigqueueinfo at /root/kernel/linux/kernel/signal.c:4011: 4011 -> 4019
12:46:07 geninfo: ERROR: (inconsistent) mismatched end line for __se_sys_sigaltstack at /root/kernel/linux/kernel/signal.c:4193: 4205 -> 4193
12:46:07 geninfo: WARNING: (count) max_message_count=100 reached for 'inconsistent' messages: no more will be reported.
12:46:07 	To increase or decrease this limit use '--rc max_message_count=value'.
12:46:07 	(use "geninfo --ignore-errors count,count ..." to suppress this warning)
12:46:07 geninfo: ERROR: (negative) Unexpected negative hit count '-13' for line /root/kernel/linux/kernel/cred.c:499" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/cred.gcda.
12:46:07 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/kernel/cred.c:503" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/cred.gcda.
12:46:07 geninfo: ERROR: (negative) Unexpected negative hit count '-2' for line /root/kernel/linux/kernel/sched/core.c:5554" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/sched/core.gcda.
12:46:07 geninfo: ERROR: (negative) Unexpected negative hit count '-97' for line /root/kernel/linux/kernel/sched/sched.h:1307" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/sched/fair.gcda.
12:46:07 geninfo: ERROR: (negative) Unexpected negative hit count '-10' for line /root/kernel/linux/kernel/sched/fair.c:9027" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/sched/fair.gcda.
12:46:07 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/kernel/printk/printk_ringbuffer.c:1544" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/printk/printk_ringbuffer.gcda.
12:46:08 geninfo: ERROR: (negative) Unexpected negative hit count '-866' for line /root/kernel/linux/kernel/time/hrtimer.c:336" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/time/hrtimer.gcda.
12:46:09 geninfo: ERROR: (negative) Unexpected negative hit count '-20' for line /root/kernel/linux/include/linux/find.h:65" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/cgroup/cgroup.gcda.
12:46:09 geninfo: ERROR: (negative) Unexpected negative hit count '-12' for line /root/kernel/linux/include/linux/list.h:144" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/auditsc.gcda.
12:46:09 geninfo: ERROR: (negative) Unexpected negative hit count '-12' for line /root/kernel/linux/include/linux/list.h:146" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/auditsc.gcda.
12:46:09 geninfo: ERROR: (negative) Unexpected negative hit count '-12' for line /root/kernel/linux/kernel/auditsc.c:930" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/auditsc.gcda.
12:46:09 geninfo: ERROR: (negative) Unexpected negative hit count '-190' for line /root/kernel/linux/kernel/trace/ring_buffer.c:2710" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/trace/ring_buffer.gcda.
12:46:09 geninfo: ERROR: (negative) Unexpected negative hit count '-190' for line /root/kernel/linux/kernel/trace/ring_buffer.c:2711" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/kernel/trace/ring_buffer.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/mm/page-writeback.c:2944" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/page-writeback.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/mm/page-writeback.c:3001" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/page-writeback.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/include/linux/fortify-string.h:138" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/shmem.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/include/linux/fortify-string.h:140" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/shmem.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/include/linux/fortify-string.h:142" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/shmem.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/include/linux/fortify-string.h:145" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/shmem.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/include/linux/fortify-string.h:175" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/shmem.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/include/linux/fortify-string.h:176" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/shmem.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/mm/util.c:418" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/util.gcda.
12:46:11 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/mm/util.c:419" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/util.gcda.
12:46:12 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/mm/memory.c:3425" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/memory.gcda.
12:46:12 geninfo: ERROR: (negative) Unexpected negative hit count '-89' for line /root/kernel/linux/mm/rmap.c:1266" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/rmap.gcda.
12:46:12 geninfo: ERROR: (negative) Unexpected negative hit count '-89' for line /root/kernel/linux/include/linux/mm.h:961" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/rmap.gcda.
12:46:12 geninfo: ERROR: (negative) Unexpected negative hit count '-89' for line /root/kernel/linux/include/linux/mm.h:963" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/rmap.gcda.
12:46:12 geninfo: ERROR: (negative) Unexpected negative hit count '-89' for line /root/kernel/linux/include/linux/mm.h:964" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/rmap.gcda.
12:46:13 geninfo: ERROR: (negative) Unexpected negative hit count '-2' for line /root/kernel/linux/mm/memcontrol.c:4229" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/memcontrol.gcda.
12:46:13 geninfo: ERROR: (negative) Unexpected negative hit count '-52437' for line /root/kernel/linux/mm/usercopy.c:189" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/mm/usercopy.gcda.
12:46:13 geninfo: ERROR: (negative) Unexpected negative hit count '-31' for line /root/kernel/linux/fs/stat.c:240" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/fs/stat.gcda.
12:46:13 geninfo: ERROR: (negative) Unexpected negative hit count '-31' for line /root/kernel/linux/fs/stat.c:241" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/fs/stat.gcda.
12:46:13 geninfo: ERROR: (negative) Unexpected negative hit count '-295' for line /root/kernel/linux/fs/stat.c:474" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/fs/stat.gcda.
12:46:13 geninfo: ERROR: (negative) Unexpected negative hit count '-295' for line /root/kernel/linux/fs/stat.c:475" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/fs/stat.gcda.
12:46:13 geninfo: ERROR: (negative) Unexpected negative hit count '-2' for line /root/kernel/linux/fs/namei.c:4122" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/fs/namei.gcda.
12:46:13 geninfo: ERROR: (negative) Unexpected negative hit count '-2' for line /root/kernel/linux/fs/namei.c:4123" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/fs/namei.gcda.
12:46:14 geninfo: ERROR: (negative) Unexpected negative hit count '-5' for line /root/kernel/linux/fs/dcache.c:1934" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/fs/dcache.gcda.
12:46:14 geninfo: ERROR: (negative) Unexpected negative hit count '-6' for line /root/kernel/linux/fs/dcache.c:1940" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/fs/dcache.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-4' for line /root/kernel/linux/security/commoncap.c:950" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/commoncap.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/security/selinux/avc.c:1026" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/avc.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/security/selinux/avc.c:1028" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/avc.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-18' for line /root/kernel/linux/security/selinux/hooks.c:360" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/hooks.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/security/selinux/hooks.c:689" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/hooks.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/security/selinux/hooks.c:696" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/hooks.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/security/selinux/hooks.c:703" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/hooks.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/security/selinux/hooks.c:710" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/hooks.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-24' for line /root/kernel/linux/security/selinux/ss/ebitmap.c:48" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/ss/ebitmap.gcda.
12:46:16 geninfo: ERROR: (negative) Unexpected negative hit count '-13' for line /root/kernel/linux/security/selinux/ss/sidtab.c:208" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/selinux/ss/sidtab.gcda.
12:46:17 geninfo: ERROR: (negative) Unexpected negative hit count '-2' for line /root/kernel/linux/include/linux/fortify-string.h:138" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/integrity/evm/evm_main.gcda.
12:46:17 geninfo: ERROR: (negative) Unexpected negative hit count '-2' for line /root/kernel/linux/include/linux/fortify-string.h:140" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/integrity/evm/evm_main.gcda.
12:46:17 geninfo: ERROR: (negative) Unexpected negative hit count '-2' for line /root/kernel/linux/include/linux/fortify-string.h:142" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/integrity/evm/evm_main.gcda.
12:46:17 geninfo: ERROR: (negative) Unexpected negative hit count '-2' for line /root/kernel/linux/include/linux/fortify-string.h:145" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/integrity/evm/evm_main.gcda.
12:46:17 geninfo: ERROR: (negative) Unexpected negative hit count '-1' for line /root/kernel/linux/include/linux/fortify-string.h:152" while capturing from /sys/kernel/debug/gcov/root/kernel/linux/security/integrity/evm/evm_main.gcda.

Any help will be really appreciated.

Is the question "why do I see these errors?" - or "how do I make the tool no longer report these errors?" or "how do I fix my code so that these errors no longer occur?" - or something different?

Looks like you are using gcc/11.4.1.
Do you know if your kernel was compiled with the same version?
I also think that you are using a moderately recent lcov download - not the 2.0 release. If you are not already using it, try again with the current lcov TOT (but I very much doubt that any of the errors will go away when you do that.)

I have seen all of the errors you see at one time or another - that's why lcov checks for them.
If your coverage data is flakey - then your verification/validation process may not be doing what you think it is doing (and we care very deeply about that).

Some of the messages that I would be concerned about:

  • the mismatched end lines could be because you have objects (compilation units) which were compiled with two (or more than two) different versions of source files - i.e., the source files have different numbers of lines.
    If this is the case: then your coverage data will be somewhere between useless and misleading - the coverpoint on line 10 seen in one compilation unit is not the same as the coverpoint on line 10 from another compilation unit.
    Most often, I have seen this when libraries build from slightly different sources are linked together - though there are other creative ways that folks manage to create the issues.

  • the negative hit counts may be related to the -fprofile-update=atomic bug (duckduckgo is your friend - some searching will lead you to some articles describing the issue and the workaround.
    Or you can use the RC setting to tell the tool to silently treat them as zero.

  • the inconsistent branch- and line- hit count issue is another gcc bug - but I am a bit surprised that you are seeing it with gcc/11. My recollection is that it was in some earlier gcc versions and then disappeared in some newer versions.
    Again - you can tell the tool to ignore this.

Hope this helps.

Henry

Is the question "why do I see these errors?" - or "how do I make the tool no longer report these errors?" or "how do I fix >>>my code so that these errors no longer occur?" - or something different?

==>> yes, my question is, why tools produce these errors, and does it has any effect in manipulating the code coverage?
more over the command I have ran exists with 1 even after using -rc and --ignore-errors.
can we exit the command gracefully?

Looks like you are using gcc/11.4.1.
Do you know if your kernel was compiled with the same version?

=====>> yes I have compiled with same kernel version

more over the command I have ran exists with 1 even after using -rc and --ignore-errors.

Your command line above does not appear to use either --ignore-errors ... or --rc ... - although perhaps you mean that you added some controls to your lcovrc file (however, the log above makes me believe that you did not edit your lcovrc file).

What does appear in your command line is --keep-going - which tells the tool to continue after error (not stop).
However: it will still return a non-zero exit code if any errors happened. (We want that behaviour in our jenkins - for fairly obvious reasons, I think.)
See the man pages regarding the --ignore-errors and --keep-going options.

With respect to "... does it [have] any effect .. [on] code coverage?"

  • yes. see the explanations above.
  • however, if you verified your build environment, know that your libraries and version are 100% consistent, and are pretty sure that the errors are innocuous: then you can tell the tool to ignore the issues, and to either delete or set to zero the offending coverpoints.

If you choose that route - and if your application is important/you require a high degree of confidence for your embedded system or critical application, then I would take a careful look at the coverage reports to verify that the data makes sense.
For example, you do not expect to see:

  • coverpoints on blank source code lines
  • branches on lines which do not contain conditionals
  • different hit counts on straight-line code in the same basic block
  • ... and so on.

Actually - I see that there is a discussion of some of the same issues you see, in #185.
You might want to read that one over as well.

I don't think there is an lcov bug here - or, if there is a bug, I am not sure what it is.

In the spirit of cleaning up the issue list, could you either add a testcase which reproduces the problem if you think that there is an lcov bug here, or go ahead and close this issue if you think that this was not a bug (or is a gcc rather than lcov issue).

Closing this issue now.
Existing cases work as expected.

If there is still a problem, please either reopen this issue or file a new one. Please include a testcase which illustrates the bug.