V8 Project
v8::Counter Class Reference

#include <d8.h>

+ Collaboration diagram for v8::Counter:

Public Member Functions

int32_t * Bind (const char *name, bool histogram)
 
int32_t * ptr ()
 
int32_t count ()
 
int32_t sample_total ()
 
bool is_histogram ()
 
void AddSample (int32_t sample)
 

Static Public Attributes

static const int kMaxNameSize = 64
 

Private Attributes

int32_t count_
 
int32_t sample_total_
 
bool is_histogram_
 
uint8_t name_ [kMaxNameSize]
 

Detailed Description

Definition at line 23 of file d8.h.

Member Function Documentation

◆ AddSample()

void v8::Counter::AddSample ( int32_t  sample)

Definition at line 699 of file d8.cc.

699  {
700  count_++;
701  sample_total_ += sample;
702 }
int32_t count_
Definition: d8.h:33
int32_t sample_total_
Definition: d8.h:34

Referenced by v8::Shell::AddHistogramSample().

+ Here is the caller graph for this function:

◆ Bind()

int32_t * v8::Counter::Bind ( const char *  name,
bool  histogram 
)

Definition at line 689 of file d8.cc.

689  {
690  int i;
691  for (i = 0; i < kMaxNameSize - 1 && name[i]; i++)
692  name_[i] = static_cast<char>(name[i]);
693  name_[i] = '\0';
695  return ptr();
696 }
uint8_t name_[kMaxNameSize]
Definition: d8.h:36
static const int kMaxNameSize
Definition: d8.h:25
int32_t * ptr()
Definition: d8.h:27
bool is_histogram()
Definition: d8.h:30
bool is_histogram_
Definition: d8.h:35
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

References name.

Referenced by v8::Shell::GetCounter().

+ Here is the caller graph for this function:

◆ count()

int32_t v8::Counter::count ( )
inline

Definition at line 28 of file d8.h.

28 { return count_; }

References count_.

Referenced by v8::Shell::OnExit().

+ Here is the caller graph for this function:

◆ is_histogram()

bool v8::Counter::is_histogram ( )
inline

Definition at line 30 of file d8.h.

30 { return is_histogram_; }

References is_histogram_.

Referenced by v8::Shell::GetCounter(), and v8::Shell::OnExit().

+ Here is the caller graph for this function:

◆ ptr()

int32_t* v8::Counter::ptr ( )
inline

Definition at line 27 of file d8.h.

27 { return &count_; }

References count_.

Referenced by v8::Shell::LookupCounter().

+ Here is the caller graph for this function:

◆ sample_total()

int32_t v8::Counter::sample_total ( )
inline

Definition at line 29 of file d8.h.

29 { return sample_total_; }

References sample_total_.

Referenced by v8::Shell::OnExit().

+ Here is the caller graph for this function:

Member Data Documentation

◆ count_

int32_t v8::Counter::count_
private

Definition at line 33 of file d8.h.

Referenced by count(), and ptr().

◆ is_histogram_

bool v8::Counter::is_histogram_
private

Definition at line 35 of file d8.h.

Referenced by is_histogram().

◆ kMaxNameSize

const int v8::Counter::kMaxNameSize = 64
static

Definition at line 25 of file d8.h.

Referenced by v8::CounterCollection::CounterCollection().

◆ name_

uint8_t v8::Counter::name_[kMaxNameSize]
private

Definition at line 36 of file d8.h.

◆ sample_total_

int32_t v8::Counter::sample_total_
private

Definition at line 34 of file d8.h.

Referenced by sample_total().


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