Todd Lipcon has submitted this change and it was merged.

Change subject: Fix and improve code coverage
......................................................................


Fix and improve code coverage

- Switches the build to use clang coverage instead of gcc.

  Now that we have a reasonably up-to-date clang, this actually works better
  than gcc's coverage, and provides a more standard compiler that we know
  everyone will have. I suspect that the coverage implementation may be
  slightly lower overhead in clang as well, but couldn't find any public
  benchmarks.

  Another big advantage of clang coverage is that it properly chains together
  the 'flush' calls across multiple shared objects. So, we can now use the
  shared library debug build instead of static-linked one, decreasing
  compile times for the coverage build.

- Adds a simple wrapper for 'llvm-cov gcov' because the clang coverage output
  isn't 100% compatible with gcov's. 'gcovr' requires the wrapper script in
  order to use llvm-cov.

- Changes our glog setup code to add hooks to flush coverage on crash or on
  LOG(FATAL). I verified by running some coverage builds that this now includes
  coverage data for files like fault_injection.cc which only run just before a
  LOG(FATAL). This increased our measured coverage by a percentage point or
  two.

Change-Id: If0273fe095d8f160f0068ec421fceb54eda588de
Reviewed-on: http://gerrit.cloudera.org:8080/2448
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
M CMakeLists.txt
M README.adoc
M build-support/jenkins/build-and-test.sh
A build-support/llvm-gcov-wrapper
M src/kudu/server/generic_service.cc
M src/kudu/util/debug-util.cc
M src/kudu/util/debug-util.h
M src/kudu/util/logging.cc
8 files changed, 148 insertions(+), 41 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/2448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If0273fe095d8f160f0068ec421fceb54eda588de
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to