v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include "v8.h"
#include "cpu-profiler-inl.h"
#include "cctest.h"
#include "platform.h"
#include "profiler-extension.h"
#include "smart-pointers.h"
#include "utils.h"
#include "../include/v8-profiler.h"
Go to the source code of this file.
Data Structures | |
class | TestApiCallbacks |
Functions | |
TEST (StartStop) | |
i::Code * | CreateCode (LocalContext *env) |
TEST (CodeEvents) | |
TEST (TickEvents) | |
TEST (CrashIfStoppingLastNonExistentProfile) | |
TEST (Issue1398) | |
TEST (DeleteAllCpuProfiles) | |
TEST (DeleteCpuProfile) | |
TEST (ProfileStartEndTime) | |
TEST (CollectCpuProfile) | |
TEST (SampleWhenFrameIsNotSetup) | |
TEST (NativeAccessorUninitializedIC) | |
TEST (NativeAccessorMonomorphicIC) | |
TEST (NativeMethodUninitializedIC) | |
TEST (NativeMethodMonomorphicIC) | |
TEST (BoundFunctionCall) | |
TEST (FunctionCallSample) | |
TEST (FunctionApplySample) | |
TEST (JsNativeJsSample) | |
TEST (JsNativeJsRuntimeJsSample) | |
TEST (JsNative1JsNative2JsSample) | |
TEST (IdleTime) | |
TEST (FunctionDetails) | |
TEST (DontStopOnFinishedProfileDelete) | |
i::Code* CreateCode | ( | LocalContext * | env | ) |
Definition at line 102 of file test-cpu-profiler.cc.
References name, Utils::OpenHandle(), OS::SNPrintF(), and Vector< T >::start().
Referenced by Factory::NewCode(), and TEST().
TEST | ( | StartStop | ) |
Definition at line 52 of file test-cpu-profiler.cc.
References Isolate::heap(), CcTest::i_isolate(), and NULL.
TEST | ( | CodeEvents | ) |
Definition at line 124 of file test-cpu-profiler.cc.
References HeapObject::address(), CHECK_EQ, CHECK_NE, CreateCode(), Isolate::factory(), Isolate::heap(), CcTest::i_isolate(), CcTest::InitializeVM(), Factory::NewStringFromAscii(), NULL, profiler(), and v8::internal::StrLength().
TEST | ( | TickEvents | ) |
Definition at line 193 of file test-cpu-profiler.cc.
References CHECK_EQ, CHECK_NE, CreateCode(), Code::ExecutableSize(), Isolate::heap(), CcTest::i_isolate(), Code::instruction_end(), Code::instruction_start(), List< T, P >::last(), NULL, and profiler().
TEST | ( | CrashIfStoppingLastNonExistentProfile | ) |
Definition at line 251 of file test-cpu-profiler.cc.
References Isolate::cpu_profiler(), CcTest::i_isolate(), CcTest::InitializeVM(), profiler(), and CpuProfiler::StartProfiling().
TEST | ( | Issue1398 | ) |
Definition at line 264 of file test-cpu-profiler.cc.
References HeapObject::address(), CHECK_EQ, CHECK_NE, code(), CreateCode(), TickSample::frames_count, Isolate::heap(), CcTest::i_isolate(), TickSample::kMaxFramesCount, NULL, TickSample::pc, profiler(), TickSample::stack, and TickSample::tos.
TEST | ( | DeleteAllCpuProfiles | ) |
Definition at line 306 of file test-cpu-profiler.cc.
References CHECK_EQ, Isolate::cpu_profiler(), CcTest::i_isolate(), CcTest::InitializeVM(), and profiler().
TEST | ( | DeleteCpuProfile | ) |
Definition at line 350 of file test-cpu-profiler.cc.
References CHECK, CHECK_EQ, CHECK_NE, Isolate::GetCpuProfiler(), Context::GetIsolate(), CpuProfiler::GetProfilesCount(), String::NewFromUtf8(), NULL, v8::internal::p1, v8::internal::p2, and v8::internal::p3.
TEST | ( | ProfileStartEndTime | ) |
Definition at line 389 of file test-cpu-profiler.cc.
References CHECK, Isolate::GetCpuProfiler(), CpuProfile::GetEndTime(), Context::GetIsolate(), CpuProfile::GetStartTime(), and String::NewFromUtf8().
TEST | ( | CollectCpuProfile | ) |
Definition at line 543 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), CHECK_EQ, Script::Compile(), CpuProfileNode::GetChildrenCount(), Context::GetIsolate(), Context::Global(), LocalContext::local(), Integer::New(), and String::NewFromUtf8().
TEST | ( | SampleWhenFrameIsNotSetup | ) |
Definition at line 613 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), CHECK_EQ, Script::Compile(), CpuProfileNode::GetChildrenCount(), Context::GetIsolate(), Context::Global(), LocalContext::local(), Integer::New(), and String::NewFromUtf8().
TEST | ( | NativeAccessorUninitializedIC | ) |
Definition at line 721 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), Script::Compile(), FunctionTemplate::GetFunction(), Context::GetIsolate(), TestApiCallbacks::Getter(), CpuProfile::GetTopDownRoot(), Context::Global(), FunctionTemplate::InstanceTemplate(), LocalContext::local(), Integer::New(), External::New(), FunctionTemplate::New(), String::NewFromUtf8(), Function::NewInstance(), ObjectTemplate::SetAccessor(), and TestApiCallbacks::Setter().
TEST | ( | NativeAccessorMonomorphicIC | ) |
Definition at line 766 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), Script::Compile(), FunctionTemplate::GetFunction(), Context::GetIsolate(), TestApiCallbacks::Getter(), CpuProfile::GetTopDownRoot(), Context::Global(), FunctionTemplate::InstanceTemplate(), LocalContext::local(), Integer::New(), External::New(), FunctionTemplate::New(), String::NewFromUtf8(), Function::NewInstance(), TestApiCallbacks::set_warming_up(), ObjectTemplate::SetAccessor(), and TestApiCallbacks::Setter().
TEST | ( | NativeMethodUninitializedIC | ) |
Definition at line 827 of file test-cpu-profiler.cc.
References ARRAY_SIZE, TestApiCallbacks::Callback(), Local< T >::Cast(), Script::Compile(), FunctionTemplate::GetFunction(), Context::GetIsolate(), CpuProfile::GetTopDownRoot(), Context::Global(), LocalContext::local(), Integer::New(), External::New(), FunctionTemplate::New(), Signature::New(), String::NewFromUtf8(), Function::NewInstance(), FunctionTemplate::PrototypeTemplate(), Template::Set(), and FunctionTemplate::SetClassName().
TEST | ( | NativeMethodMonomorphicIC | ) |
Definition at line 873 of file test-cpu-profiler.cc.
References ARRAY_SIZE, TestApiCallbacks::Callback(), Local< T >::Cast(), Script::Compile(), FunctionTemplate::GetFunction(), Context::GetIsolate(), CpuProfile::GetTopDownRoot(), Context::Global(), LocalContext::local(), Integer::New(), External::New(), FunctionTemplate::New(), Signature::New(), String::NewFromUtf8(), Function::NewInstance(), FunctionTemplate::PrototypeTemplate(), Template::Set(), TestApiCallbacks::set_warming_up(), and FunctionTemplate::SetClassName().
TEST | ( | BoundFunctionCall | ) |
Definition at line 945 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), Script::Compile(), Context::GetIsolate(), Context::Global(), LocalContext::local(), Integer::New(), and String::NewFromUtf8().
TEST | ( | FunctionCallSample | ) |
Definition at line 1004 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), CHECK, Heap::CollectAllGarbage(), Script::Compile(), Context::GetIsolate(), Context::Global(), CcTest::heap(), ProfileGenerator::kUnresolvedFunctionName, LocalContext::local(), Integer::New(), and String::NewFromUtf8().
TEST | ( | FunctionApplySample | ) |
Definition at line 1088 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), Script::Compile(), Context::GetIsolate(), Context::Global(), info, LocalContext::local(), Integer::New(), String::NewFromUtf8(), and FunctionCallbackInfo< T >::This().
TEST | ( | JsNativeJsSample | ) |
Definition at line 1189 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), CHECK_EQ, Script::Compile(), CpuProfileNode::GetChildrenCount(), FunctionTemplate::GetFunction(), Context::GetIsolate(), Context::Global(), CcTest::isolate(), Integer::New(), FunctionTemplate::New(), CcTest::NewContext(), and String::NewFromUtf8().
TEST | ( | JsNativeJsRuntimeJsSample | ) |
Definition at line 1273 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), CHECK_EQ, Script::Compile(), CpuProfileNode::GetChildrenCount(), FunctionTemplate::GetFunction(), Context::GetIsolate(), Context::Global(), CcTest::isolate(), Integer::New(), FunctionTemplate::New(), CcTest::NewContext(), and String::NewFromUtf8().
TEST | ( | JsNative1JsNative2JsSample | ) |
Definition at line 1361 of file test-cpu-profiler.cc.
References ARRAY_SIZE, Local< T >::Cast(), CHECK_EQ, Script::Compile(), CpuProfileNode::GetChildrenCount(), FunctionTemplate::GetFunction(), Context::GetIsolate(), Context::Global(), CcTest::isolate(), Integer::New(), FunctionTemplate::New(), CcTest::NewContext(), String::NewFromUtf8(), and Function::SetName().
TEST | ( | IdleTime | ) |
Definition at line 1426 of file test-cpu-profiler.cc.
References ProfilerEventsProcessor::AddCurrentStack(), CHECK_EQ, CHECK_GE, CHECK_NE, Isolate::cpu_profiler(), CpuProfileNode::GetChildrenCount(), Isolate::GetCpuProfiler(), CpuProfileNode::GetHitCount(), Context::GetIsolate(), CpuProfile::GetTopDownRoot(), CcTest::i_isolate(), String::NewFromUtf8(), NULL, CpuProfile::Print(), and CpuProfiler::processor().
TEST | ( | FunctionDetails | ) |
Definition at line 1493 of file test-cpu-profiler.cc.
References bar, baz, foo, Script::GetId(), Context::GetIsolate(), CpuProfile::GetTopDownRoot(), CcTest::isolate(), ProfilerExtension::last_profile, CcTest::NewContext(), and Script::Run().
TEST | ( | DontStopOnFinishedProfileDelete | ) |
Definition at line 1537 of file test-cpu-profiler.cc.
References CHECK, CHECK_EQ, Isolate::GetCpuProfiler(), Context::GetIsolate(), CpuProfiler::GetProfilesCount(), CcTest::isolate(), CcTest::NewContext(), String::NewFromUtf8(), NULL, profiler(), CpuProfiler::StartCpuProfiling(), and CpuProfiler::StopCpuProfiling().