]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add branch coverage to our coveralls run
authorNeil Horman <nhorman@openssl.org>
Mon, 16 Jun 2025 21:35:07 +0000 (17:35 -0400)
committerNeil Horman <nhorman@openssl.org>
Fri, 20 Jun 2025 10:40:14 +0000 (06:40 -0400)
Coveralls is capable of reporting not only covered lines in a build, but
also the number of times a given branch was taken vs. not taken.  This
will help us identify locations where we might make better use of the
openssl_likely and openssl_unlikely macros to optimize branch prediction
when building openssl

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27839)

.github/workflows/coveralls.yml
Configurations/10-main.conf
Configure

index 38db01c9c1219a6123eb43a8c917e9fa6dc732c2..c3a1069a2242af14fe5001673d9f5eadc3d4c77b 100644 (file)
@@ -116,6 +116,7 @@ jobs:
              --exclude "${PWD}/fuzz/*"
              --exclude "/usr/include/*"
              --ignore-errors mismatch
+             --branch-coverage
               -o ./lcov.info
     - name: Coveralls upload
       uses: coverallsapp/github-action@v2.3.2
index 6465651507e646bb087246ceb27b1865184def36..01526cd3efd33caa70f1533715a68f2f22beff12 100644 (file)
@@ -680,8 +680,7 @@ my %targets = (
         CFLAGS           => picker(default => "-Wall",
                                    debug   => "-O0 -g",
                                    release => "-O3",
-                                   profiled => "-O3 -fprofile-generate -fprofile-arcs -fprofile-values -ftest-coverage",
-                                   pgo => "-O3 -fprofile-use -Wno-missing-profile"),
+                                   pgo => "-O3 -fprofile-use -Wno-coverage-mismatch"),
         CXXFLAGS         => picker(default => "-Wall",
                                    debug   => "-O0 -g",
                                    release => "-O3"),
index ef6ba49f6bb2aa6fda8ecb9249bed6d4e8065b01..d105cfe330726095d5972fbf6fe561807f2b69ef 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -990,10 +990,6 @@ while (@argvcopy)
                 {
                 $config{build_type} = "debug";
                 }
-        elsif (/^-p$/)
-                {
-                $config{build_type} = "profiled";
-                }
         elsif (/^-v$/)          # From older 'config'
                 {
                 $guess_opts{verbose} = 1;
@@ -1021,10 +1017,6 @@ while (@argvcopy)
                 {
                 $config{build_type} = "release";
                 }
-        elsif (/^--profiled$/)
-                {
-                $config{build_type} = "profiled";
-                }
         elsif (/^--pgo$/)
                 {
                 $config{build_type} = "pgo";