V8 Project
v8::internal::CodeAddressMap::NameMap Class Reference
+ Collaboration diagram for v8::internal::CodeAddressMap::NameMap:

Public Member Functions

 NameMap ()
 
 ~NameMap ()
 
void Insert (Address code_address, const char *name, int name_size)
 
const char * Lookup (Address code_address)
 
void Remove (Address code_address)
 
void Move (Address from, Address to)
 

Private Member Functions

HashMap::Entry * FindOrCreateEntry (Address code_address)
 
HashMap::Entry * FindEntry (Address code_address)
 
void RemoveEntry (HashMap::Entry *entry)
 
 DISALLOW_COPY_AND_ASSIGN (NameMap)
 

Static Private Member Functions

static char * CopyName (const char *name, int name_size)
 

Private Attributes

HashMap impl_
 

Detailed Description

Definition at line 511 of file serialize.cc.

Constructor & Destructor Documentation

◆ NameMap()

v8::internal::CodeAddressMap::NameMap::NameMap ( )
inline

Definition at line 513 of file serialize.cc.

◆ ~NameMap()

v8::internal::CodeAddressMap::NameMap::~NameMap ( )
inline

Definition at line 515 of file serialize.cc.

515  {
516  for (HashMap::Entry* p = impl_.Start(); p != NULL; p = impl_.Next(p)) {
517  DeleteArray(static_cast<const char*>(p->value));
518  }
519  }
Entry * Next(Entry *p) const
Definition: hashmap.h:226
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
void DeleteArray(T *array)
Definition: allocation.h:68

References v8::internal::DeleteArray(), impl_, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Next(), NULL, and v8::internal::TemplateHashMapImpl< AllocationPolicy >::Start().

+ Here is the call graph for this function:

Member Function Documentation

◆ CopyName()

static char* v8::internal::CodeAddressMap::NameMap::CopyName ( const char *  name,
int  name_size 
)
inlinestaticprivate

Definition at line 553 of file serialize.cc.

553  {
554  char* result = NewArray<char>(name_size + 1);
555  for (int i = 0; i < name_size; ++i) {
556  char c = name[i];
557  if (c == '\0') c = ' ';
558  result[i] = c;
559  }
560  result[name_size] = '\0';
561  return result;
562  }
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 Insert().

+ Here is the caller graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::CodeAddressMap::NameMap::DISALLOW_COPY_AND_ASSIGN ( NameMap  )
private

◆ FindEntry()

HashMap::Entry* v8::internal::CodeAddressMap::NameMap::FindEntry ( Address  code_address)
inlineprivate

Definition at line 568 of file serialize.cc.

568  {
569  return impl_.Lookup(code_address,
570  ComputePointerHash(code_address),
571  false);
572  }
Entry * Lookup(void *key, uint32_t hash, bool insert, AllocationPolicy allocator=AllocationPolicy())
Definition: hashmap.h:114
uint32_t ComputePointerHash(void *ptr)
Definition: utils.h:274

References v8::internal::ComputePointerHash(), impl_, and v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup().

Referenced by Lookup(), Move(), and Remove().

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

◆ FindOrCreateEntry()

HashMap::Entry* v8::internal::CodeAddressMap::NameMap::FindOrCreateEntry ( Address  code_address)
inlineprivate

Definition at line 564 of file serialize.cc.

564  {
565  return impl_.Lookup(code_address, ComputePointerHash(code_address), true);
566  }

References v8::internal::ComputePointerHash(), impl_, and v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup().

Referenced by Insert(), and Move().

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

◆ Insert()

void v8::internal::CodeAddressMap::NameMap::Insert ( Address  code_address,
const char *  name,
int  name_size 
)
inline

Definition at line 521 of file serialize.cc.

521  {
522  HashMap::Entry* entry = FindOrCreateEntry(code_address);
523  if (entry->value == NULL) {
524  entry->value = CopyName(name, name_size);
525  }
526  }
static char * CopyName(const char *name, int name_size)
Definition: serialize.cc:553
HashMap::Entry * FindOrCreateEntry(Address code_address)
Definition: serialize.cc:564

References CopyName(), FindOrCreateEntry(), name, and NULL.

Referenced by v8::internal::CodeAddressMap::LogRecordedBuffer().

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

◆ Lookup()

const char* v8::internal::CodeAddressMap::NameMap::Lookup ( Address  code_address)
inline

Definition at line 528 of file serialize.cc.

528  {
529  HashMap::Entry* entry = FindEntry(code_address);
530  return (entry != NULL) ? static_cast<const char*>(entry->value) : NULL;
531  }
HashMap::Entry * FindEntry(Address code_address)
Definition: serialize.cc:568

References FindEntry(), and NULL.

Referenced by v8::internal::CodeAddressMap::Lookup().

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

◆ Move()

void v8::internal::CodeAddressMap::NameMap::Move ( Address  from,
Address  to 
)
inline

Definition at line 541 of file serialize.cc.

541  {
542  if (from == to) return;
543  HashMap::Entry* from_entry = FindEntry(from);
544  DCHECK(from_entry != NULL);
545  void* value = from_entry->value;
546  RemoveEntry(from_entry);
547  HashMap::Entry* to_entry = FindOrCreateEntry(to);
548  DCHECK(to_entry->value == NULL);
549  to_entry->value = value;
550  }
void RemoveEntry(HashMap::Entry *entry)
Definition: serialize.cc:574
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 only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, FindEntry(), FindOrCreateEntry(), NULL, RemoveEntry(), and to().

Referenced by v8::internal::CodeAddressMap::CodeMoveEvent().

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

◆ Remove()

void v8::internal::CodeAddressMap::NameMap::Remove ( Address  code_address)
inline

Definition at line 533 of file serialize.cc.

533  {
534  HashMap::Entry* entry = FindEntry(code_address);
535  if (entry != NULL) {
536  DeleteArray(static_cast<char*>(entry->value));
537  RemoveEntry(entry);
538  }
539  }

References v8::internal::DeleteArray(), FindEntry(), NULL, and RemoveEntry().

Referenced by v8::internal::CodeAddressMap::CodeDeleteEvent().

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

◆ RemoveEntry()

void v8::internal::CodeAddressMap::NameMap::RemoveEntry ( HashMap::Entry *  entry)
inlineprivate

Definition at line 574 of file serialize.cc.

574  {
575  impl_.Remove(entry->key, entry->hash);
576  }
void * Remove(void *key, uint32_t hash)
Definition: hashmap.h:145

References impl_, and v8::internal::TemplateHashMapImpl< AllocationPolicy >::Remove().

Referenced by Move(), and Remove().

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

Member Data Documentation

◆ impl_

HashMap v8::internal::CodeAddressMap::NameMap::impl_
private

Definition at line 578 of file serialize.cc.

Referenced by FindEntry(), FindOrCreateEntry(), RemoveEntry(), and ~NameMap().


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