V8 Project
v8::internal::Counter Class Reference

#include <instrument-arm64.h>

+ Collaboration diagram for v8::internal::Counter:

Public Member Functions

 Counter (const char *name, CounterType type=Gauge)
 
void Increment ()
 
void Enable ()
 
void Disable ()
 
bool IsEnabled ()
 
uint64_t count ()
 
const char * name ()
 
CounterType type ()
 

Private Attributes

char name_ [kCounterNameMaxLength]
 
uint64_t count_
 
bool enabled_
 
CounterType type_
 

Detailed Description

Definition at line 33 of file instrument-arm64.h.

Constructor & Destructor Documentation

◆ Counter()

v8::internal::Counter::Counter ( const char *  name,
CounterType  type = Gauge 
)
explicit

Definition at line 10 of file instrument-arm64.cc.

11  : count_(0), enabled_(false), type_(type) {
12  DCHECK(name != NULL);
13  strncpy(name_, name, kCounterNameMaxLength);
14 }
char name_[kCounterNameMaxLength]
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
Definition: logging.h:205
const int kCounterNameMaxLength

References DCHECK, v8::internal::kCounterNameMaxLength, name(), name_, and NULL.

+ Here is the call graph for this function:

Member Function Documentation

◆ count()

uint64_t v8::internal::Counter::count ( )

Definition at line 39 of file instrument-arm64.cc.

39  {
40  uint64_t result = count_;
41  if (type_ == Gauge) {
42  // If the counter is a Gauge, reset the count after reading.
43  count_ = 0;
44  }
45  return result;
46 }

References count_, v8::internal::Gauge, and type_.

Referenced by v8::internal::Instrument::DumpEventMarker(), and v8::internal::Instrument::Update().

+ Here is the caller graph for this function:

◆ Disable()

void v8::internal::Counter::Disable ( )

Definition at line 22 of file instrument-arm64.cc.

22  {
23  enabled_ = false;
24 }

References enabled_.

◆ Enable()

void v8::internal::Counter::Enable ( )

Definition at line 17 of file instrument-arm64.cc.

17  {
18  enabled_ = true;
19 }

References enabled_.

◆ Increment()

void v8::internal::Counter::Increment ( )

Definition at line 32 of file instrument-arm64.cc.

32  {
33  if (enabled_) {
34  count_++;
35  }
36 }

References count_, and enabled_.

Referenced by v8::internal::Instrument::InstrumentLoadStore(), v8::internal::Instrument::InstrumentLoadStorePair(), and v8::internal::Instrument::Update().

+ Here is the caller graph for this function:

◆ IsEnabled()

bool v8::internal::Counter::IsEnabled ( )

Definition at line 27 of file instrument-arm64.cc.

27  {
28  return enabled_;
29 }

References enabled_.

Referenced by v8::internal::Instrument::Update().

+ Here is the caller graph for this function:

◆ name()

const char * v8::internal::Counter::name ( )

Definition at line 49 of file instrument-arm64.cc.

49  {
50  return name_;
51 }

References name_.

Referenced by Counter().

+ Here is the caller graph for this function:

◆ type()

CounterType v8::internal::Counter::type ( )

Definition at line 54 of file instrument-arm64.cc.

54  {
55  return type_;
56 }

References type_.

Referenced by v8::internal::Instrument::Update().

+ Here is the caller graph for this function:

Member Data Documentation

◆ count_

uint64_t v8::internal::Counter::count_
private

Definition at line 47 of file instrument-arm64.h.

Referenced by count(), and Increment().

◆ enabled_

bool v8::internal::Counter::enabled_
private

Definition at line 48 of file instrument-arm64.h.

Referenced by Disable(), Enable(), Increment(), and IsEnabled().

◆ name_

char v8::internal::Counter::name_[kCounterNameMaxLength]
private

Definition at line 46 of file instrument-arm64.h.

Referenced by Counter(), and name().

◆ type_

CounterType v8::internal::Counter::type_
private

Definition at line 49 of file instrument-arm64.h.

Referenced by count(), and type().


The documentation for this class was generated from the following files: