Debugging

From Pheet
Jump to: navigation, search

While developing a program with Pheet it is recommended to enable the debug mode for Pheet by defining #define PHEET_DEBUG_MODE before including the Pheet headers. This enables all types of assertions in the Pheet framework that greatly simplify tracking of concurrency bugs. If an assertion in Pheet triggers, please check the List of Common Assertions in Pheet, which explains common reasons for the triggering of these assertions. Feel free to add assertions missing in that list, we will try to add an explanation. In case you implement new components for Pheet, please use pheet_assert instead of the normal C/C++ assert to trigger assertions.

Assertions should be disabled for production mode, since they put a great strain on program performance.

Pheet Benchmarks

When debugging the Pheet benchmarks, make sure that you disable all optimizations in the settings.mk file (On GCC and compatible compilers: OPTIMIZATION = -O0 -g). For performance measurements, all common optimizations should be enabled (On GCC and compatible compilers: OPTIMIZATION = -O3). Some rare concurrency bugs may only occur when some optimizations are enabled (this might occur in case you implement your own scheduler or scheduling data-structures). In this case try enabling more and more optimizations until the bug occurs.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools