@@ -775,21 +775,6 @@ void SampleBlockBuffer::FreeCompletedBlocks() {
775775 }
776776}
777777
778- bool SampleBlock::HasStreamableSamples (const GrowableObjectArray& tag_table,
779- UserTag* tag) {
780- for (intptr_t i = 0 ; i < capacity_; ++i) {
781- Sample* sample = At (i);
782- uword sample_tag = sample->user_tag ();
783- for (intptr_t j = 0 ; j < tag_table.Length (); ++j) {
784- *tag ^= tag_table.At (j);
785- if (tag->tag () == sample_tag && tag->streamable ()) {
786- return true ;
787- }
788- }
789- }
790- return false ;
791- }
792-
793778static void FlushSampleBlocks (Isolate* isolate) {
794779 ASSERT (isolate != nullptr );
795780
@@ -1910,37 +1895,7 @@ void SampleBlockProcessor::Cleanup() {
19101895 ASSERT (!thread_running_);
19111896}
19121897
1913- class StreamableSampleFilter : public SampleFilter {
1914- public:
1915- StreamableSampleFilter (Dart_Port port, const Isolate* isolate)
1916- : SampleFilter(port, kNoTaskFilter , -1 , -1 , true ), isolate_(isolate) {}
1917-
1918- bool FilterSample (Sample* sample) override {
1919- const UserTag& tag =
1920- UserTag::Handle (UserTag::FindTagById (isolate_, sample->user_tag ()));
1921- return tag.streamable ();
1922- }
1923-
1924- private:
1925- const Isolate* isolate_;
1926- };
1927-
1928- void Profiler::ProcessCompletedBlocks (Isolate* isolate) {
1929- if (!Service::profiler_stream.enabled ()) return ;
1930- auto thread = Thread::Current ();
1931- if (Isolate::IsSystemIsolate (isolate)) return ;
1932-
1933- TIMELINE_DURATION (thread, Isolate, " Profiler::ProcessCompletedBlocks" )
1934- DisableThreadInterruptsScope dtis (thread);
1935- StackZone zone (thread);
1936- HandleScope handle_scope (thread);
1937- StreamableSampleFilter filter (isolate->main_port (), isolate);
1938- Profile profile;
1939- profile.Build (thread, isolate, &filter, Profiler::sample_block_buffer ());
1940- ServiceEvent event (isolate, ServiceEvent::kCpuSamples );
1941- event.set_cpu_profile (&profile);
1942- Service::HandleEvent (&event);
1943- }
1898+ void Profiler::ProcessCompletedBlocks (Isolate* isolate) {}
19441899
19451900void Profiler::IsolateShutdown (Thread* thread) {
19461901 FlushSampleBlocks (thread->isolate ());
0 commit comments