From owner-freebsd-questions@FreeBSD.ORG Mon Oct 6 19:48:37 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09EAFFA2 for ; Mon, 6 Oct 2014 19:48:37 +0000 (UTC) Received: from c-0500.emailmediator.com (c-0500.emailmediator.com [64.85.162.118]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9EA1EAB for ; Mon, 6 Oct 2014 19:48:36 +0000 (UTC) Received: from pool-71-170-88-63.dllstx.fios.verizon.net ([71.170.88.63] helo=reedmedia.net) by c-0500.emailmediator.com with esmtpa (Exim 4.69) (envelope-from ) id 1XbEGr-00072N-28 for freebsd-questions@freebsd.org; Mon, 06 Oct 2014 15:48:37 -0400 Received: from reed@reedmedia.net by reedmedia.net with local (mailout 0.17) id 6807-1412624916; Mon, 06 Oct 2014 14:48:36 -0500 Date: Mon, 6 Oct 2014 14:48:36 -0500 (CDT) From: "Jeremy C. Reed" X-X-Sender: reed@t1.m.reedmedia.net To: freebsd-questions@freebsd.org Subject: Re: using code coverage with clang In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (NEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2014 19:48:37 -0000 > I use the static analyzer (in the Computer Science meaning of the > term) from clang. F.ex.: > > scan-build34 -o /home/gowen/projects/gummy_project/Analyze make -j 2 > -e -f Makefile > > Runs the clang34 static analyzer and outputs a html report. Perhaps it > can help you. I have used it many times, but I don't know how it may be used to show run-time analysis of the code. (I tried again but don't see if the "static" analysis can do "dynamic" reporting.) It is useful, but not what I am looking for. Is anyone doing code coverage analysis with clang (and maybe with lcov or llvm-cov) on FreeBSD 10? Maybe some port should provide the libprofile_rt from llvm's compiler-rt? I had tried clang34 and llvm34 but missing libprofile_rt.a. I then tried clang-devel and llvm-devel which provide llvm-cov but don't have libprofile. It fails with /usr/bin/ld: /usr/local/llvm-devel/bin/../lib/clang/3.6.0/lib/freebsd/libclang_r t.profile-amd64.a: No such file: No such file or directory Where can I find that? By the way, http://www.freebsdports.info/ports/devel/llvm-devel.html shows lib/libprofile_rt.a and lib/libprofile_rt.so which I don't have with clang-devel-3.6.r218451_1 and llvm-devel-3.6.r218451. Any hints before I create a bug ticket?