diff options
author | 2025-02-18 14:14:13 +0000 | |
---|---|---|
committer | 2025-03-05 06:15:05 -0800 | |
commit | 2e0be6e9f3891d2e684b3e38d132070a8e5c982b (patch) | |
tree | e120ab0eb2441c0204eb297ecea4f1a5da923865 | |
parent | 01003fe4b26b4e1bcd38a09d79fd83027ee7cf06 (diff) |
Add app/GC interference metrics in ART
The two new metrics will collect information about the App-GC
interference for both the CC and CMC garbage collectors, for
collections involving both the young generation and the full heap.
Bug: 397202548
Bug: 271990567
Test: atest art_standalone_runtime_tests
Change-Id: I96a8e9dbbab551feb70f9f43b5c87b75a2a5cce6
-rw-r--r-- | libartbase/base/metrics/metrics.h | 40 | ||||
-rw-r--r-- | runtime/gc/collector/concurrent_copying.cc | 6 | ||||
-rw-r--r-- | runtime/gc/collector/concurrent_copying.h | 1 | ||||
-rw-r--r-- | runtime/gc/collector/garbage_collector.cc | 2 | ||||
-rw-r--r-- | runtime/gc/collector/garbage_collector.h | 1 | ||||
-rw-r--r-- | runtime/gc/collector/iteration.h | 3 | ||||
-rw-r--r-- | runtime/gc/collector/mark_compact.cc | 5 | ||||
-rw-r--r-- | runtime/gc/collector/mark_compact.h | 2 | ||||
-rw-r--r-- | runtime/gc/heap_test.cc | 39 | ||||
-rw-r--r-- | runtime/metrics/statsd.cc | 36 |
10 files changed, 82 insertions, 53 deletions
diff --git a/libartbase/base/metrics/metrics.h b/libartbase/base/metrics/metrics.h index 0fe090fdbc..9f1e018bfd 100644 --- a/libartbase/base/metrics/metrics.h +++ b/libartbase/base/metrics/metrics.h @@ -71,25 +71,27 @@ METRIC(FullGcDuration, MetricsCounter) // Increasing counter metrics, reported as Value Metrics in delta increments. -#define ART_VALUE_METRICS(METRIC) \ - METRIC(GcWorldStopTimeDelta, MetricsDeltaCounter) \ - METRIC(GcWorldStopCountDelta, MetricsDeltaCounter) \ - METRIC(YoungGcScannedBytesDelta, MetricsDeltaCounter) \ - METRIC(YoungGcFreedBytesDelta, MetricsDeltaCounter) \ - METRIC(YoungGcDurationDelta, MetricsDeltaCounter) \ - METRIC(FullGcScannedBytesDelta, MetricsDeltaCounter) \ - METRIC(FullGcFreedBytesDelta, MetricsDeltaCounter) \ - METRIC(FullGcDurationDelta, MetricsDeltaCounter) \ - METRIC(JitMethodCompileTotalTimeDelta, MetricsDeltaCounter) \ - METRIC(JitMethodCompileCountDelta, MetricsDeltaCounter) \ - METRIC(ClassVerificationTotalTimeDelta, MetricsDeltaCounter) \ - METRIC(ClassVerificationCountDelta, MetricsDeltaCounter) \ - METRIC(ClassLoadingTotalTimeDelta, MetricsDeltaCounter) \ - METRIC(TotalBytesAllocatedDelta, MetricsDeltaCounter) \ - METRIC(TotalGcCollectionTimeDelta, MetricsDeltaCounter) \ - METRIC(YoungGcCountDelta, MetricsDeltaCounter) \ - METRIC(FullGcCountDelta, MetricsDeltaCounter) \ - METRIC(TimeElapsedDelta, MetricsDeltaCounter) +#define ART_VALUE_METRICS(METRIC) \ + METRIC(GcWorldStopTimeDelta, MetricsDeltaCounter) \ + METRIC(GcWorldStopCountDelta, MetricsDeltaCounter) \ + METRIC(YoungGcScannedBytesDelta, MetricsDeltaCounter) \ + METRIC(YoungGcFreedBytesDelta, MetricsDeltaCounter) \ + METRIC(YoungGcDurationDelta, MetricsDeltaCounter) \ + METRIC(FullGcScannedBytesDelta, MetricsDeltaCounter) \ + METRIC(FullGcFreedBytesDelta, MetricsDeltaCounter) \ + METRIC(FullGcDurationDelta, MetricsDeltaCounter) \ + METRIC(JitMethodCompileTotalTimeDelta, MetricsDeltaCounter) \ + METRIC(JitMethodCompileCountDelta, MetricsDeltaCounter) \ + METRIC(ClassVerificationTotalTimeDelta, MetricsDeltaCounter) \ + METRIC(ClassVerificationCountDelta, MetricsDeltaCounter) \ + METRIC(ClassLoadingTotalTimeDelta, MetricsDeltaCounter) \ + METRIC(TotalBytesAllocatedDelta, MetricsDeltaCounter) \ + METRIC(TotalGcCollectionTimeDelta, MetricsDeltaCounter) \ + METRIC(YoungGcCountDelta, MetricsDeltaCounter) \ + METRIC(FullGcCountDelta, MetricsDeltaCounter) \ + METRIC(TimeElapsedDelta, MetricsDeltaCounter) \ + METRIC(AppSlowPathDuringYoungGcDurationDelta, MetricsDeltaCounter) \ + METRIC(AppSlowPathDuringFullGcDurationDelta, MetricsDeltaCounter) #define ART_METRICS(METRIC) \ ART_EVENT_METRICS(METRIC) \ diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc index caaa3f6cbc..7b9be64098 100644 --- a/runtime/gc/collector/concurrent_copying.cc +++ b/runtime/gc/collector/concurrent_copying.cc @@ -155,6 +155,7 @@ ConcurrentCopying::ConcurrentCopying(Heap* heap, gc_freed_bytes_delta_ = metrics->YoungGcFreedBytesDelta(); gc_duration_ = metrics->YoungGcDuration(); gc_duration_delta_ = metrics->YoungGcDurationDelta(); + gc_app_slow_path_during_gc_duration_delta_ = metrics->AppSlowPathDuringYoungGcDurationDelta(); } else { gc_time_histogram_ = metrics->FullGcCollectionTime(); metrics_gc_count_ = metrics->FullGcCount(); @@ -169,6 +170,7 @@ ConcurrentCopying::ConcurrentCopying(Heap* heap, gc_freed_bytes_delta_ = metrics->FullGcFreedBytesDelta(); gc_duration_ = metrics->FullGcDuration(); gc_duration_delta_ = metrics->FullGcDurationDelta(); + gc_app_slow_path_during_gc_duration_delta_ = metrics->AppSlowPathDuringFullGcDurationDelta(); } } @@ -410,6 +412,7 @@ void ConcurrentCopying::InitializePhase() { rb_slow_path_count_.store(0, std::memory_order_relaxed); rb_slow_path_count_gc_.store(0, std::memory_order_relaxed); } + app_slow_path_start_time_ = 0; immune_spaces_.Reset(); bytes_moved_.store(0, std::memory_order_relaxed); @@ -562,6 +565,7 @@ class ConcurrentCopying::FlipCallback : public Closure { cc->from_space_num_bytes_at_first_pause_ = cc->region_space_->GetBytesAllocated(); } cc->is_marking_ = true; + cc->app_slow_path_start_time_ = MilliTime(); if (kIsDebugBuild && !cc->use_generational_cc_) { cc->region_space_->AssertAllRegionLiveBytesZeroOrCleared(); } @@ -1748,6 +1752,8 @@ class ConcurrentCopying::DisableMarkingCallback : public Closure { // to avoid a race with ThreadList::Register(). CHECK(concurrent_copying_->is_marking_); concurrent_copying_->is_marking_ = false; + concurrent_copying_->GetCurrentIteration()->SetAppSlowPathDurationMs( + MilliTime() - concurrent_copying_->app_slow_path_start_time_); if (kUseBakerReadBarrier && kGrayDirtyImmuneObjects) { CHECK(concurrent_copying_->is_using_read_barrier_entrypoints_); concurrent_copying_->is_using_read_barrier_entrypoints_ = false; diff --git a/runtime/gc/collector/concurrent_copying.h b/runtime/gc/collector/concurrent_copying.h index ae94c14113..97d120e1a0 100644 --- a/runtime/gc/collector/concurrent_copying.h +++ b/runtime/gc/collector/concurrent_copying.h @@ -464,6 +464,7 @@ class ConcurrentCopying : public GarbageCollector { Atomic<uint64_t> rb_slow_path_ns_; Atomic<uint64_t> rb_slow_path_count_; Atomic<uint64_t> rb_slow_path_count_gc_; + uint64_t app_slow_path_start_time_; mutable Mutex rb_slow_path_histogram_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; Histogram<uint64_t> rb_slow_path_time_histogram_ GUARDED_BY(rb_slow_path_histogram_lock_); uint64_t rb_slow_path_count_total_ GUARDED_BY(rb_slow_path_histogram_lock_); diff --git a/runtime/gc/collector/garbage_collector.cc b/runtime/gc/collector/garbage_collector.cc index 0cfa198491..14556c5a27 100644 --- a/runtime/gc/collector/garbage_collector.cc +++ b/runtime/gc/collector/garbage_collector.cc @@ -95,6 +95,7 @@ void Iteration::Reset(GcCause gc_cause, bool clear_soft_references) { timings_.Reset(); pause_times_.clear(); duration_ns_ = 0; + app_slow_path_duration_ms_ = 0; bytes_scanned_ = 0; clear_soft_references_ = clear_soft_references; gc_cause_ = gc_cause; @@ -268,6 +269,7 @@ void GarbageCollector::Run(GcCause gc_cause, bool clear_soft_references) { gc_freed_bytes_delta_->Add(current_iteration->GetFreedBytes()); gc_duration_->Add(NsToMs(current_iteration->GetDurationNs())); gc_duration_delta_->Add(NsToMs(current_iteration->GetDurationNs())); + gc_app_slow_path_during_gc_duration_delta_->Add(current_iteration->GetAppSlowPathDurationMs()); } // Report some metrics via the ATrace interface, to surface them in Perfetto. diff --git a/runtime/gc/collector/garbage_collector.h b/runtime/gc/collector/garbage_collector.h index f4ee570808..1f697fd596 100644 --- a/runtime/gc/collector/garbage_collector.h +++ b/runtime/gc/collector/garbage_collector.h @@ -190,6 +190,7 @@ class GarbageCollector : public RootVisitor, public IsMarkedVisitor, public Mark metrics::MetricsBase<uint64_t>* gc_freed_bytes_delta_; metrics::MetricsBase<uint64_t>* gc_duration_; metrics::MetricsBase<uint64_t>* gc_duration_delta_; + metrics::MetricsBase<uint64_t>* gc_app_slow_path_during_gc_duration_delta_; uint64_t total_thread_cpu_time_ns_; uint64_t total_time_ns_; uint64_t total_freed_objects_; diff --git a/runtime/gc/collector/iteration.h b/runtime/gc/collector/iteration.h index d70a30b829..086ed541b0 100644 --- a/runtime/gc/collector/iteration.h +++ b/runtime/gc/collector/iteration.h @@ -70,6 +70,8 @@ class Iteration { void SetFreedRevoke(uint64_t freed) { freed_bytes_revoke_ = freed; } + uint64_t GetAppSlowPathDurationMs() const { return app_slow_path_duration_ms_; } + void SetAppSlowPathDurationMs(uint64_t duration) { app_slow_path_duration_ms_ = duration; } void Reset(GcCause gc_cause, bool clear_soft_references); // Returns the estimated throughput of the iteration. uint64_t GetEstimatedThroughput() const; @@ -91,6 +93,7 @@ class Iteration { GcCause gc_cause_; bool clear_soft_references_; uint64_t duration_ns_; + uint64_t app_slow_path_duration_ms_; uint64_t bytes_scanned_; TimingLogger timings_; ObjectBytePair freed_; diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc index 035f5263d6..0ba342224d 100644 --- a/runtime/gc/collector/mark_compact.cc +++ b/runtime/gc/collector/mark_compact.cc @@ -473,6 +473,7 @@ YoungMarkCompact::YoungMarkCompact(Heap* heap, MarkCompact* main) gc_freed_bytes_delta_ = metrics->YoungGcFreedBytesDelta(); gc_duration_ = metrics->YoungGcDuration(); gc_duration_delta_ = metrics->YoungGcDurationDelta(); + gc_app_slow_path_during_gc_duration_delta_ = metrics->AppSlowPathDuringYoungGcDurationDelta(); are_metrics_initialized_ = true; } @@ -587,6 +588,7 @@ MarkCompact::MarkCompact(Heap* heap) gc_freed_bytes_delta_ = metrics->FullGcFreedBytesDelta(); gc_duration_ = metrics->FullGcDuration(); gc_duration_delta_ = metrics->FullGcDurationDelta(); + gc_app_slow_path_during_gc_duration_delta_ = metrics->AppSlowPathDuringFullGcDurationDelta(); are_metrics_initialized_ = true; } @@ -810,6 +812,7 @@ void MarkCompact::InitializePhase() { for (size_t i = 0; i < vector_length_; i++) { DCHECK_EQ(chunk_info_vec_[i], 0u); } + app_slow_path_start_time_ = 0; } class MarkCompact::ThreadFlipVisitor : public Closure { @@ -3353,6 +3356,7 @@ void MarkCompact::CompactionPause() { // Release order wrt to mutator threads' SIGBUS handler load. sigbus_in_progress_count_[0].store(0, std::memory_order_relaxed); sigbus_in_progress_count_[1].store(0, std::memory_order_release); + app_slow_path_start_time_ = MilliTime(); KernelPreparation(); } @@ -4084,6 +4088,7 @@ void MarkCompact::CompactionPhase() { DCHECK_EQ(data.end_ - data.begin_, static_cast<ssize_t>(data.shadow_.Size())); UnregisterUffd(data.begin_, data.shadow_.Size()); } + GetCurrentIteration()->SetAppSlowPathDurationMs(MilliTime() - app_slow_path_start_time_); // Set compaction-done bit in the second counter to indicate that gc-thread // is done unregistering the spaces and therefore mutators, if in SIGBUS, diff --git a/runtime/gc/collector/mark_compact.h b/runtime/gc/collector/mark_compact.h index cae7bdff79..1c843e3c84 100644 --- a/runtime/gc/collector/mark_compact.h +++ b/runtime/gc/collector/mark_compact.h @@ -937,6 +937,8 @@ class MarkCompact final : public GarbageCollector { void* prev_black_allocations_begin_; bool prev_gc_young_; bool prev_gc_performed_compaction_; + // Timestamp when the read-barrier is enabled + uint64_t app_slow_path_start_time_; class FlipCallback; class ThreadFlipVisitor; diff --git a/runtime/gc/heap_test.cc b/runtime/gc/heap_test.cc index 74d2970c0d..3d3cabff29 100644 --- a/runtime/gc/heap_test.cc +++ b/runtime/gc/heap_test.cc @@ -109,11 +109,12 @@ TEST_F(HeapTest, DumpGCPerformanceOnShutdown) { bool AnyIsFalse(bool x, bool y) { return !x || !y; } TEST_F(HeapTest, GCMetrics) { - // Allocate a few string objects (to be collected), then trigger garbage - // collection, and check that GC metrics are updated (where applicable). + // Allocate a lot of string objects to be collected (to ensure the garbage collection is long + // enough for the timing metrics to be non-zero), then trigger garbage collection, and check that + // GC metrics are updated (where applicable). Heap* heap = Runtime::Current()->GetHeap(); { - constexpr const size_t kNumObj = 128; + constexpr const size_t kNumObj = 32768; ScopedObjectAccess soa(Thread::Current()); StackHandleScope<kNumObj> hs(soa.Self()); for (size_t i = 0u; i < kNumObj; ++i) { @@ -144,6 +145,8 @@ TEST_F(HeapTest, GCMetrics) { metrics::MetricsBase<uint64_t>* full_gc_freed_bytes_delta = metrics->FullGcFreedBytesDelta(); metrics::MetricsBase<uint64_t>* full_gc_duration = metrics->FullGcDuration(); metrics::MetricsBase<uint64_t>* full_gc_duration_delta = metrics->FullGcDurationDelta(); + metrics::MetricsBase<uint64_t>* full_gc_app_slow_path_duration_delta = + metrics->AppSlowPathDuringFullGcDurationDelta(); // ART young-generation GC metrics. metrics::MetricsBase<int64_t>* young_gc_collection_time = metrics->YoungGcCollectionTime(); metrics::MetricsBase<uint64_t>* young_gc_count = metrics->YoungGcCount(); @@ -160,6 +163,8 @@ TEST_F(HeapTest, GCMetrics) { metrics::MetricsBase<uint64_t>* young_gc_freed_bytes_delta = metrics->YoungGcFreedBytesDelta(); metrics::MetricsBase<uint64_t>* young_gc_duration = metrics->YoungGcDuration(); metrics::MetricsBase<uint64_t>* young_gc_duration_delta = metrics->YoungGcDurationDelta(); + metrics::MetricsBase<uint64_t>* young_gc_app_slow_path_duration_delta = + metrics->AppSlowPathDuringYoungGcDurationDelta(); CollectorType fg_collector_type = heap->GetForegroundCollectorType(); if (fg_collector_type == kCollectorTypeCC || fg_collector_type == kCollectorTypeCMC) { @@ -167,7 +172,7 @@ TEST_F(HeapTest, GCMetrics) { // GC metrics at the moment. if (heap->GetUseGenerational()) { // Check that full-heap and/or young-generation GC metrics are non-null - // after trigerring the collection. + // after triggering the collection. EXPECT_PRED2( AnyIsFalse, full_gc_collection_time->IsNull(), young_gc_collection_time->IsNull()); EXPECT_PRED2(AnyIsFalse, full_gc_count->IsNull(), young_gc_count->IsNull()); @@ -186,18 +191,13 @@ TEST_F(HeapTest, GCMetrics) { EXPECT_PRED2(AnyIsFalse, full_gc_freed_bytes->IsNull(), young_gc_freed_bytes->IsNull()); EXPECT_PRED2( AnyIsFalse, full_gc_freed_bytes_delta->IsNull(), young_gc_freed_bytes_delta->IsNull()); - // We have observed that sometimes the GC duration (both for full-heap and - // young-generation collections) is null (b/271112044). Temporarily - // suspend the following checks while we investigate. - // - // TODO(b/271990567): Investigate and adjust these expectations and/or the - // corresponding metric logic. -#if 0 EXPECT_PRED2(AnyIsFalse, full_gc_duration->IsNull(), young_gc_duration->IsNull()); EXPECT_PRED2(AnyIsFalse, full_gc_duration_delta->IsNull(), young_gc_duration_delta->IsNull()); -#endif + EXPECT_PRED2(AnyIsFalse, + full_gc_app_slow_path_duration_delta->IsNull(), + young_gc_app_slow_path_duration_delta->IsNull()); } else { - // Check that only full-heap GC metrics are non-null after trigerring the collection. + // Check that only full-heap GC metrics are non-null after triggering the collection. EXPECT_FALSE(full_gc_collection_time->IsNull()); EXPECT_FALSE(full_gc_count->IsNull()); EXPECT_FALSE(full_gc_count_delta->IsNull()); @@ -209,15 +209,9 @@ TEST_F(HeapTest, GCMetrics) { EXPECT_FALSE(full_gc_scanned_bytes_delta->IsNull()); EXPECT_FALSE(full_gc_freed_bytes->IsNull()); EXPECT_FALSE(full_gc_freed_bytes_delta->IsNull()); - // Like the generational case, these GC duration can be less than a - // millisecond here as well (b/391531096). Temporarily disabling the - // tests. - // TODO(b/271990567): Possibly make the GCs above more time consuming to - // avoid the situation. -#if 0 EXPECT_FALSE(full_gc_duration->IsNull()); EXPECT_FALSE(full_gc_duration_delta->IsNull()); -#endif + EXPECT_FALSE(full_gc_app_slow_path_duration_delta->IsNull()); EXPECT_TRUE(young_gc_collection_time->IsNull()); EXPECT_TRUE(young_gc_count->IsNull()); @@ -232,9 +226,10 @@ TEST_F(HeapTest, GCMetrics) { EXPECT_TRUE(young_gc_freed_bytes_delta->IsNull()); EXPECT_TRUE(young_gc_duration->IsNull()); EXPECT_TRUE(young_gc_duration_delta->IsNull()); + EXPECT_TRUE(young_gc_app_slow_path_duration_delta->IsNull()); } } else { - // Check that all metrics are null after trigerring the collection. + // Check that all metrics are null after triggering the collection. EXPECT_TRUE(full_gc_collection_time->IsNull()); EXPECT_TRUE(full_gc_count->IsNull()); EXPECT_TRUE(full_gc_count_delta->IsNull()); @@ -248,6 +243,7 @@ TEST_F(HeapTest, GCMetrics) { EXPECT_TRUE(full_gc_freed_bytes_delta->IsNull()); EXPECT_TRUE(full_gc_duration->IsNull()); EXPECT_TRUE(full_gc_duration_delta->IsNull()); + EXPECT_TRUE(full_gc_app_slow_path_duration_delta->IsNull()); EXPECT_TRUE(young_gc_collection_time->IsNull()); EXPECT_TRUE(young_gc_count->IsNull()); @@ -262,6 +258,7 @@ TEST_F(HeapTest, GCMetrics) { EXPECT_TRUE(young_gc_freed_bytes_delta->IsNull()); EXPECT_TRUE(young_gc_duration->IsNull()); EXPECT_TRUE(young_gc_duration_delta->IsNull()); + EXPECT_TRUE(young_gc_app_slow_path_duration_delta->IsNull()); } } diff --git a/runtime/metrics/statsd.cc b/runtime/metrics/statsd.cc index 605dadbc9b..26f6c20664 100644 --- a/runtime/metrics/statsd.cc +++ b/runtime/metrics/statsd.cc @@ -128,25 +128,27 @@ constexpr std::optional<int32_t> EncodeDatumId(DatumId datum_id) { statsd::ART_DATUM_DELTA_REPORTED__KIND__ART_DATUM_DELTA_GC_TOTAL_COLLECTION_TIME_MS); case DatumId::kYoungGcThroughputAvg: return std::make_optional( - statsd::ART_DATUM_REPORTED__KIND__ART_DATUM_GC_YOUNG_GENERATION_COLLECTION_THROUGHPUT_AVG_MB_PER_SEC); + statsd:: + ART_DATUM_REPORTED__KIND__ART_DATUM_GC_YOUNG_GENERATION_COLLECTION_THROUGHPUT_AVG_MB_PER_SEC); case DatumId::kFullGcThroughputAvg: return std::make_optional( - statsd::ART_DATUM_REPORTED__KIND__ART_DATUM_GC_FULL_HEAP_COLLECTION_THROUGHPUT_AVG_MB_PER_SEC); + statsd:: + ART_DATUM_REPORTED__KIND__ART_DATUM_GC_FULL_HEAP_COLLECTION_THROUGHPUT_AVG_MB_PER_SEC); case DatumId::kYoungGcTracingThroughputAvg: return std::make_optional( - statsd::ART_DATUM_REPORTED__KIND__ART_DATUM_GC_YOUNG_GENERATION_TRACING_THROUGHPUT_AVG_MB_PER_SEC); + statsd:: + ART_DATUM_REPORTED__KIND__ART_DATUM_GC_YOUNG_GENERATION_TRACING_THROUGHPUT_AVG_MB_PER_SEC); case DatumId::kFullGcTracingThroughputAvg: return std::make_optional( - statsd::ART_DATUM_REPORTED__KIND__ART_DATUM_GC_FULL_HEAP_TRACING_THROUGHPUT_AVG_MB_PER_SEC); + statsd:: + ART_DATUM_REPORTED__KIND__ART_DATUM_GC_FULL_HEAP_TRACING_THROUGHPUT_AVG_MB_PER_SEC); case DatumId::kGcWorldStopTime: - return std::make_optional( - statsd::ART_DATUM_REPORTED__KIND__ART_DATUM_GC_WORLD_STOP_TIME_US); + return std::make_optional(statsd::ART_DATUM_REPORTED__KIND__ART_DATUM_GC_WORLD_STOP_TIME_US); case DatumId::kGcWorldStopTimeDelta: return std::make_optional( statsd::ART_DATUM_DELTA_REPORTED__KIND__ART_DATUM_DELTA_GC_WORLD_STOP_TIME_US); case DatumId::kGcWorldStopCount: - return std::make_optional( - statsd::ART_DATUM_REPORTED__KIND__ART_DATUM_GC_WORLD_STOP_COUNT); + return std::make_optional(statsd::ART_DATUM_REPORTED__KIND__ART_DATUM_GC_WORLD_STOP_COUNT); case DatumId::kGcWorldStopCountDelta: return std::make_optional( statsd::ART_DATUM_DELTA_REPORTED__KIND__ART_DATUM_DELTA_GC_WORLD_STOP_COUNT); @@ -195,6 +197,14 @@ constexpr std::optional<int32_t> EncodeDatumId(DatumId datum_id) { case DatumId::kTimeElapsedDelta: return std::make_optional( statsd::ART_DATUM_DELTA_REPORTED__KIND__ART_DATUM_DELTA_TIME_ELAPSED_MS); + case DatumId::kAppSlowPathDuringYoungGcDurationDelta: + return std::make_optional( + statsd:: + ART_DATUM_DELTA_REPORTED__KIND__ART_DATUM_DELTA_GC_APP_SLOW_PATH_DURING_YOUNG_GENERATION_COLLECTION_DURATION_MILLIS); + case DatumId::kAppSlowPathDuringFullGcDurationDelta: + return std::make_optional( + statsd:: + ART_DATUM_DELTA_REPORTED__KIND__ART_DATUM_DELTA_GC_APP_SLOW_PATH_DURING_FULL_HEAP_COLLECTION_DURATION_MILLIS); } } @@ -215,18 +225,18 @@ constexpr int32_t EncodeCompileFilter(CompilerFilterReporting filter) { case CompilerFilterReporting::kSpeed: return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_SPEED; case CompilerFilterReporting::kEverythingProfile: - return statsd:: - ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_EVERYTHING_PROFILE; + return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_EVERYTHING_PROFILE; case CompilerFilterReporting::kEverything: return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_EVERYTHING; case CompilerFilterReporting::kError: return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_ERROR; case CompilerFilterReporting::kUnknown: - return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_UNKNOWN; + return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_UNKNOWN; case CompilerFilterReporting::kRunFromApk: - return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_FAKE_RUN_FROM_APK; + return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_FAKE_RUN_FROM_APK; case CompilerFilterReporting::kRunFromApkFallback: - return statsd::ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_FAKE_RUN_FROM_APK_FALLBACK; + return statsd:: + ART_DATUM_REPORTED__COMPILE_FILTER__ART_COMPILATION_FILTER_FAKE_RUN_FROM_APK_FALLBACK; } } |