Index: runtime/vm/profiler_service.cc |
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc |
index 8b9bee9489e861ece363d122e87e3e01413d9711..5290e0697d0be85c47e5d1afba05d6069c55d92d 100644 |
--- a/runtime/vm/profiler_service.cc |
+++ b/runtime/vm/profiler_service.cc |
@@ -2670,19 +2670,16 @@ void ProfilerService::PrintJSONImpl(Thread* thread, |
class NoAllocationSampleFilter : public SampleFilter { |
public: |
- NoAllocationSampleFilter(Dart_Port port, |
+ NoAllocationSampleFilter(Isolate* isolate, |
intptr_t thread_task_mask, |
int64_t time_origin_micros, |
int64_t time_extent_micros) |
- : SampleFilter(port, |
+ : SampleFilter(isolate, |
thread_task_mask, |
time_origin_micros, |
time_extent_micros) {} |
- bool FilterSample(Sample* sample) { |
- return !sample->is_allocation_sample() && |
- !sample->is_native_allocation_sample(); |
- } |
+ bool FilterSample(Sample* sample) { return !sample->is_allocation_sample(); } |
}; |
@@ -2693,7 +2690,7 @@ void ProfilerService::PrintJSON(JSONStream* stream, |
int64_t time_extent_micros) { |
Thread* thread = Thread::Current(); |
Isolate* isolate = thread->isolate(); |
- NoAllocationSampleFilter filter(isolate->main_port(), Thread::kMutatorTask, |
+ NoAllocationSampleFilter filter(isolate, Thread::kMutatorTask, |
time_origin_micros, time_extent_micros); |
const bool as_timeline = false; |
PrintJSONImpl(thread, stream, tag_order, extra_tags, &filter, as_timeline); |
@@ -2702,12 +2699,12 @@ void ProfilerService::PrintJSON(JSONStream* stream, |
class ClassAllocationSampleFilter : public SampleFilter { |
public: |
- ClassAllocationSampleFilter(Dart_Port port, |
+ ClassAllocationSampleFilter(Isolate* isolate, |
const Class& cls, |
intptr_t thread_task_mask, |
int64_t time_origin_micros, |
int64_t time_extent_micros) |
- : SampleFilter(port, |
+ : SampleFilter(isolate, |
thread_task_mask, |
time_origin_micros, |
time_extent_micros), |
@@ -2725,21 +2722,6 @@ class ClassAllocationSampleFilter : public SampleFilter { |
}; |
-class NativeAllocationSampleFilter : public SampleFilter { |
- public: |
- NativeAllocationSampleFilter(intptr_t thread_task_mask, |
- int64_t time_origin_micros, |
- int64_t time_extent_micros) |
- : SampleFilter(ILLEGAL_PORT, |
- thread_task_mask, |
- time_origin_micros, |
- time_extent_micros) {} |
- bool FilterSample(Sample* sample) { |
- return sample->is_native_allocation_sample(); |
- } |
-}; |
- |
- |
void ProfilerService::PrintAllocationJSON(JSONStream* stream, |
Profile::TagOrder tag_order, |
const Class& cls, |
@@ -2747,24 +2729,8 @@ void ProfilerService::PrintAllocationJSON(JSONStream* stream, |
int64_t time_extent_micros) { |
Thread* thread = Thread::Current(); |
Isolate* isolate = thread->isolate(); |
- ClassAllocationSampleFilter filter(isolate->main_port(), cls, |
- Thread::kMutatorTask, time_origin_micros, |
- time_extent_micros); |
- const bool as_timeline = false; |
- PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter, as_timeline); |
-} |
- |
- |
-void ProfilerService::PrintNativeAllocationJSON(JSONStream* stream, |
- Profile::TagOrder tag_order, |
- int64_t time_origin_micros, |
- int64_t time_extent_micros) { |
- Thread* thread = Thread::Current(); |
- const intptr_t thread_task_mask = Thread::kMutatorTask | |
- Thread::kCompilerTask | |
- Thread::kSweeperTask | Thread::kMarkerTask; |
- NativeAllocationSampleFilter filter(thread_task_mask, time_origin_micros, |
- time_extent_micros); |
+ ClassAllocationSampleFilter filter(isolate, cls, Thread::kMutatorTask, |
+ time_origin_micros, time_extent_micros); |
const bool as_timeline = false; |
PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter, as_timeline); |
} |
@@ -2779,8 +2745,8 @@ void ProfilerService::PrintTimelineJSON(JSONStream* stream, |
const intptr_t thread_task_mask = Thread::kMutatorTask | |
Thread::kCompilerTask | |
Thread::kSweeperTask | Thread::kMarkerTask; |
- NoAllocationSampleFilter filter(isolate->main_port(), thread_task_mask, |
- time_origin_micros, time_extent_micros); |
+ NoAllocationSampleFilter filter(isolate, thread_task_mask, time_origin_micros, |
+ time_extent_micros); |
const bool as_timeline = true; |
PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter, as_timeline); |
} |