forked from tmm1/stackprof
-
Couldn't load subscription status.
- Fork 0
[pull] master from tmm1:master #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pull
wants to merge
59
commits into
jaydave:master
Choose a base branch
from
tmm1:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Even though this use of MD5 isn't for security purposes, MD5 may not be allowed at all on FIPS-compliant systems. Switch to SHA256 to comply with FIPS 140-2 standards.
Fix: #179 YJIT doesn't support being interrupted by signal in random places, and probably will never support it.
Use postponed jobs if YJIT is enabled.
Add Ruby 3.1 to CI
Use postponed jobs on Ruby 2.x
Support installing the gem on TruffleRuby
Switch hash algorithm from MD5 to SHA256
…megraph Show line number in d3-flamegraph
Sometime when you want to profile a ruby process for its entire lifetime, it's a bit complicated to find the proper entrypoint and exit point to insert `StackProf.start` etc. This new CLI command allows to do this easily, e.g: ```bash $ stackprof run -- rubocop --cache false StackProf results dumped at: /var/folders/pg/ykz6j94s7dv_2z4l5x_m17l00000gn/T/stackprof20220914-26008-7iipjc.dump ``` Or for profiling a Rails application boot sequence: ```bash $ stackprof run -- bin/rails runner ':ok' ``` The most common `StackProf.start` arguments can be passed as command line arguments as well.
`stackprof run` CLI
Correct parsing of opts for bin/rubocop
Forward SIGALRM to original thread
Signed-off-by: Aaron Patterson <tenderlove@ruby-lang.org>
Otherwise it can cause a VM crash. Won't be a problem in 3.2.1.
Fix printing CLI banner
Use postponed jobs on Ruby 3.2.0
Ensure VM is running in signal handler
Objects in frames_buffer may not have been placed the frames ST table and may not be held on by Ruby meaning it could get garbage collected.
Mark frames_buffer
Restore pre-C99 compatibility.
Add Ruby 3.2 to CI
This commit removes mocha and cleans up some assertions. I want to reduce the dependencies and get CI green
Remove mocha / clean up assertions
This commit records line numbers in raw mode along with the frame information. Before this commit, stackprof would lose information about callee frames at a particular line. For example, you could not answer "given a frame and line, what function do we call in to at that line?" This commit encodes the line information along with the raw frame information so that we can answer that question. This is probably TMI, but when we ask the Ruby frame profiler, it returns a list of memory addresses (CMEs or possibly iseqs?). AArch64 systems guarantee the top 16 bits won't be used, x86 doesn't use them either (but possibly could in the future, but probably not). Armed with this information, we just put the line number in those top 16 bits and we don't need to allocate any extra memory when doing a profile. For backwards compatibility, this patch splits apart the information in the `.result` method so existing tools should just work.
Add raw line numbers for raw mode
We were recording GC profile timestamps inside the VM postponed job that flushes temporary information. The postponed job could be run much later than the sample was actually taken, so this commit records a timestamp in the signal handler when there is a GC event. It only records one time stamp, so if there are multiple GC events in a row, we have to assume that the total duration spent in GC starts from the first time stamp and extends until the timestamp of the next non-GC sample. In other words, we don't record a correct timestamp for each GC sample, only the first one.
Fix GC profiling timing
Don't use postponed jobs on Ruby 3.3+YJIT
It's a single object so not really worth implementing write barriers or any other advanced features. The only goal here is to stop using a deprecated API.
Migrate to the TypedData API
Add Ruby 3.3 to CI
fix crashes with not-yet fully-initialized stackprof global state
Add Ruby 3.4 to CI
Read only first two bytes to check signature
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.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )