#include "include/v8-function.h"
#include "include/v8-profiler.h"
#include "src/api/api-inl.h"
#include "src/base/strings.h"
#include "src/init/v8.h"
#include "src/objects/objects-inl.h"
#include "src/profiler/cpu-profiler.h"
#include "src/profiler/profile-generator-inl.h"
#include "src/profiler/symbolizer.h"
#include "test/cctest/cctest.h"
#include "test/cctest/profiler-extension.h"
namespace v8 {
namespace internal {
namespace test_profile_generator {
TEST(ProfileNodeFindOrAddChild) { … }
TEST(ProfileNodeFindOrAddChildWithLineNumber) { … }
TEST(ProfileNodeFindOrAddChildForSameFunction) { … }
namespace {
class ProfileTreeTestHelper { … };
}
TEST(ProfileTreeAddPathFromEnd) { … }
TEST(ProfileTreeAddPathFromEndWithLineNumbers) { … }
TEST(ProfileTreeCalculateTotalTicks) { … }
static inline i::Address ToAddress(int n) { … }
static inline void* ToPointer(int n) { … }
TEST(CodeMapAddCode) { … }
TEST(CodeMapMoveAndDeleteCode) { … }
TEST(CodeMapClear) { … }
namespace {
class TestSetup { … };
}
TEST(SymbolizeTickSample) { … }
static void CheckNodeIds(const ProfileNode* node, unsigned* expectedId) { … }
TEST(SampleIds) { … }
TEST(SampleIds_StopProfilingByProfilerId) { … }
TEST(CpuProfilesCollectionDuplicateId) { … }
TEST(CpuProfilesCollectionDuplicateTitle) { … }
namespace {
class DiscardedSamplesDelegateImpl : public v8::DiscardedSamplesDelegate { … };
class MockPlatform final : public TestPlatform { … };
}
TEST_WITH_PLATFORM(MaxSamplesCallback, MockPlatform) { … }
TEST(NoSamples) { … }
static const ProfileNode* PickChild(const ProfileNode* parent,
const char* name) { … }
TEST(RecordStackTraceAtStartProfiling) { … }
TEST(Issue51919) { … }
static const v8::CpuProfileNode* PickChild(const v8::CpuProfileNode* parent,
const char* name) { … }
TEST(ProfileNodeScriptId) { … }
static const char* line_number_test_source_existing_functions = …;
static const char* line_number_test_source_profile_time_functions = …;
int GetFunctionLineNumber(CpuProfiler* profiler, LocalContext* env,
i::Isolate* isolate, const char* name) { … }
TEST(LineNumber) { … }
TEST(BailoutReason) { … }
TEST(NodeSourceTypes) { … }
TEST(CodeMapRemoveCode) { … }
TEST(CodeMapMoveOverlappingCode) { … }
}
}
}