blob: c8c06d295041ba83cde4925a312d8384b76e082a [file] [log] [blame]
Ben Murdochc5610432016-08-08 18:44:38 +01001// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_COUNTERS_INL_H_
6#define V8_COUNTERS_INL_H_
7
8#include "src/counters.h"
9
10namespace v8 {
11namespace internal {
12
13RuntimeCallTimerScope::RuntimeCallTimerScope(
14 HeapObject* heap_object, RuntimeCallStats::CounterId counter_id) {
15 if (V8_UNLIKELY(FLAG_runtime_call_stats)) {
16 isolate_ = heap_object->GetIsolate();
17 RuntimeCallStats::Enter(isolate_, &timer_, counter_id);
18 }
19}
20
21} // namespace internal
22} // namespace v8
23
24#endif // V8_COUNTERS_INL_H_