V8 Project
v8::CounterMap Class Reference

#include <d8.h>

+ Collaboration diagram for v8::CounterMap:

Classes

class  Iterator
 

Public Member Functions

 CounterMap ()
 
CounterLookup (const char *name)
 
void Set (const char *name, Counter *value)
 

Static Private Member Functions

static int Hash (const char *name)
 
static bool Match (void *key1, void *key2)
 

Private Attributes

i::HashMap hash_map_
 

Detailed Description

Definition at line 57 of file d8.h.

Constructor & Destructor Documentation

◆ CounterMap()

v8::CounterMap::CounterMap ( )
inline

Definition at line 59 of file d8.h.

59 : hash_map_(Match) { }
static bool Match(void *key1, void *key2)
Definition: d8.cc:166
i::HashMap hash_map_
Definition: d8.h:92

Member Function Documentation

◆ Hash()

int v8::CounterMap::Hash ( const char *  name)
staticprivate

Definition at line 735 of file d8.cc.

735  {
736  int h = 0;
737  int c;
738  while ((c = *name++) != 0) {
739  h += h << 5;
740  h += c;
741  }
742  return h;
743 }
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 Lookup(), and Set().

+ Here is the caller graph for this function:

◆ Lookup()

Counter* v8::CounterMap::Lookup ( const char *  name)
inline

Definition at line 60 of file d8.h.

60  {
61  i::HashMap::Entry* answer = hash_map_.Lookup(
62  const_cast<char*>(name),
63  Hash(name),
64  false);
65  if (!answer) return NULL;
66  return reinterpret_cast<Counter*>(answer->value);
67  }
static int Hash(const char *name)
Definition: d8.cc:735
Entry * Lookup(void *key, uint32_t hash, bool insert, AllocationPolicy allocator=AllocationPolicy())
Definition: hashmap.h:114
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

References Hash(), hash_map_, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), name, and NULL.

+ Here is the call graph for this function:

◆ Match()

bool v8::CounterMap::Match ( void *  key1,
void *  key2 
)
staticprivate

Definition at line 166 of file d8.cc.

166  {
167  const char* name1 = reinterpret_cast<const char*>(key1);
168  const char* name2 = reinterpret_cast<const char*>(key2);
169  return strcmp(name1, name2) == 0;
170 }

◆ Set()

void v8::CounterMap::Set ( const char *  name,
Counter value 
)
inline

Definition at line 68 of file d8.h.

68  {
69  i::HashMap::Entry* answer = hash_map_.Lookup(
70  const_cast<char*>(name),
71  Hash(name),
72  true);
73  DCHECK(answer != NULL);
74  answer->value = value;
75  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, Hash(), hash_map_, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), name, and NULL.

+ Here is the call graph for this function:

Member Data Documentation

◆ hash_map_

i::HashMap v8::CounterMap::hash_map_
private

Definition at line 92 of file d8.h.

Referenced by Lookup(), and Set().


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