V8 Project
v8::internal::StatsCounter Class Reference

#include <counters.h>

+ Collaboration diagram for v8::internal::StatsCounter:

Public Member Functions

 StatsCounter ()
 
 StatsCounter (Isolate *isolate, const char *name)
 
void Set (int value)
 
void Increment ()
 
void Increment (int value)
 
void Decrement ()
 
void Decrement (int value)
 
bool Enabled ()
 
intGetInternalPointer ()
 
void Reset ()
 

Protected Member Functions

intGetPtr ()
 

Private Member Functions

intFindLocationInStatsTable () const
 

Private Attributes

Isolateisolate_
 
const char * name_
 
intptr_
 
bool lookup_done_
 

Detailed Description

Definition at line 96 of file counters.h.

Constructor & Destructor Documentation

◆ StatsCounter() [1/2]

v8::internal::StatsCounter::StatsCounter ( )
inline

Definition at line 98 of file counters.h.

98 { }

◆ StatsCounter() [2/2]

v8::internal::StatsCounter::StatsCounter ( Isolate isolate,
const char *  name 
)
inlineexplicit

Definition at line 99 of file counters.h.

100  : isolate_(isolate), name_(name), ptr_(NULL), lookup_done_(false) { }
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 expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
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

Member Function Documentation

◆ Decrement() [1/2]

void v8::internal::StatsCounter::Decrement ( )
inline

Definition at line 121 of file counters.h.

121  {
122  int* loc = GetPtr();
123  if (loc) (*loc)--;
124  }

References GetPtr().

+ Here is the call graph for this function:

◆ Decrement() [2/2]

void v8::internal::StatsCounter::Decrement ( int  value)
inline

Definition at line 126 of file counters.h.

126  {
127  int* loc = GetPtr();
128  if (loc) (*loc) -= value;
129  }

References GetPtr().

+ Here is the call graph for this function:

◆ Enabled()

bool v8::internal::StatsCounter::Enabled ( )
inline

Definition at line 133 of file counters.h.

133  {
134  return GetPtr() != NULL;
135  }

References GetPtr(), and NULL.

Referenced by v8::internal::AddCounter(), v8::internal::HGraphBuilder::AddIncrementCounter(), and v8::internal::GetInternalPointer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindLocationInStatsTable()

int * v8::internal::StatsCounter::FindLocationInStatsTable ( ) const
private

Definition at line 20 of file counters.cc.

20  {
22 }
StatsTable * stats_table()
Definition: isolate.cc:2039
int * FindLocation(const char *name)
Definition: counters.h:51

References v8::internal::StatsTable::FindLocation(), isolate_, name_, and v8::internal::Isolate::stats_table().

Referenced by GetPtr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInternalPointer()

int* v8::internal::StatsCounter::GetInternalPointer ( )
inline

Definition at line 140 of file counters.h.

140  {
141  int* loc = GetPtr();
142  DCHECK(loc != NULL);
143  return loc;
144  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, GetPtr(), and NULL.

Referenced by v8::internal::AddCounter(), and v8::internal::GetInternalPointer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPtr()

int* v8::internal::StatsCounter::GetPtr ( )
inlineprotected

Definition at line 151 of file counters.h.

151  {
152  if (lookup_done_) return ptr_;
153  lookup_done_ = true;
155  return ptr_;
156  }
int * FindLocationInStatsTable() const
Definition: counters.cc:20

References FindLocationInStatsTable(), lookup_done_, and ptr_.

Referenced by Decrement(), Enabled(), GetInternalPointer(), Increment(), and Set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Increment() [1/2]

void v8::internal::StatsCounter::Increment ( )
inline

Definition at line 109 of file counters.h.

109  {
110  int* loc = GetPtr();
111  if (loc) (*loc)++;
112  }

References GetPtr().

+ Here is the call graph for this function:

◆ Increment() [2/2]

void v8::internal::StatsCounter::Increment ( int  value)
inline

Definition at line 114 of file counters.h.

114  {
115  int* loc = GetPtr();
116  if (loc)
117  (*loc) += value;
118  }

References GetPtr().

+ Here is the call graph for this function:

◆ Reset()

void v8::internal::StatsCounter::Reset ( )
inline

Definition at line 147 of file counters.h.

147 { lookup_done_ = false; }

References lookup_done_.

◆ Set()

void v8::internal::StatsCounter::Set ( int  value)
inline

Definition at line 103 of file counters.h.

103  {
104  int* loc = GetPtr();
105  if (loc) *loc = value;
106  }

References GetPtr().

+ Here is the call graph for this function:

Member Data Documentation

◆ isolate_

Isolate* v8::internal::StatsCounter::isolate_
private

Definition at line 161 of file counters.h.

Referenced by FindLocationInStatsTable().

◆ lookup_done_

bool v8::internal::StatsCounter::lookup_done_
private

Definition at line 164 of file counters.h.

Referenced by GetPtr(), and Reset().

◆ name_

const char* v8::internal::StatsCounter::name_
private

Definition at line 162 of file counters.h.

Referenced by FindLocationInStatsTable().

◆ ptr_

int* v8::internal::StatsCounter::ptr_
private

Definition at line 163 of file counters.h.

Referenced by GetPtr().


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