ryujin
2.1.1 revision 95533c871dc56032235aa30b5a6f62cff94966b6
source
instrumentation.h
Go to the documentation of this file.
1
//
2
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3
// Copyright (C) 2020 - 2023 by the ryujin authors
4
//
5
6
#pragma once
7
8
#include "
openmp.h
"
9
10
11
#ifdef WITH_VALGRIND
12
13
#include <valgrind/callgrind.h>
14
15
#else
16
22
23
36
#define CALLGRIND_START_INSTRUMENTATION \
37
do { \
38
} while (false)
39
43
#define CALLGRIND_STOP_INSTRUMENTATION \
44
do { \
45
} while (false)
46
47
#endif
48
49
50
#ifdef WITH_LIKWID
51
#include <likwid.h>
52
53
#define LIKWID_INIT \
54
LIKWID_MARKER_INIT; \
55
RYUJIN_PARALLEL_REGION_BEGIN \
56
LIKWID_MARKER_THREADINIT; \
57
RYUJIN_PARALLEL_REGION_END
58
59
#define LIKWID_CLOSE LIKWID_MARKER_CLOSE;
60
61
#else
62
66
#define LIKWID_INIT
67
71
#define LIKWID_CLOSE
72
85
#define LIKWID_MARKER_START(opt)
86
90
#define LIKWID_MARKER_STOP(opt)
91
92
#endif
93
94
105
#define LSAN_DISABLE
106
110
#define LSAN_ENABLE
111
112
#if defined(__clang__) && defined(DEBUG)
113
#if __has_feature(address_sanitizer)
114
#include <sanitizer/lsan_interface.h>
115
#undef LSAN_DISABLE
116
#define LSAN_DISABLE __lsan_disable();
117
#undef LSAN_ENABLE
118
#define LSAN_ENABLE __lsan_enable();
119
#endif
120
#endif
121
openmp.h
Generated by
1.9.4