5 #ifndef V8_V8_PROFILER_H_
6 #define V8_V8_PROFILER_H_
16 struct HeapStatsUpdate;
29 int GetScriptId()
const;
38 int GetLineNumber()
const;
44 int GetColumnNumber()
const;
54 unsigned GetHitCount()
const;
57 unsigned GetCallUid()
const;
60 unsigned GetNodeId()
const;
63 int GetChildrenCount()
const;
89 int GetSamplesCount()
const;
102 int64_t GetSampleTimestamp(
int index)
const;
108 int64_t GetStartTime()
const;
115 int64_t GetEndTime()
const;
136 void SetSamplingInterval(
int us);
149 void StartProfiling(
Handle<String> title,
bool record_samples =
false);
154 bool record_samples =
false));
169 void SetIdle(
bool is_idle);
186 kContextVariable = 0,
200 Type GetType()
const;
239 Type GetType()
const;
256 int GetSelfSize()
const);
259 size_t GetShallowSize()
const;
262 int GetChildrenCount()
const;
310 unsigned GetUid()
const;
322 int GetNodesCount()
const;
363 void Serialize(
OutputStream* stream, SerializationFormat format)
const;
402 int GetSnapshotCount();
424 void ClearObjectIds();
453 ObjectNameResolver* global_object_name_resolver =
NULL);
464 void StartTrackingHeapObjects(
bool track_allocations =
false);
485 void StopTrackingHeapObjects();
491 void DeleteAllHeapSnapshots();
494 void SetWrapperClassInfoProvider(
496 WrapperInfoCallback callback);
503 static const uint16_t kPersistentHandleNoClassId = 0;
506 size_t GetProfilerMemorySize();
An interface for reporting progress and controlling long-running activities.
virtual ControlOption ReportProgressValue(int done, int total)=0
Notify about current progress.
virtual ~ActivityControl()
CpuProfileNode represents a node in a call graph.
CpuProfile contains a CPU profile in a form of top-down call tree (from main() down to functions that...
Interface for controlling CPU profiling.
V8_DEPRECATED("Use StartProfiling", void StartCpuProfiling(Handle< String > title, bool record_samples=false))
Deprecated.
CpuProfiler & operator=(const CpuProfiler &)
CpuProfiler(const CpuProfiler &)
V8_DEPRECATED("Use StopProfiling", const CpuProfile *StopCpuProfiling(Handle< String > title))
Deprecated.
An object reference managed by the v8 garbage collector.
HeapSnapshotEdge represents a directed connection between heap graph nodes: from retainers to retaine...
HeapGraphNode represents a node in a heap graph.
V8_DEPRECATED("Use GetShallowSize instead", int GetSelfSize() const)
Returns node's own size, in bytes.
Callback interface for retrieving user friendly names of global objects.
virtual ~ObjectNameResolver()
virtual const char * GetName(Handle< Object > object)=0
Returns name to be used in the heap snapshot for given node.
Interface for controlling heap profiling.
HeapProfiler & operator=(const HeapProfiler &)
HeapProfiler(const HeapProfiler &)
HeapSnapshots record the state of the JS heap at some moment.
static const int kNoLineNumberInfo
static const int kNoColumnInfo
An interface for exporting data from V8, using "push" model.
virtual WriteResult WriteHeapStatsChunk(HeapStatsUpdate *data, int count)
Writes the next chunk of heap stats data into the stream.
virtual WriteResult WriteAsciiChunk(char *data, int size)=0
Writes the next chunk of snapshot data into the stream.
virtual void EndOfStream()=0
Notify about the end of stream.
virtual int GetChunkSize()
Get preferred output chunk size.
Interface for providing information about embedder's objects held by global handles.
RetainedObjectInfo & operator=(const RetainedObjectInfo &)
virtual intptr_t GetSizeInBytes()
Returns embedder's object size in bytes.
virtual bool IsEquivalent(RetainedObjectInfo *other)=0
Returns whether two instances are equivalent.
virtual ~RetainedObjectInfo()
virtual void Dispose()=0
Called by V8 when it no longer needs an instance.
virtual intptr_t GetHash()=0
Returns hash value for the instance.
virtual const char * GetLabel()=0
Returns human-readable label.
virtual const char * GetGroupLabel()
Returns human-readable group label.
virtual intptr_t GetElementCount()
Returns element count in case if a global handle retains a subgraph by holding one of its nodes.
RetainedObjectInfo(const RetainedObjectInfo &)
General purpose unique identifier.
enable harmony numeric enable harmony object literal extensions Optimize object size
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
TypeImpl< ZoneTypeConfig > Type
const char * GetBailoutReason(BailoutReason reason)
Debugger support for the V8 JavaScript engine.
uint32_t SnapshotObjectId
A struct for exporting HeapStats data from V8, using "push" model.
HeapStatsUpdate(uint32_t index, uint32_t count, uint32_t size)