#include "src/heap/gc-tracer.h"
#include <cmath>
#include <limits>
#include <optional>
#include "src/base/platform/platform.h"
#include "src/common/globals.h"
#include "src/execution/isolate.h"
#include "src/heap/gc-tracer-inl.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8::internal {
using GCTracerTest = TestWithContext;
namespace {
void SampleAllocation(GCTracer* tracer, base::TimeTicks time,
size_t per_space_counter_bytes) { … }
enum class StartTracingMode { … };
void StartTracing(GCTracer* tracer, GarbageCollector collector,
StartTracingMode mode,
std::optional<base::TimeTicks> time = { … }
void StopTracing(GCTracer* tracer, GarbageCollector collector,
std::optional<base::TimeTicks> time = { … }
}
TEST_F(GCTracerTest, AllocationThroughput) { … }
TEST_F(GCTracerTest, PerGenerationAllocationThroughput) { … }
TEST_F(GCTracerTest, PerGenerationAllocationThroughputWithProvidedTime) { … }
TEST_F(GCTracerTest, RegularScope) { … }
TEST_F(GCTracerTest, IncrementalScope) { … }
TEST_F(GCTracerTest, IncrementalMarkingDetails) { … }
TEST_F(GCTracerTest, IncrementalMarkingSpeed) { … }
TEST_F(GCTracerTest, MutatorUtilization) { … }
TEST_F(GCTracerTest, BackgroundScavengerScope) { … }
TEST_F(GCTracerTest, BackgroundMinorMSScope) { … }
TEST_F(GCTracerTest, BackgroundMajorMCScope) { … }
class ThreadWithBackgroundScope final : public base::Thread { … };
TEST_F(GCTracerTest, MultithreadedBackgroundScope) { … }
class GcHistogram { … };
std::map<std::string, std::unique_ptr<GcHistogram>> GcHistogram::histograms_ =
std::map<std::string, std::unique_ptr<GcHistogram>>();
TEST_F(GCTracerTest, RecordMarkCompactHistograms) { … }
TEST_F(GCTracerTest, RecordScavengerHistograms) { … }
}