V8 Project
|
Interface for controlling CPU profiling. More...
#include <v8-profiler.h>
Public Member Functions | |
void | SetSamplingInterval (int us) |
Changes default CPU profiler sampling interval to the specified number of microseconds. More... | |
void | StartProfiling (Handle< String > title, bool record_samples=false) |
Starts collecting CPU profile. More... | |
V8_DEPRECATED ("Use StartProfiling", void StartCpuProfiling(Handle< String > title, bool record_samples=false)) | |
Deprecated. More... | |
CpuProfile * | StopProfiling (Handle< String > title) |
Stops collecting CPU profile with a given title and returns it. More... | |
V8_DEPRECATED ("Use StopProfiling", const CpuProfile *StopCpuProfiling(Handle< String > title)) | |
Deprecated. More... | |
void | SetIdle (bool is_idle) |
Tells the profiler whether the embedder is idle. More... | |
Private Member Functions | |
CpuProfiler () | |
~CpuProfiler () | |
CpuProfiler (const CpuProfiler &) | |
CpuProfiler & | operator= (const CpuProfiler &) |
Interface for controlling CPU profiling.
Instance of the profiler can be retrieved using v8::Isolate::GetCpuProfiler.
Definition at line 129 of file v8-profiler.h.
|
private |
|
private |
|
private |
|
private |
void v8::CpuProfiler::SetIdle | ( | bool | is_idle | ) |
Tells the profiler whether the embedder is idle.
Definition at line 7200 of file api.cc.
References DCHECK, v8::internal::EXTERNAL, v8::internal::IDLE, v8::internal::Isolate::js_entry_sp(), and NULL.
void v8::CpuProfiler::SetSamplingInterval | ( | int | us | ) |
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.
Definition at line 7177 of file api.cc.
References v8::Utils::OpenHandle().
CpuProfile * v8::CpuProfiler::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.
Definition at line 7188 of file api.cc.
References v8::Utils::OpenHandle().
v8::CpuProfiler::V8_DEPRECATED | ( | "Use StartProfiling" | , |
void | StartCpuProfilingHandle< String > title, bool record_samples=false | ||
) |
Deprecated.
Use StartProfiling instead.
v8::CpuProfiler::V8_DEPRECATED | ( | "Use StopProfiling" | , |
const CpuProfile * | StopCpuProfilingHandle< String > title | ||
) |
Deprecated.
Use StopProfiling instead.