From 8b4dea1003cd984fd9667b47be1c93890f2804ed Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Mon, 3 Aug 2026 11:45:12 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 958494199 --- tcmalloc/internal/profile_builder_test.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcmalloc/internal/profile_builder_test.cc b/tcmalloc/internal/profile_builder_test.cc index 80790f400..658288e7a 100644 --- a/tcmalloc/internal/profile_builder_test.cc +++ b/tcmalloc/internal/profile_builder_test.cc @@ -574,16 +574,17 @@ TEST(ProfileConverterTest, HeapProfile) { // Require that the default_sample_type appeared in sample_type. EXPECT_THAT(sample_types, testing::Contains(converted.default_sample_type())); - constexpr int kNumSamples = 6; + constexpr int kNumSampleTypes = 9; // This is slightly redundant with the next line, but we need to loop over // each of the samples later. - EXPECT_THAT(extracted_sample_type, SizeIs(kNumSamples)); + EXPECT_THAT(extracted_sample_type, SizeIs(kNumSampleTypes)); EXPECT_THAT( extracted_sample_type, UnorderedElementsAre( Pair("objects", "count"), Pair("space", "bytes"), Pair("resident_space", "bytes"), Pair("stale_space", "bytes"), - Pair("locked_space", "bytes"), Pair("swapped_space", "bytes"))); + Pair("locked_space", "bytes"), Pair("swapped_space", "bytes"), + Pair("zero_space", "bytes"), Pair("trailing_zero_space", "bytes"))); SampleLabels extracted_labels; { @@ -708,6 +709,7 @@ TEST(ProfileConverterTest, HeapProfile) { Pair("objects", 2), }))); + constexpr int kNumSamples = 6; ASSERT_EQ(converted.sample().size(), kNumSamples); // The addresses for the samples at stack[0], stack[1] should match. for (int i = 0; i < kNumSamples; ++i) {