fix: Log empty samples instead of collecting stacks for idle threads#2013
Merged
Conversation
indragiek
requested review from
armcknight,
brustolin and
philipphofmann
as code owners
July 27, 2022 23:58
armcknight
approved these changes
Jul 28, 2022
armcknight
left a comment
Member
There was a problem hiding this comment.
Nice, got the old test back too 👍🏻
indragiek
force-pushed
the
indragiek/idle-thread-empty-sample
branch
from
July 28, 2022 02:45
8ea353d to
b06d08e
Compare
Member
Author
|
The failures in |
kevinrenskers
added a commit
that referenced
this pull request
Aug 1, 2022
* master: ci: benchmarking and profile generation improvements (#2022) release: 7.23.0 fix: Bad merge on CHANGELOG.md (#2020) fix: Log empty samples instead of collecting stacks for idle threads (#2013) fix: Handle failure to read thread priority gracefully (#2015) fix: Remove logging that could occur while a thread is suspended (#2014) fix: Use constant for max thread name size instead of magic number (#2012) Disable flaky tesDefaultMaxEnvelopesConcurrent (#2018) Fix build failure in unit tests (#2019) Fix address sanitizer compilation error (#1996) fix: Sauce labs iPhone 13 pro iOS version feat: Add transaction to baggage and trace headers (#1992) ci: fix ui thread starvation in benchmarks (#2009) fix: Add more descriptive deprecation message for enableProfiling (#2011) feat: Add sampling configuration for profiling (#2004) fix log message option name (#2006) meta: add armcknight as a codeowner (#2008) release: 7.22.0 fix: Disable broken LaunchUITests to unblock release (#2003) # Conflicts: # Samples/iOS-Swift/iOS-Swift/ViewControllers/PerformanceViewController.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
💡 Motivation and Context
Collecting stacks for idle threads produces this kind of data, where we have a stack that just shows the thread waiting on a function like
mach_msg_trap. Instead of collecting these stacks, we can just log an empty sample, which will prevent it from rendering in the flamegraph.This also fixes a bug in iOS 12 where we would repeatedly fail to suspend an idle thread, which broke some tests (#2000). With this new implementation we won't attempt to suspend an idle thread.
💚 How did you test it?
SentrySamplingProfilerLaunchUITestsand verify that they pass📝 Checklist
🔮 Next steps