Skip to content

Commit fa3529d

Browse files
committed
fix: call macros directly
1 parent 5427916 commit fa3529d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

core/include/measurement.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ inline void measurement_set_metadata() {
4646
}
4747

4848
__attribute__((always_inline)) inline void measurement_start() {
49-
CALLGRIND_ZERO_STATS;
50-
CALLGRIND_START_INSTRUMENTATION;
49+
// CALLGRIND_ZERO_STATS;
50+
// CALLGRIND_START_INSTRUMENTATION;
5151
}
5252

5353
__attribute__((always_inline)) inline void measurement_stop() {
54-
CALLGRIND_STOP_INSTRUMENTATION;
54+
// CALLGRIND_STOP_INSTRUMENTATION;
5555
};
5656

5757
inline void measurement_set_executed(const std::string& name) {

google_benchmark/include/benchmark/benchmark.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,8 @@ struct State::StateIterator {
10651065
bool operator!=(StateIterator const&) const {
10661066
if (BENCHMARK_BUILTIN_EXPECT(cached_ != 0, true)) return true;
10671067
#ifdef CODSPEED_INSTRUMENTATION
1068+
CALLGRIND_STOP_INSTRUMENTATION;
1069+
10681070
if (parent_->codspeed_ != NULL) {
10691071
measurement_stop();
10701072
parent_->codspeed_->end_benchmark();
@@ -1089,6 +1091,9 @@ inline BENCHMARK_ALWAYS_INLINE State::StateIterator State::end() {
10891091
this->codspeed_->start_benchmark(name_);
10901092
measurement_start();
10911093
}
1094+
1095+
CALLGRIND_ZERO_STATS;
1096+
CALLGRIND_START_INSTRUMENTATION;
10921097
#endif
10931098
return StateIterator();
10941099
}

0 commit comments

Comments
 (0)