V8 Project
v8::internal::Histogram Class Reference

#include <counters.h>

+ Inheritance diagram for v8::internal::Histogram:
+ Collaboration diagram for v8::internal::Histogram:

Public Member Functions

 Histogram ()
 
 Histogram (const char *name, int min, int max, int num_buckets, Isolate *isolate)
 
void AddSample (int sample)
 
bool Enabled ()
 
void Reset ()
 

Protected Member Functions

void * GetHistogram ()
 
const char * name ()
 
Isolateisolate () const
 

Private Member Functions

void * CreateHistogram () const
 

Private Attributes

const char * name_
 
int min_
 
int max_
 
int num_buckets_
 
void * histogram_
 
bool lookup_done_
 
Isolateisolate_
 

Detailed Description

Definition at line 169 of file counters.h.

Constructor & Destructor Documentation

◆ Histogram() [1/2]

v8::internal::Histogram::Histogram ( )
inline

Definition at line 171 of file counters.h.

171 { }

◆ Histogram() [2/2]

v8::internal::Histogram::Histogram ( const char *  name,
int  min,
int  max,
int  num_buckets,
Isolate isolate 
)
inline

Definition at line 172 of file counters.h.

177  : name_(name),
178  min_(min),
179  max_(max),
180  num_buckets_(num_buckets),
181  histogram_(NULL),
182  lookup_done_(false),
183  isolate_(isolate) { }
const char * name()
Definition: counters.h:208
Isolate * isolate() const
Definition: counters.h:209
const char * name_
Definition: counters.h:214
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
static int min(int a, int b)
Definition: liveedit.cc:273

Member Function Documentation

◆ AddSample()

void v8::internal::Histogram::AddSample ( int  sample)

Definition at line 25 of file counters.cc.

25  {
26  if (Enabled()) {
28  }
29 }
StatsTable * stats_table()
Definition: isolate.cc:2039
void AddHistogramSample(void *histogram, int sample)
Definition: counters.h:71

References v8::internal::StatsTable::AddHistogramSample(), Enabled(), histogram_, isolate(), and v8::internal::Isolate::stats_table().

Referenced by v8::internal::HistogramTimer::Stop().

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

◆ CreateHistogram()

void * v8::internal::Histogram::CreateHistogram ( ) const
private

Definition at line 31 of file counters.cc.

31  {
32  return isolate()->stats_table()->
34 }
void * CreateHistogram() const
Definition: counters.cc:31

References isolate(), max_, min_, name_, num_buckets_, and v8::internal::Isolate::stats_table().

Referenced by GetHistogram().

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

◆ Enabled()

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

Definition at line 189 of file counters.h.

189  {
190  return GetHistogram() != NULL;
191  }

References GetHistogram(), and NULL.

Referenced by AddSample(), v8::internal::HistogramTimer::Running(), v8::internal::HistogramTimer::Start(), and v8::internal::HistogramTimer::Stop().

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

◆ GetHistogram()

void* v8::internal::Histogram::GetHistogram ( )
inlineprotected

Definition at line 200 of file counters.h.

200  {
201  if (!lookup_done_) {
202  lookup_done_ = true;
204  }
205  return histogram_;
206  }

References CreateHistogram(), histogram_, and lookup_done_.

Referenced by Enabled().

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

◆ isolate()

Isolate* v8::internal::Histogram::isolate ( ) const
inlineprotected

Definition at line 209 of file counters.h.

209 { return isolate_; }

References isolate_.

Referenced by AddSample(), CreateHistogram(), v8::internal::HistogramTimer::Start(), and v8::internal::HistogramTimer::Stop().

+ Here is the caller graph for this function:

◆ name()

const char* v8::internal::Histogram::name ( )
inlineprotected

Definition at line 208 of file counters.h.

208 { return name_; }

References name_.

Referenced by v8::internal::HistogramTimer::Start(), and v8::internal::HistogramTimer::Stop().

+ Here is the caller graph for this function:

◆ Reset()

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

Definition at line 194 of file counters.h.

194  {
195  lookup_done_ = false;
196  }

References lookup_done_.

Member Data Documentation

◆ histogram_

void* v8::internal::Histogram::histogram_
private

Definition at line 218 of file counters.h.

Referenced by AddSample(), and GetHistogram().

◆ isolate_

Isolate* v8::internal::Histogram::isolate_
private

Definition at line 220 of file counters.h.

Referenced by isolate().

◆ lookup_done_

bool v8::internal::Histogram::lookup_done_
private

Definition at line 219 of file counters.h.

Referenced by GetHistogram(), and Reset().

◆ max_

int v8::internal::Histogram::max_
private

Definition at line 216 of file counters.h.

Referenced by CreateHistogram().

◆ min_

int v8::internal::Histogram::min_
private

Definition at line 215 of file counters.h.

Referenced by CreateHistogram().

◆ name_

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

Definition at line 214 of file counters.h.

Referenced by CreateHistogram(), and name().

◆ num_buckets_

int v8::internal::Histogram::num_buckets_
private

Definition at line 217 of file counters.h.

Referenced by CreateHistogram().


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