Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: runtime/vm/profiler_test.cc

Issue 1199473003: Add storage of class id and state bit to the profiler's Sample (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_test.cc
diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
index 63b77d4b97f7107d66fca9789f8dbf2d707022c2..992fada97668f1e638e677719724982739dbf158 100644
--- a/runtime/vm/profiler_test.cc
+++ b/runtime/vm/profiler_test.cc
@@ -43,7 +43,7 @@ class ProfileSampleBufferTestHelper {
};
-TEST_CASE(ProfilerSampleBufferWrapTest) {
+TEST_CASE(Profiler_SampleBufferWrapTest) {
SampleBuffer* sample_buffer = new SampleBuffer(3);
Isolate* i = reinterpret_cast<Isolate*>(0x1);
EXPECT_EQ(0, ProfileSampleBufferTestHelper::IterateSumPC(i, *sample_buffer));
@@ -68,7 +68,7 @@ TEST_CASE(ProfilerSampleBufferWrapTest) {
}
-TEST_CASE(ProfilerSampleBufferIterateTest) {
+TEST_CASE(Profiler_SampleBufferIterateTest) {
SampleBuffer* sample_buffer = new SampleBuffer(3);
Isolate* i = reinterpret_cast<Isolate*>(0x1);
EXPECT_EQ(0, ProfileSampleBufferTestHelper::IterateCount(i, *sample_buffer));
@@ -88,4 +88,16 @@ TEST_CASE(ProfilerSampleBufferIterateTest) {
delete sample_buffer;
}
+
+TEST_CASE(Profiler_AllocationSampleTest) {
+ Isolate* isolate = Isolate::Current();
+ SampleBuffer* sample_buffer = new SampleBuffer(3);
+ Sample* sample = sample_buffer->ReserveSample();
+ sample->Init(isolate, 0, 0);
+ sample->set_metadata(99);
+ sample->set_is_allocation_sample(true);
+ EXPECT_EQ(99, sample->allocation_cid());
+ delete sample_buffer;
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698