Skip to content

Commit

Permalink
Simplify dumping stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Sep 2, 2024
1 parent e95d26e commit 9c8b30a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions sentry-ruby/lib/sentry/vernier/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,9 @@ def frames
end

def stacks
sample_stacks = profile.threads.flat_map { |_, thread_info|
thread_info[:samples].map do |stack_id|
stack = profile.stack(stack_id)
[stack.idx, stack.frames.map(&:idx)]
end
}.to_h

stacks = profile._stack_table.stack_count.times.map do |stack_id|
(sample_stacks[stack_id] || profile.stack(stack_id).frames.map(&:idx))
profile._stack_table.stack_count.times.map do |stack_id|
profile.stack(stack_id).frames.map(&:idx)
end

stacks
end

def stack_table_hash
Expand Down

0 comments on commit 9c8b30a

Please sign in to comment.