Skip to content

Commit

Permalink
Prepare release 1.8 (#124)
Browse files Browse the repository at this point in the history
* Bump version number
* Remove CMake lit helper
* Update readme
  • Loading branch information
ahueck authored May 2, 2022
1 parent 573f2c8 commit 6d40367
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 58 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.20)

project(typeart
VERSION 1.7
VERSION 1.8
HOMEPAGE_URL https://github.com/tudasc/TypeART
DESCRIPTION "LLVM-based type and memory allocation tracking sanitizer"
)
Expand Down
64 changes: 41 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ MPI_Send((void*) array, length, MPI_DOUBLE, ...)
MUST and TypeART also handle MPI [derived datatypes](https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node77.htm)
with complex underlying data structures, see our [MPI Demo](#13-example-mpi-demo). For more details, see
our [publications](#references), or download the current release (1.8 or higher) of MUST on
our [publications](#references), or download the current release of MUST (1.8 or higher has TypeART integrated) on
its [project page](https://itc.rwth-aachen.de/must/).
## Table of Contents
Expand Down Expand Up @@ -85,6 +85,9 @@ around Clang and MPI to apply TypeART in the `bin` folder of the TypeART install
instrument heap, stack and global allocations. The MPI-wrappers also filter allocations that are not passed to an MPI
call, see [Section 1.1.4](#114-filtering-allocations).
*Note*: Currently, the compilation process has to be serialied, e.g., `make -j 1`, due to extraction and consistency of
type information per translation unit.
#### 1.1.1 Building with TypeART
A typical compile invocation may first compile code to object files and then link with any libraries:
Expand Down Expand Up @@ -131,6 +134,20 @@ $> TYPEART_WRAPPER=OFF cmake -B build -DCMAKE_C_COMPILER=*TypeART bin*/typeart-c
$> cmake --build build --target install
```

##### MPI wrapper generation

For MPI, we rely on detecting the vendor to generate wrappers with appropriate environment variables to force the use of
the Clang/LLVM compiler.
We support detection for OpenMPI, Intel MPI and MPICH based on `mpi.h` symbols, and use the following flags for setting
the Clang
compiler:

| Vendor | Symbol | C compiler env. var | C++ compiler env. var |
|-----------|---------------|----------------------|------------------------|
| Open MPI | OPEN_MPI | OMPI_CC | OMPI_CXX |
| Intel MPI | I_MPI_VERSION | I_MPI_CC | I_MPI_CXX |
| MPICH | MPICH_NAME | MPICH_CC | MPICH_CXX |

##### Internal wrapper invocation

For reference, the wrapper script executes the following (pseudo):
Expand All @@ -146,17 +163,18 @@ $> clang++ $(LINK_FLAGS) -L$(TYPEART_LIBPATH) -ltypeartRuntime code.o -o binary

For modification of the pass behavior, we provide several options.
<!--- @formatter:off --->
| Flag | Default | Description |
|-----------------------------|:------------:|--------------------------------------------------------------------------------------------|
| `typeart` | - | Invoke TypeART pass through LLVM `opt` |
| `typeart-types` | `types.yaml` | Serialized type layout information of user-defined types |
| `typeart-heap` | `true` | Instrument heap allocations |
| `typeart-stack` | `false` | Instrument stack and global allocations. Enables instrumentation of global allocations. |
| `typeart-global` | `false` | Instrument global allocations (see --typeart-stack). |
| `typeart-stats` | `false` | Show instrumentation statistic counters |
| `typeart-call-filter` | `false` | Filter stack and global allocations. See also [Section 1.1.4](#114-filtering-allocations) |
| `typeart-call-filter-str` | `*MPI_*` | Filter string target (glob string) |
| `typeart-filter-pointer-alloca` | `true` | Filter stack alloca of pointers (typically generated by LLVM for references of stack vars) |
| Flag | Default | Description |
|-----------------------------|:------------:|----------------------------------------------------------------------------------------------------------------------------------------------------|
| `typeart` | - | Invoke TypeART pass through LLVM `opt` |
| `typeart-types` | `types.yaml` | Serialized type layout information of user-defined types. File location and name can also be controlled with the env variable `TYPEART_TYPE_FILE`. |
| `typeart-heap` | `true` | Instrument heap allocations |
| `typeart-stack` | `false` | Instrument stack and global allocations. Enables instrumentation of global allocations. |
| `typeart-global` | `false` | Instrument global allocations (see --typeart-stack). |
| `typeart-stats` | `false` | Show instrumentation statistic counters |
| `typeart-call-filter` | `false` | Filter stack and global allocations. See also [Section 1.1.4](#114-filtering-allocations) |
| `typeart-call-filter-str` | `*MPI_*` | Filter string target (glob string) |
| `typeart-filter-pointer-alloca` | `true` | Filter stack alloca of pointers (typically generated by LLVM for references of stack vars) |

<!--- @formatter:on --->

##### Example invocations
Expand Down Expand Up @@ -333,12 +351,12 @@ $> cmake --build build --target install --parallel

<!--- @formatter:off --->

| Option | Default | Description |
|------------------------|:-------:|---------------------------------------------------------------------------------------------------------------------------------------|
| `TYPEART_PHMAP` | `ON` | Enable usage of a [btree-backed map](https://github.com/greg7mdp/parallel-hashmap) instead of `std::map` for storing allocation data. |
| `TYPEART_ABSEIL` | `OFF` | Enable usage of btree-backed map of the [Abseil project](https://abseil.io/) (alternative to TYPEART_PHMAP). |
| `TYPEART_SOFTCOUNTERS` | `OFF` | Enable runtime tracking of #tracked addrs. / #distinct checks / etc. |
| `TYPEART_LOG_LEVEL_RT` | `0` | Granularity of runtime logger. 3 is most verbose, 0 is least. |
| Option | Default | Description |
|------------------------|:-------:|-------------------------------------------------------------------------------------------------------------------------|
| `TYPEART_ABSEIL` | `ON` | Enable usage of btree-backed map of the [Abseil project](https://abseil.io/) (LTS release) for storing allocation data. |
| `TYPEART_PHMAP` | `OFF` | Enable usage of a [btree-backed map](https://github.com/greg7mdp/parallel-hashmap) (alternative to Abseil). |
| `TYPEART_SOFTCOUNTERS` | `OFF` | Enable runtime tracking of #tracked addrs. / #distinct checks / etc. |
| `TYPEART_LOG_LEVEL_RT` | `0` | Granularity of runtime logger. 3 is most verbose, 0 is least. |

<!--- @formatter:on --->

Expand Down Expand Up @@ -372,11 +390,11 @@ Default mode is to protect the global data structure with a (shared) mutex. Two

<!--- @formatter:off --->

| Option | Default | Description |
| --- | :---: | --- |
| `TYPEART_TEST_CONFIG` | `OFF` | Set (force) logging levels to appropriate levels for test runner to succeed |
| `TYPEART_CODE_COVERAGE` | `OFF` | Enable code coverage statistics using LCOV 1.14 and genhtml (gcovr optional) |
| `TYPEART_LLVM_CODE_COVERAGE` | `OFF` | Enable llvm-cov code coverage statistics (llvm-cov and llvm-profdata required) |
| Option | Default | Description |
| --- | :---: |--------------------------------------------------------------------------------------------------------------|
| `TYPEART_TEST_CONFIG` | `OFF` | Enable testing, and set (force) logging levels to appropriate levels for test runner to succeed |
| `TYPEART_CODE_COVERAGE` | `OFF` | Enable code coverage statistics using LCOV 1.14 and genhtml (gcovr optional) |
| `TYPEART_LLVM_CODE_COVERAGE` | `OFF` | Enable llvm-cov code coverage statistics (llvm-cov and llvm-profdata required) |
| `TYPEART_ASAN, TSAN, UBSAN` | `OFF` | Enable Clang sanitizers (tsan is mutually exclusive w.r.t. ubsan and asan as they don't play well together) |
<!--- @formatter:on --->
Expand Down
34 changes: 0 additions & 34 deletions cmake/modules/llvm-lit.cmake

This file was deleted.

0 comments on commit 6d40367

Please sign in to comment.