V8 Project
v8::internal::CodeEntry Class Reference

#include <profile-generator.h>

+ Collaboration diagram for v8::internal::CodeEntry:

Public Member Functions

 CodeEntry (Logger::LogEventsAndTags tag, const char *name, const char *name_prefix=CodeEntry::kEmptyNamePrefix, const char *resource_name=CodeEntry::kEmptyResourceName, int line_number=v8::CpuProfileNode::kNoLineNumberInfo, int column_number=v8::CpuProfileNode::kNoColumnNumberInfo)
 
 ~CodeEntry ()
 
bool is_js_function () const
 
const char * name_prefix () const
 
bool has_name_prefix () const
 
const char * name () const
 
const char * resource_name () const
 
int line_number () const
 
int column_number () const
 
void set_shared_id (int shared_id)
 
int script_id () const
 
void set_script_id (int script_id)
 
void set_bailout_reason (const char *bailout_reason)
 
const char * bailout_reason () const
 
List< OffsetRange > * no_frame_ranges () const
 
void set_no_frame_ranges (List< OffsetRange > *ranges)
 
void SetBuiltinId (Builtins::Name id)
 
Builtins::Name builtin_id () const
 
uint32_t GetCallUid () const
 
bool IsSameAs (CodeEntry *entry) const
 

Static Public Member Functions

static bool is_js_function_tag (Logger::LogEventsAndTags tag)
 

Static Public Attributes

static const char *const kEmptyNamePrefix = ""
 
static const char *const kEmptyResourceName = ""
 
static const char *const kEmptyBailoutReason = ""
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (CodeEntry)
 

Private Attributes

Logger::LogEventsAndTags tag_: 8
 
Builtins::Name builtin_id_: 8
 
const char * name_prefix_
 
const char * name_
 
const char * resource_name_
 
int line_number_
 
int column_number_
 
int shared_id_
 
int script_id_
 
List< OffsetRange > * no_frame_ranges_
 
const char * bailout_reason_
 

Detailed Description

Definition at line 47 of file profile-generator.h.

Constructor & Destructor Documentation

◆ CodeEntry()

v8::internal::CodeEntry::CodeEntry ( Logger::LogEventsAndTags  tag,
const char *  name,
const char *  name_prefix = CodeEntry::kEmptyNamePrefix,
const char *  resource_name = CodeEntry::kEmptyResourceName,
int  line_number = v8::CpuProfileNode::kNoLineNumberInfo,
int  column_number = v8::CpuProfileNode::kNoColumnNumberInfo 
)
inline

Definition at line 13 of file profile-generator-inl.h.

19  : tag_(tag),
22  name_(name),
26  shared_id_(0),
static const int kNoScriptId
Definition: v8.h:977
Logger::LogEventsAndTags tag_
List< OffsetRange > * no_frame_ranges_
const char * name_prefix() const
const char * resource_name() const
static const char *const kEmptyBailoutReason
const char * name() const
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

◆ ~CodeEntry()

v8::internal::CodeEntry::~CodeEntry ( )

Definition at line 140 of file profile-generator.cc.

140  {
141  delete no_frame_ranges_;
142 }

References no_frame_ranges_.

Member Function Documentation

◆ bailout_reason()

const char* v8::internal::CodeEntry::bailout_reason ( ) const
inline

Definition at line 71 of file profile-generator.h.

71 { return bailout_reason_; }

References bailout_reason_.

Referenced by v8::CpuProfileNode::GetBailoutReason(), v8::internal::ProfileNode::Print(), and set_bailout_reason().

+ Here is the caller graph for this function:

◆ builtin_id()

Builtins::Name v8::internal::CodeEntry::builtin_id ( ) const
inline

Definition at line 81 of file profile-generator.h.

81 { return builtin_id_; }

References builtin_id_.

Referenced by v8::internal::ProfileGenerator::RecordTickSample().

+ Here is the caller graph for this function:

◆ column_number()

int v8::internal::CodeEntry::column_number ( ) const
inline

Definition at line 64 of file profile-generator.h.

64 { return column_number_; }

References column_number_.

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::CodeEntry::DISALLOW_COPY_AND_ASSIGN ( CodeEntry  )
private

◆ GetCallUid()

uint32_t v8::internal::CodeEntry::GetCallUid ( ) const

Definition at line 145 of file profile-generator.cc.

