Page History
...
- Setup a RHEL 6.3 (or 6.4, or 6.5) image capable of building the kernel and Lustre source code. Use a disk image with at least 24 GB.
- gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4). gcc that is packaged with EL 6.5 also works.
- install git
- Install Clang and LLVM. RPMs are available from elrepo. Clang/LLVM version 3.0 has good parity with gcc-4.4. Parity with gcc-4.4 is important as gcc is used during the analysis.
llvm-devel-3.0-5.el6.elrepo.x86_64
- llvm-libs-3.0-5.el6.elrepo.x86_64
- llvm-doc-3.0-5.el6.elrepo.noarch
- llvm-3.0-5.el6.elrepo.x86_64
- clang-devel-3.0-5.el6.elrepo.x86_64
- clang-3.0-5.el6.elrepo.x86_64
- clang-analyzer-3.0-5.el6.elrepo.x86_64
clang-doc-3.0-5.el6.elrepo.noarch
Info title elrepo-extras Once elrepo is available as a repo, only the main channel is available by default. To install llvm and clang you need the elrepo-extras repo. This can be enabled by including
--enablerepo=elrepo-extras
in your yum command.
- Download lustre-static-analysis Clang plugin sources:
git clone httpclone ssh://git<user>@review.whamcloud.com:29418/tools/lustre-static-analysis.git
- Make the contents of Endian, DeclUse and Utils directories.
...
For the purposes of static analysis provided by the Clang plugin, the file.o._Ref
are intermediate file and not of general interest. The files of interest are contained in the directory DeclUse-2.5.60-40-g*/
. Useful file include:
File name | Description |
---|---|
Err | Errors reported by the Clang compiler. |
GetOnly | Structure members that are read somewhere but never set. |
MacroUnused | Macros that are never used. |
SetOnly | Structure members that are set somewhere but never read. |
Undefined | Variables that are never defined. |
Gotchas
- The static usage tracker is confused by disconnected declarations.
Overview
Content Tools