v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <v8-profiler.h>
Static Public Member Functions | |
static int | GetProfilesCount () |
static const CpuProfile * | GetProfile (int index, Handle< Value > security_token=Handle< Value >()) |
static const CpuProfile * | FindProfile (unsigned uid, Handle< Value > security_token=Handle< Value >()) |
static void | StartProfiling (Handle< String > title) |
static const CpuProfile * | StopProfiling (Handle< String > title, Handle< Value > security_token=Handle< Value >()) |
static void | DeleteAllProfiles () |
Interface for controlling CPU profiling.
Definition at line 151 of file v8-profiler.h.
|
static |
Deletes all existing profiles, also cancelling all profiling activity. All previously returned pointers to profiles and their contents become invalid after this call.
Definition at line 5970 of file api.cc.
References CpuProfiler::DeleteAllProfiles().
|
static |
Returns a profile by uid.
Definition at line 5941 of file api.cc.
References CpuProfiler::FindProfile(), Handle< T >::IsEmpty(), NULL, and Utils::OpenHandle().
Referenced by TEST().
|
static |
Returns a profile by index.
Definition at line 5930 of file api.cc.
References CpuProfiler::GetProfile(), Handle< T >::IsEmpty(), NULL, and Utils::OpenHandle().
|
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.)
Definition at line 5923 of file api.cc.
References CpuProfiler::GetProfilesCount().
Referenced by TEST().
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.
Definition at line 5952 of file api.cc.
References Utils::OpenHandle(), and CpuProfiler::StartProfiling().
Referenced by ProfilerExtension::StartProfiling(), and TEST().
|
static |
Stops collecting CPU profile with a given title and returns it. If the title given is empty, finishes the last profile started.
Definition at line 5959 of file api.cc.
References Handle< T >::IsEmpty(), NULL, Utils::OpenHandle(), and CpuProfiler::StopProfiling().
Referenced by ProfilerExtension::StopProfiling(), and TEST().