V8 Project
v8::internal::compiler::JSONGraphEdgeWriter Class Reference
+ Inheritance diagram for v8::internal::compiler::JSONGraphEdgeWriter:
+ Collaboration diagram for v8::internal::compiler::JSONGraphEdgeWriter:

Public Member Functions

 JSONGraphEdgeWriter (OStream &os, Zone *zone, const Graph *graph)
 
void Print ()
 
GenericGraphVisit::Control PreEdge (Node *from, int index, Node *to)
 
- Public Member Functions inherited from v8::internal::compiler::GenericGraphVisit::NullNodeVisitor< B, S >
Control Pre (GenericNode< B, S > *node)
 
Control Post (GenericNode< B, S > *node)
 
void PreEdge (GenericNode< B, S > *from, int index, GenericNode< B, S > *to)
 
void PostEdge (GenericNode< B, S > *from, int index, GenericNode< B, S > *to)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (JSONGraphEdgeWriter)
 

Private Attributes

OStreamos_
 
const Graph *const graph_
 
bool first_edge_
 

Detailed Description

Definition at line 102 of file graph-visualizer.cc.

Constructor & Destructor Documentation

◆ JSONGraphEdgeWriter()

v8::internal::compiler::JSONGraphEdgeWriter::JSONGraphEdgeWriter ( OStream os,
Zone zone,
const Graph graph 
)
inline

Member Function Documentation

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::compiler::JSONGraphEdgeWriter::DISALLOW_COPY_AND_ASSIGN ( JSONGraphEdgeWriter  )
private

◆ PreEdge()

GenericGraphVisit::Control v8::internal::compiler::JSONGraphEdgeWriter::PreEdge ( Node *  from,
int  index,
Node *  to 
)

Definition at line 122 of file graph-visualizer.cc.

123  {
124  if (first_edge_) {
125  first_edge_ = false;
126  } else {
127  os_ << ",";
128  }
129  const char* edge_type = NULL;
130  if (index < NodeProperties::FirstValueIndex(from)) {
131  edge_type = "unknown";
132  } else if (index < NodeProperties::FirstContextIndex(from)) {
133  edge_type = "value";
134  } else if (index < NodeProperties::FirstFrameStateIndex(from)) {
135  edge_type = "context";
136  } else if (index < NodeProperties::FirstEffectIndex(from)) {
137  edge_type = "frame-state";
138  } else if (index < NodeProperties::FirstControlIndex(from)) {
139  edge_type = "effect";
140  } else {
141  edge_type = "control";
142  }
143  os_ << "{\"source\":" << to->id() << ",\"target\":" << from->id()
144  << ",\"index\":" << index << ",\"type\":\"" << edge_type << "\"}";
146 }
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
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 v8::internal::compiler::GenericGraphVisit::CONTINUE, first_edge_, v8::internal::compiler::NodeProperties::FirstContextIndex(), v8::internal::compiler::NodeProperties::FirstControlIndex(), v8::internal::compiler::NodeProperties::FirstEffectIndex(), v8::internal::compiler::NodeProperties::FirstFrameStateIndex(), v8::internal::compiler::NodeProperties::FirstValueIndex(), NULL, os_, and to().

+ Here is the call graph for this function:

◆ Print()

void v8::internal::compiler::JSONGraphEdgeWriter::Print ( )
inline

Definition at line 109 of file graph-visualizer.cc.

109 { const_cast<Graph*>(graph_)->VisitNodeInputsFromEnd(this); }

References graph_.

Referenced by v8::internal::compiler::operator<<().

+ Here is the caller graph for this function:

Member Data Documentation

◆ first_edge_

bool v8::internal::compiler::JSONGraphEdgeWriter::first_edge_
private

Definition at line 116 of file graph-visualizer.cc.

Referenced by PreEdge().

◆ graph_

const Graph* const v8::internal::compiler::JSONGraphEdgeWriter::graph_
private

Definition at line 115 of file graph-visualizer.cc.

Referenced by Print().

◆ os_

OStream& v8::internal::compiler::JSONGraphEdgeWriter::os_
private

Definition at line 114 of file graph-visualizer.cc.

Referenced by PreEdge().


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