145  {
147  if (shared_id_ != 0) {
148  hash ^= ComputeIntegerHash(static_cast<uint32_t>(shared_id_),
150  } else {
151  hash ^= ComputeIntegerHash(
152  static_cast<uint32_t>(reinterpret_cast<uintptr_t>(name_prefix_)),
154  hash ^= ComputeIntegerHash(
155  static_cast<uint32_t>(reinterpret_cast<uintptr_t>(name_)),
157  hash ^= ComputeIntegerHash(
158  static_cast<uint32_t>(reinterpret_cast<uintptr_t>(resource_name_)),
161  }
162  return hash;
163 }
static const uint32_t kZeroHashSeed
Definition: utils.h:245
uint32_t ComputeIntegerHash(uint32_t key, uint32_t seed)
Definition: utils.h:249

References v8::internal::ComputeIntegerHash(), v8::internal::kZeroHashSeed, line_number_, name_, name_prefix_, resource_name_, shared_id_, and tag_.

Referenced by v8::internal::ProfileNode::CodeEntryHash().

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

◆ has_name_prefix()

bool v8::internal::CodeEntry::has_name_prefix ( ) const
inline

Definition at line 60 of file profile-generator.h.

60 { return name_prefix_[0] != '\0'; }

References name_prefix_.

Referenced by v8::CpuProfileNode::GetFunctionName().

+ Here is the caller graph for this function:

◆ is_js_function()

bool v8::internal::CodeEntry::is_js_function ( ) const
inline

Definition at line 58 of file profile-generator.h.

58 { return is_js_function_tag(tag_); }
static bool is_js_function_tag(Logger::LogEventsAndTags tag)

References is_js_function_tag(), and tag_.

+ Here is the call graph for this function:

◆ is_js_function_tag()

bool v8::internal::CodeEntry::is_js_function_tag ( Logger::LogEventsAndTags  tag)
inlinestatic

Definition at line 32 of file profile-generator-inl.h.

32  {
33  return tag == Logger::FUNCTION_TAG
34  || tag == Logger::LAZY_COMPILE_TAG
35  || tag == Logger::SCRIPT_TAG
36  || tag == Logger::NATIVE_FUNCTION_TAG
37  || tag == Logger::NATIVE_LAZY_COMPILE_TAG
38  || tag == Logger::NATIVE_SCRIPT_TAG;
39 }

Referenced by is_js_function().

+ Here is the caller graph for this function:

◆ IsSameAs()

bool v8::internal::CodeEntry::IsSameAs ( CodeEntry entry) const

Definition at line 166 of file profile-generator.cc.

166  {
167  return this == entry
168  || (tag_ == entry->tag_
169  && shared_id_ == entry->shared_id_
170  && (shared_id_ != 0
171  || (name_prefix_ == entry->name_prefix_
172  && name_ == entry->name_
173  && resource_name_ == entry->resource_name_
174  && line_number_ == entry->line_number_)));
175 }

References line_number_, name_, name_prefix_, resource_name_, shared_id_, and tag_.

◆ line_number()

int v8::internal::CodeEntry::line_number ( ) const
inline

Definition at line 63 of file profile-generator.h.

63 { return line_number_; }

References line_number_.

Referenced by v8::internal::ProfileNode::Print().

+ Here is the caller graph for this function:

◆ name()

const char* v8::internal::CodeEntry::name ( ) const
inline

Definition at line 61 of file profile-generator.h.

61 { return name_; }

References name_.

Referenced by v8::internal::CodeMap::CodeTreePrinter::Call(), v8::CpuProfileNode::GetFunctionName(), and v8::internal::ProfileNode::Print().

+ Here is the caller graph for this function:

◆ name_prefix()

const char* v8::internal::CodeEntry::name_prefix ( ) const
inline

Definition at line 59 of file profile-generator.h.

59 { return name_prefix_; }

References name_prefix_.

Referenced by v8::CpuProfileNode::GetFunctionName(), and v8::internal::ProfileNode::Print().

+ Here is the caller graph for this function:

◆ no_frame_ranges()

List<OffsetRange>* v8::internal::CodeEntry::no_frame_ranges ( ) const
inline

Definition at line 75 of file profile-generator.h.

75 { return no_frame_ranges_; }

References no_frame_ranges_.

Referenced by v8::internal::ProfileGenerator::RecordTickSample().

+ Here is the caller graph for this function:

◆ resource_name()

const char* v8::internal::CodeEntry::resource_name ( ) const
inline

Definition at line 62 of file profile-generator.h.

62 { return resource_name_; }

References resource_name_.

Referenced by v8::CpuProfileNode::GetScriptResourceName(), and v8::internal::ProfileNode::Print().

+ Here is the caller graph for this function:

◆ script_id()

int v8::internal::CodeEntry::script_id ( ) const
inline

Definition at line 66 of file profile-generator.h.

66 { return script_id_; }

References script_id_.

Referenced by v8::CpuProfileNode::GetScriptId(), v8::internal::ProfileNode::Print(), and set_script_id().

+ Here is the caller graph for this function:

◆ set_bailout_reason()

void v8::internal::CodeEntry::set_bailout_reason ( const char *  bailout_reason)
inline

Definition at line 68 of file profile-generator.h.

68  {
70  }
const char * bailout_reason() const

References bailout_reason(), and bailout_reason_.

Referenced by v8::internal::CpuProfiler::CodeCreateEvent().

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

◆ set_no_frame_ranges()

void v8::internal::CodeEntry::set_no_frame_ranges ( List< OffsetRange > *  ranges)
inline

Definition at line 76 of file profile-generator.h.

76  {
77  no_frame_ranges_ = ranges;
78  }

References no_frame_ranges_.

Referenced by v8::internal::CpuProfiler::CodeCreateEvent().

+ Here is the caller graph for this function:

◆ set_script_id()

void v8::internal::CodeEntry::set_script_id ( int  script_id)
inline

Definition at line 67 of file profile-generator.h.

References script_id(), and script_id_.

Referenced by v8::internal::CpuProfiler::CodeCreateEvent().

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

◆ set_shared_id()

void v8::internal::CodeEntry::set_shared_id ( int  shared_id)
inline

Definition at line 65 of file profile-generator.h.

65 { shared_id_ = shared_id; }

References shared_id_.

◆ SetBuiltinId()

void v8::internal::CodeEntry::SetBuiltinId ( Builtins::Name  id)

Definition at line 178 of file profile-generator.cc.

178  {
179  tag_ = Logger::BUILTIN_TAG;
180  builtin_id_ = id;
181 }

References builtin_id_, and tag_.

Member Data Documentation

◆ bailout_reason_

const char* v8::internal::CodeEntry::bailout_reason_
private

Definition at line 101 of file profile-generator.h.

Referenced by bailout_reason(), and set_bailout_reason().

◆ builtin_id_

Builtins::Name v8::internal::CodeEntry::builtin_id_
private

Definition at line 92 of file profile-generator.h.

Referenced by builtin_id(), and SetBuiltinId().

◆ column_number_

int v8::internal::CodeEntry::column_number_
private

Definition at line 97 of file profile-generator.h.

Referenced by column_number().

◆ kEmptyBailoutReason

const char *const v8::internal::CodeEntry::kEmptyBailoutReason = ""
static

Definition at line 88 of file profile-generator.h.

◆ kEmptyNamePrefix

const char *const v8::internal::CodeEntry::kEmptyNamePrefix = ""
static

Definition at line 86 of file profile-generator.h.

Referenced by v8::internal::CpuProfiler::CodeCreateEvent().

◆ kEmptyResourceName

const char *const v8::internal::CodeEntry::kEmptyResourceName = ""
static

Definition at line 87 of file profile-generator.h.

◆ line_number_

int v8::internal::CodeEntry::line_number_
private

Definition at line 96 of file profile-generator.h.

Referenced by GetCallUid(), IsSameAs(), and line_number().

◆ name_

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

Definition at line 94 of file profile-generator.h.

Referenced by GetCallUid(), IsSameAs(), and name().

◆ name_prefix_

const char* v8::internal::CodeEntry::name_prefix_
private

Definition at line 93 of file profile-generator.h.

Referenced by GetCallUid(), has_name_prefix(), IsSameAs(), and name_prefix().

◆ no_frame_ranges_

List<OffsetRange>* v8::internal::CodeEntry::no_frame_ranges_
private

Definition at line 100 of file profile-generator.h.

Referenced by no_frame_ranges(), set_no_frame_ranges(), and ~CodeEntry().

◆ resource_name_

const char* v8::internal::CodeEntry::resource_name_
private

Definition at line 95 of file profile-generator.h.

Referenced by GetCallUid(), IsSameAs(), and resource_name().

◆ script_id_

int v8::internal::CodeEntry::script_id_
private

Definition at line 99 of file profile-generator.h.

Referenced by script_id(), and set_script_id().

◆ shared_id_

int v8::internal::CodeEntry::shared_id_
private

Definition at line 98 of file profile-generator.h.

Referenced by GetCallUid(), IsSameAs(), and set_shared_id().

◆ tag_

Logger::LogEventsAndTags v8::internal::CodeEntry::tag_
private

Definition at line 91 of file profile-generator.h.

Referenced by GetCallUid(), is_js_function(), IsSameAs(), and SetBuiltinId().


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