v8
7.9.317 (node 13.2.0)
V8 is Google's open source JavaScript engine
|
#include <v8-profiler.h>
Public Member Functions | |
void | Dispose () |
void | SetSamplingInterval (int us) |
void | SetUsePreciseSampling (bool) |
void | StartProfiling (Local< String > title, CpuProfilingOptions options) |
void | StartProfiling (Local< String > title, CpuProfilingMode mode, bool record_samples=false, unsigned max_samples=CpuProfilingOptions::kNoSampleLimit) |
void | StartProfiling (Local< String > title, bool record_samples=false) |
CpuProfile * | StopProfiling (Local< String > title) |
Static Public Member Functions | |
static CpuProfiler * | New (Isolate *isolate, CpuProfilingNamingMode=kDebugNaming, CpuProfilingLoggingMode=kLazyLogging) |
static void | CollectSample (Isolate *isolate) |
static void | UseDetailedSourcePositionsForProfiling (Isolate *isolate) |
Interface for controlling CPU profiling. Instance of the profiler can be created using v8::CpuProfiler::New method.
Definition at line 301 of file v8-profiler.h.
|
static |
Synchronously collect current stack sample in all profilers attached to the |isolate|. The call does not affect number of ticks recorded for the current top node.
void Dispose | ( | ) |
Disposes the CPU profiler object.
|
static |
Creates a new CPU profiler for the |isolate|. The isolate must be initialized. The profiler object must be disposed after use by calling |Dispose| method.
void SetSamplingInterval | ( | int | us | ) |
Changes default CPU profiler sampling interval to the specified number of microseconds. Default interval is 1000us. This method must be called when there are no profiles being recorded.
void SetUsePreciseSampling | ( | bool | ) |
Sets whether or not the profiler should prioritize consistency of sample periodicity on Windows. Disabling this can greatly reduce CPU usage, but may result in greater variance in sample timings from the platform's scheduler. Defaults to enabled. This method must be called when there are no profiles being recorded.
The same as StartProfiling above, but the CpuProfilingMode defaults to kLeafNodeLineNumbers mode, which was the previous default behavior of the profiler.
void StartProfiling | ( | Local< String > | title, |
CpuProfilingMode | mode, | ||
bool | record_samples = false , |
||
unsigned | max_samples = CpuProfilingOptions::kNoSampleLimit |
||
) |
Starts profiling with the same semantics as above, except with expanded parameters.
|record_samples| parameter controls whether individual samples should be recorded in addition to the aggregated tree.
|max_samples| controls the maximum number of samples that should be recorded by the profiler. Samples obtained after this limit will be discarded.
void StartProfiling | ( | Local< String > | title, |
CpuProfilingOptions | options | ||
) |
Starts collecting a CPU profile. Title may be an empty string. Several profiles may be collected at once. Attempts to start collecting several profiles with the same title are silently ignored.
CpuProfile* StopProfiling | ( | Local< String > | title | ) |
Stops collecting CPU profile with a given title and returns it. If the title given is empty, finishes the last profile started.
|
static |
Generate more detailed source positions to code objects. This results in better results when mapping profiling samples to script source.