You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/03/04 05:12:59 UTC

[kudu-CR] Fix and improve code coverage

Hello Adar Dembo,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/2448

to review the following change.

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
---
M CMakeLists.txt
M README.adoc
M build-support/jenkins/build-and-test.sh
A build-support/llvm-gcov-wrapper
M src/kudu/util/logging.cc
5 files changed, 97 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/2448/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0273fe095d8f160f0068ec421fceb54eda588de
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>