v8  3.11.10(node0.8.28)
V8 is Google's open source JavaScript engine
CpuProfiler Class Reference

#include <v8-profiler.h>

Static Public Member Functions

static int GetProfilesCount ()
 
static const CpuProfileGetProfile (int index, Handle< Value > security_token=Handle< Value >())
 
static const CpuProfileFindProfile (unsigned uid, Handle< Value > security_token=Handle< Value >())
 
static void StartProfiling (Handle< String > title)
 
static const CpuProfileStopProfiling (Handle< String > title, Handle< Value > security_token=Handle< Value >())
 
static void DeleteAllProfiles ()
 

Detailed Description

Interface for controlling CPU profiling.

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

Member Function Documentation

static void DeleteAllProfiles ( )
static

Deletes all existing profiles, also cancelling all profiling activity. All previously returned pointers to profiles and their contents become invalid after this call.

static const CpuProfile* FindProfile ( unsigned  uid,
Handle< Value security_token = HandleValue >() 
)
static

Returns a profile by uid.

static const CpuProfile* GetProfile ( int  index,
Handle< Value security_token = HandleValue >() 
)
static

Returns a profile by index.

static int GetProfilesCount ( )
static

A note on security tokens usage. As scripts from different origins can run inside a single V8 instance, it is possible to have functions from different security contexts intermixed in a single CPU profile. To avoid exposing function names belonging to other contexts, filtering by security token is performed while obtaining profiling results. Returns the number of profiles collected (doesn't include profiles that are being collected at the moment of call.)

static void StartProfiling ( Handle< String title)
static

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.

static const CpuProfile* StopProfiling ( Handle< String title,
Handle< Value security_token = HandleValue >() 
)
static

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


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