• Home
  • Raw
  • Download

Lines Matching refs:hd

81   HeapTracker hd(&c, false);  in TEST()  local
83 hd.RecordMalloc({}, {}, 0x1, 5, 5, sequence_number, 100 * sequence_number); in TEST()
85 hd.RecordFree(0x1, sequence_number, 100 * sequence_number); in TEST()
86 hd.GetCallstackAllocations([](const HeapTracker::CallstackAllocations&) {}); in TEST()
92 HeapTracker hd(&c, false); in TEST() local
94 hd.RecordMalloc(stack(), DummyBuildIds(stack().size()), 1, 5, 5, in TEST()
97 hd.RecordMalloc(stack2(), DummyBuildIds(stack2().size()), 1, 2, 2, in TEST()
101 hd.GetCallstackAllocations([](const HeapTracker::CallstackAllocations&) {}); in TEST()
102 hd.GetCallstackAllocations([](const HeapTracker::CallstackAllocations&) {}); in TEST()
108 HeapTracker hd(&c, false); in TEST() local
110 hd.RecordMalloc(stack(), DummyBuildIds(stack().size()), 0x1, 5, 5, in TEST()
113 hd.RecordMalloc(stack2(), DummyBuildIds(stack2().size()), 0x2, 2, 2, in TEST()
116 ASSERT_EQ(hd.GetSizeForTesting(stack(), DummyBuildIds(stack().size())), 5u); in TEST()
117 ASSERT_EQ(hd.GetSizeForTesting(stack2(), DummyBuildIds(stack2().size())), 2u); in TEST()
118 ASSERT_EQ(hd.GetTimestampForTesting(), 100 * (sequence_number - 1)); in TEST()
119 hd.RecordFree(0x2, sequence_number, 100 * sequence_number); in TEST()
121 ASSERT_EQ(hd.GetSizeForTesting(stack(), DummyBuildIds(stack().size())), 5u); in TEST()
122 ASSERT_EQ(hd.GetSizeForTesting(stack2(), DummyBuildIds(stack2().size())), 0u); in TEST()
123 ASSERT_EQ(hd.GetTimestampForTesting(), 100 * (sequence_number - 1)); in TEST()
124 hd.RecordFree(0x1, sequence_number, 100 * sequence_number); in TEST()
126 ASSERT_EQ(hd.GetSizeForTesting(stack(), DummyBuildIds(stack().size())), 0u); in TEST()
127 ASSERT_EQ(hd.GetSizeForTesting(stack2(), DummyBuildIds(stack2().size())), 0u); in TEST()
128 ASSERT_EQ(hd.GetTimestampForTesting(), 100 * (sequence_number - 1)); in TEST()
134 HeapTracker hd(&c, true); in TEST() local
136 hd.RecordMalloc(stack(), DummyBuildIds(stack().size()), 0x1, 5, 5, in TEST()
139 hd.RecordMalloc(stack2(), DummyBuildIds(stack2().size()), 0x2, 2, 2, in TEST()
142 hd.RecordFree(0x2, sequence_number, 100 * sequence_number); in TEST()
144 hd.RecordFree(0x1, sequence_number, 100 * sequence_number); in TEST()
146 hd.RecordMalloc(stack2(), DummyBuildIds(stack2().size()), 0x2, 1, 2, in TEST()
148 ASSERT_EQ(hd.max_timestamp(), 200u); in TEST()
149 ASSERT_EQ(hd.GetMaxForTesting(stack(), DummyBuildIds(stack().size())), 5u); in TEST()
150 ASSERT_EQ(hd.GetMaxForTesting(stack2(), DummyBuildIds(stack2().size())), 2u); in TEST()
151 ASSERT_EQ(hd.GetMaxCountForTesting(stack(), DummyBuildIds(stack().size())), in TEST()
153 ASSERT_EQ(hd.GetMaxCountForTesting(stack2(), DummyBuildIds(stack2().size())), in TEST()
160 HeapTracker hd(&c, true); in TEST() local
162 hd.RecordMalloc(stack(), DummyBuildIds(stack().size()), 0x1, 10u, 10u, in TEST()
165 hd.RecordFree(0x1, sequence_number, 100 * sequence_number); in TEST()
167 hd.RecordMalloc(stack2(), DummyBuildIds(stack2().size()), 0x2, 15u, 15u, in TEST()
170 hd.RecordMalloc(stack3(), DummyBuildIds(stack3().size()), 0x3, 15u, 15u, in TEST()
173 hd.RecordFree(0x2, sequence_number, 100 * sequence_number); in TEST()
174 EXPECT_EQ(hd.max_timestamp(), 400u); in TEST()
175 EXPECT_EQ(hd.GetMaxForTesting(stack(), DummyBuildIds(stack().size())), 0u); in TEST()
176 EXPECT_EQ(hd.GetMaxForTesting(stack2(), DummyBuildIds(stack2().size())), 15u); in TEST()
177 EXPECT_EQ(hd.GetMaxForTesting(stack3(), DummyBuildIds(stack3().size())), 15u); in TEST()
178 EXPECT_EQ(hd.GetMaxCountForTesting(stack(), DummyBuildIds(stack().size())), in TEST()
180 EXPECT_EQ(hd.GetMaxCountForTesting(stack2(), DummyBuildIds(stack2().size())), in TEST()
182 EXPECT_EQ(hd.GetMaxCountForTesting(stack3(), DummyBuildIds(stack3().size())), in TEST()
189 HeapTracker hd(&c, false); in TEST() local
193 hd.RecordMalloc(stack(), DummyBuildIds(stack().size()), 0x1, 5, 5, in TEST()
200 ASSERT_EQ(hd.GetSizeForTesting(stack(), DummyBuildIds(stack().size())), 5u); in TEST()
201 ASSERT_EQ(hd.GetTimestampForTesting(), 100 * (sequence_number - 1)); in TEST()
203 ASSERT_EQ(hd.GetSizeForTesting(stack(), DummyBuildIds(stack().size())), 5u); in TEST()
209 HeapTracker hd(&c, false); in TEST() local
211 hd.RecordMalloc(stack(), DummyBuildIds(stack().size()), 0x1, 5, 5, in TEST()
214 hd.RecordMalloc(stack2(), DummyBuildIds(stack2().size()), 0x1, 2, 2, in TEST()
217 EXPECT_EQ(hd.GetSizeForTesting(stack(), DummyBuildIds(stack().size())), 0u); in TEST()
218 EXPECT_EQ(hd.GetSizeForTesting(stack2(), DummyBuildIds(stack2().size())), 2u); in TEST()
219 ASSERT_EQ(hd.GetTimestampForTesting(), 100 * (sequence_number - 1)); in TEST()
224 HeapTracker hd(&c, false); in TEST() local
226 hd.RecordMalloc(stack(), DummyBuildIds(stack().size()), 0x1, 5, 5, 2, 2); in TEST()
227 hd.RecordMalloc(stack2(), DummyBuildIds(stack2().size()), 0x1, 2, 2, 1, 1); in TEST()
228 EXPECT_EQ(hd.GetSizeForTesting(stack(), DummyBuildIds(stack().size())), 5u); in TEST()
229 EXPECT_EQ(hd.GetSizeForTesting(stack2(), DummyBuildIds(stack2().size())), 0u); in TEST()
234 HeapTracker hd(&c, false); in TEST() local
241 hd.RecordFree(p.first, p.second, 100 * p.second); in TEST()
246 hd.RecordMalloc(stack(), DummyBuildIds(stack().size()), addr, 5, 5, in TEST()
250 ASSERT_THAT(hd.GetSizeForTesting(stack(), DummyBuildIds(stack().size())), in TEST()
292 HeapTracker hd(&c, false); in TEST() local
298 hd.RecordFree(operation.address, operation.sequence_number, in TEST()
301 hd.RecordMalloc(*operation.stack, DummyBuildIds(stack().size()), in TEST()
306 hd.GetCallstackAllocations( in TEST()
310 ASSERT_EQ(hd.GetSizeForTesting(s, s_b), s_size); in TEST()
311 ASSERT_EQ(hd.GetSizeForTesting(s2, s2_b), s2_size); in TEST()