| Index: runtime/vm/profiler_test.cc
|
| diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
|
| index 08d3980cb74327a8544f11615c85330e43ec050d..bcb32618de560cff134e79cb5a41aa302f976a97 100644
|
| --- a/runtime/vm/profiler_test.cc
|
| +++ b/runtime/vm/profiler_test.cc
|
| @@ -68,12 +68,12 @@ class MaxProfileDepthScope : public ValueObject {
|
|
|
| class ProfileSampleBufferTestHelper {
|
| public:
|
| - static intptr_t IterateCount(const Dart_Port port,
|
| + static intptr_t IterateCount(const Isolate* isolate,
|
| const SampleBuffer& sample_buffer) {
|
| intptr_t c = 0;
|
| for (intptr_t i = 0; i < sample_buffer.capacity(); i++) {
|
| Sample* sample = sample_buffer.At(i);
|
| - if (sample->port() != port) {
|
| + if (sample->isolate() != isolate) {
|
| continue;
|
| }
|
| c++;
|
| @@ -82,12 +82,12 @@ class ProfileSampleBufferTestHelper {
|
| }
|
|
|
|
|
| - static intptr_t IterateSumPC(const Dart_Port port,
|
| + static intptr_t IterateSumPC(const Isolate* isolate,
|
| const SampleBuffer& sample_buffer) {
|
| intptr_t c = 0;
|
| for (intptr_t i = 0; i < sample_buffer.capacity(); i++) {
|
| Sample* sample = sample_buffer.At(i);
|
| - if (sample->port() != port) {
|
| + if (sample->isolate() != isolate) {
|
| continue;
|
| }
|
| c += sample->At(0);
|
| @@ -99,7 +99,7 @@ class ProfileSampleBufferTestHelper {
|
|
|
| TEST_CASE(Profiler_SampleBufferWrapTest) {
|
| SampleBuffer* sample_buffer = new SampleBuffer(3);
|
| - Dart_Port i = 123;
|
| + Isolate* i = reinterpret_cast<Isolate*>(0x1);
|
| EXPECT_EQ(0, ProfileSampleBufferTestHelper::IterateSumPC(i, *sample_buffer));
|
| Sample* s;
|
| s = sample_buffer->ReserveSample();
|
| @@ -124,7 +124,7 @@ TEST_CASE(Profiler_SampleBufferWrapTest) {
|
|
|
| TEST_CASE(Profiler_SampleBufferIterateTest) {
|
| SampleBuffer* sample_buffer = new SampleBuffer(3);
|
| - Dart_Port i = 123;
|
| + Isolate* i = reinterpret_cast<Isolate*>(0x1);
|
| EXPECT_EQ(0, ProfileSampleBufferTestHelper::IterateCount(i, *sample_buffer));
|
| Sample* s;
|
| s = sample_buffer->ReserveSample();
|
| @@ -147,7 +147,7 @@ TEST_CASE(Profiler_AllocationSampleTest) {
|
| Isolate* isolate = Isolate::Current();
|
| SampleBuffer* sample_buffer = new SampleBuffer(3);
|
| Sample* sample = sample_buffer->ReserveSample();
|
| - sample->Init(isolate->main_port(), 0, 0);
|
| + sample->Init(isolate, 0, 0);
|
| sample->set_metadata(99);
|
| sample->set_is_allocation_sample(true);
|
| EXPECT_EQ(99, sample->allocation_cid());
|
| @@ -173,11 +173,11 @@ static RawFunction* GetFunction(const Library& lib, const char* name) {
|
|
|
| class AllocationFilter : public SampleFilter {
|
| public:
|
| - AllocationFilter(Dart_Port port,
|
| + AllocationFilter(Isolate* isolate,
|
| intptr_t cid,
|
| int64_t time_origin_micros = -1,
|
| int64_t time_extent_micros = -1)
|
| - : SampleFilter(port,
|
| + : SampleFilter(isolate,
|
| Thread::kMutatorTask,
|
| time_origin_micros,
|
| time_extent_micros),
|
| @@ -239,8 +239,7 @@ TEST_CASE(Profiler_TrivialRecordAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| // Filter for the class in the time range.
|
| - AllocationFilter filter(isolate->main_port(), class_a.id(),
|
| - before_allocations_micros,
|
| + AllocationFilter filter(isolate, class_a.id(), before_allocations_micros,
|
| allocation_extent_micros);
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have 1 allocation sample.
|
| @@ -307,8 +306,8 @@ TEST_CASE(Profiler_TrivialRecordAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id(),
|
| - Dart_TimelineGetMicros(), 16000);
|
| + AllocationFilter filter(isolate, class_a.id(), Dart_TimelineGetMicros(),
|
| + 16000);
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples because none occured within
|
| // the specified time range.
|
| @@ -351,7 +350,7 @@ TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -369,7 +368,7 @@ TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -440,7 +439,7 @@ TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -481,7 +480,7 @@ TEST_CASE(Profiler_CodeTicks) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -504,7 +503,7 @@ TEST_CASE(Profiler_CodeTicks) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have three allocation samples.
|
| EXPECT_EQ(3, profile.sample_count());
|
| @@ -584,7 +583,7 @@ TEST_CASE(Profiler_FunctionTicks) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -607,7 +606,7 @@ TEST_CASE(Profiler_FunctionTicks) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have three allocation samples.
|
| EXPECT_EQ(3, profile.sample_count());
|
| @@ -678,7 +677,7 @@ TEST_CASE(Profiler_IntrinsicAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), double_class.id());
|
| + AllocationFilter filter(isolate, double_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -692,7 +691,7 @@ TEST_CASE(Profiler_IntrinsicAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), double_class.id());
|
| + AllocationFilter filter(isolate, double_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -718,7 +717,7 @@ TEST_CASE(Profiler_IntrinsicAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), double_class.id());
|
| + AllocationFilter filter(isolate, double_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -748,7 +747,7 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), array_class.id());
|
| + AllocationFilter filter(isolate, array_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -762,7 +761,7 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), array_class.id());
|
| + AllocationFilter filter(isolate, array_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -790,7 +789,7 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), array_class.id());
|
| + AllocationFilter filter(isolate, array_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -814,7 +813,7 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), array_class.id());
|
| + AllocationFilter filter(isolate, array_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -862,7 +861,7 @@ TEST_CASE(Profiler_ContextAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), context_class.id());
|
| + AllocationFilter filter(isolate, context_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -876,7 +875,7 @@ TEST_CASE(Profiler_ContextAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), context_class.id());
|
| + AllocationFilter filter(isolate, context_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -900,7 +899,7 @@ TEST_CASE(Profiler_ContextAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), context_class.id());
|
| + AllocationFilter filter(isolate, context_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -943,7 +942,7 @@ TEST_CASE(Profiler_ClosureAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), closure_class.id());
|
| + AllocationFilter filter(isolate, closure_class.id());
|
| filter.set_enable_vm_ticks(true);
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| @@ -971,7 +970,7 @@ TEST_CASE(Profiler_ClosureAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), closure_class.id());
|
| + AllocationFilter filter(isolate, closure_class.id());
|
| filter.set_enable_vm_ticks(true);
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| @@ -1005,7 +1004,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), float32_list_class.id());
|
| + AllocationFilter filter(isolate, float32_list_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -1019,7 +1018,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), float32_list_class.id());
|
| + AllocationFilter filter(isolate, float32_list_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -1043,7 +1042,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), float32_list_class.id());
|
| + AllocationFilter filter(isolate, float32_list_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -1057,7 +1056,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), float32_list_class.id());
|
| + AllocationFilter filter(isolate, float32_list_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should now have two allocation samples.
|
| EXPECT_EQ(2, profile.sample_count());
|
| @@ -1089,7 +1088,7 @@ TEST_CASE(Profiler_StringAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), one_byte_string_class.id());
|
| + AllocationFilter filter(isolate, one_byte_string_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -1103,7 +1102,7 @@ TEST_CASE(Profiler_StringAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), one_byte_string_class.id());
|
| + AllocationFilter filter(isolate, one_byte_string_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -1129,7 +1128,7 @@ TEST_CASE(Profiler_StringAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), one_byte_string_class.id());
|
| + AllocationFilter filter(isolate, one_byte_string_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -1143,7 +1142,7 @@ TEST_CASE(Profiler_StringAllocation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), one_byte_string_class.id());
|
| + AllocationFilter filter(isolate, one_byte_string_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should now have two allocation samples.
|
| EXPECT_EQ(2, profile.sample_count());
|
| @@ -1176,7 +1175,7 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), one_byte_string_class.id());
|
| + AllocationFilter filter(isolate, one_byte_string_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -1190,7 +1189,7 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), one_byte_string_class.id());
|
| + AllocationFilter filter(isolate, one_byte_string_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -1218,7 +1217,7 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), one_byte_string_class.id());
|
| + AllocationFilter filter(isolate, one_byte_string_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -1232,7 +1231,7 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), one_byte_string_class.id());
|
| + AllocationFilter filter(isolate, one_byte_string_class.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should now have two allocation samples.
|
| EXPECT_EQ(2, profile.sample_count());
|
| @@ -1292,7 +1291,7 @@ TEST_CASE(Profiler_FunctionInline) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -1311,7 +1310,7 @@ TEST_CASE(Profiler_FunctionInline) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have 50,000 allocation samples.
|
| EXPECT_EQ(50000, profile.sample_count());
|
| @@ -1429,7 +1428,7 @@ TEST_CASE(Profiler_FunctionInline) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags,
|
| ProfilerService::kCodeTransitionTagsBit);
|
| // We should have 50,000 allocation samples.
|
| @@ -1602,7 +1601,7 @@ TEST_CASE(Profiler_InliningIntervalBoundry) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| @@ -1620,7 +1619,7 @@ TEST_CASE(Profiler_InliningIntervalBoundry) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -1719,7 +1718,7 @@ TEST_CASE(Profiler_ChainedSamples) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have 1 allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -1821,7 +1820,7 @@ TEST_CASE(Profiler_BasicSourcePosition) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation samples.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -1915,7 +1914,7 @@ TEST_CASE(Profiler_BasicSourcePositionOptimized) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation samples.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -2002,7 +2001,7 @@ TEST_CASE(Profiler_SourcePosition) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation samples.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -2127,7 +2126,7 @@ TEST_CASE(Profiler_SourcePositionOptimized) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation samples.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -2235,7 +2234,7 @@ TEST_CASE(Profiler_BinaryOperatorSourcePosition) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation samples.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -2369,7 +2368,7 @@ TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) {
|
| StackZone zone(thread);
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| - AllocationFilter filter(isolate->main_port(), class_a.id());
|
| + AllocationFilter filter(isolate, class_a.id());
|
| profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation samples.
|
| EXPECT_EQ(1, profile.sample_count());
|
| @@ -2428,7 +2427,7 @@ static void InsertFakeSample(SampleBuffer* sample_buffer, uword* pc_offsets) {
|
| Isolate* isolate = Isolate::Current();
|
| Sample* sample = sample_buffer->ReserveSample();
|
| ASSERT(sample != NULL);
|
| - sample->Init(isolate->main_port(), OS::GetCurrentMonotonicMicros(),
|
| + sample->Init(isolate, OS::GetCurrentMonotonicMicros(),
|
| OSThread::Current()->trace_id());
|
| sample->set_thread_task(Thread::kMutatorTask);
|
|
|
|
|