V8 is Google's open source JavaScript engine
CpuProfiler Class Reference

#include <v8-profiler.h>

Public Member Functions

void SetSamplingInterval (int us)
void StartProfiling (Handle< String > title, bool record_samples=false)
 V8_DEPRECATED ("Use StartProfiling", void StartCpuProfiling(Handle< String > title, bool record_samples=false))
CpuProfileStopProfiling (Handle< String > title)
 V8_DEPRECATED ("Use StopProfiling", const CpuProfile *StopCpuProfiling(Handle< String > title))
void SetIdle (bool is_idle)

Detailed Description

Interface for controlling CPU profiling. Instance of the profiler can be retrieved using v8::Isolate::GetCpuProfiler.

Definition at line 149 of file v8-profiler.h.

Member Function Documentation

void SetIdle ( bool  is_idle)

Tells the profiler whether the embedder is idle.

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 StartProfiling ( Handle< String title,
bool  record_samples = false 

Starts collecting CPU profile. Title may be an empty string. It is allowed to have several profiles being collected at once. Attempts to start collecting several profiles with the same title are silently ignored. While collecting a profile, functions from all security contexts are included in it. The token-based filtering is only performed when querying for a profile.

|record_samples| parameter controls whether individual samples should be recorded in addition to the aggregated tree.

CpuProfile* StopProfiling ( Handle< String title)

Stops collecting CPU profile with a given title and returns it. If the title given is empty, finishes the last profile started.

V8_DEPRECATED ( "Use StartProfiling ,
void   StartCpuProfilingHandle< String > title, bool record_samples=false 

Deprecated. Use StartProfiling instead.

V8_DEPRECATED ( "Use StopProfiling ,
const CpuProfile StopCpuProfilingHandle< String > title 

Deprecated. Use StopProfiling instead.

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