File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -52,17 +52,13 @@ __attribute__((always_inline)) inline void measurement_start() {
52
52
CALLGRIND_START_INSTRUMENTATION;
53
53
}
54
54
55
+ void measurement_stop_outline (const std::string& name)
56
+ __attribute__((noinline));
57
+
55
58
__attribute__ ((always_inline)) inline void measurement_stop(
56
59
const std::string& name) {
57
60
CALLGRIND_STOP_INSTRUMENTATION;
58
- instrument_hooks_stop_benchmark (get_hooks ());
59
-
60
- #ifdef _WIN32
61
- auto current_pid = _getpid ();
62
- #else
63
- auto current_pid = getpid ();
64
- #endif
65
- instrument_hooks_executed_benchmark (get_hooks (), current_pid, name.c_str ());
61
+ measurement_stop_outline (name);
66
62
};
67
63
#else
68
64
// Stub implementations for non-instrumentation builds
Original file line number Diff line number Diff line change
1
+ #include " measurement.hpp"
2
+
3
+ __attribute__ ((noinline)) void measurement_stop_outline(
4
+ const std::string& name) {
5
+ instrument_hooks_stop_benchmark (get_hooks ());
6
+
7
+ #ifdef _WIN32
8
+ auto current_pid = _getpid ();
9
+ #else
10
+ auto current_pid = getpid ();
11
+ #endif
12
+ instrument_hooks_executed_benchmark (get_hooks (), current_pid, name.c_str ());
13
+ }
You can’t perform that action at this time.
0 commit comments