# File lib/new_relic/agent/threading/backtrace_service.rb, line 165
        def poll
          poll_start = Time.now

          @lock.synchronize do
            AgentThread.list.each do |thread|
              sample_thread(thread)
            end
            @profiles.each_value { |p| p.increment_poll_count }
            @buffer.delete_if { |thread, _| !thread.alive? }
          end

          end_time = Time.now
          adjust_polling_time(end_time, poll_start)
          record_supportability_metrics(end_time, poll_start)
        end