-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture #120089
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
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
@pablogsal will be the proper reviewer. |
@ixgbe00 Thanks a lot for the contribution! This looks good to me but I would like to ensure this works as expected. Have you successfully run "test_perf_profiler" in a RISC-V system? |
yes, I have successfully run "test_perf_profiler" in a RISC-V system. Test environment: Test content refer to https://docs.python.org/3.12/howto/perf_profiling.html (python312_perf_venv) [root@openeuler-riscv64 pytorch]# cat my_script.py def bar(n): def baz(n): if name == "main": We can run perf to sample CPU stack traces at default hertz: Then we can use perf report to analyze the data: Total Lost Samples: 0 Samples: 1K of event 'cycles:P' Overhead Samples Command Shared Object Symbol
|
I think there is some confusion here. The test I mention is the one in the test suite: ./python -m test test_perf_profiler -v |
Great!! Thanks a lot for checking @ixgbe00 👍 |
Misc/NEWS.d/next/Core and Builtins/2024-06-05-06-26-04.gh-issue-
Outdated
Show resolved
Hide resolved
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
@ixgbe00 For us to merge the PR we need an issue number and to correct the NEWS entry. Do you mind opening a issue and changing the PR title per this instructions: https://devguide.python.org/getting-started/pull-request-lifecycle/#submitting (We just need |
Also the NEWS entry file is called |
Thanks for your advice! I will open a issue and change the PR title. |
Congrats on your contribution @ixgbe00! 🚀 |
@Yhg1s This PR adds the trampoline to RISK-V + the configure detection. This is a new feature so technically we should not back port it, but I want us to consider adding it to 3.13 as this is quite isolated from anything else. WDYT? (Feel free to say "no") |
Yeah, it makes sense to backport this fix to the existing feature. |
Thanks @ixgbe00 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…SC-V architecture (pythonGH-120089) (cherry picked from commit 4b1e85b) Co-authored-by: ixgbe00 <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
GH-120413 is a backport of this pull request to the 3.13 branch. |
…ISC-V architecture (GH-120089) (#120413) gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture (GH-120089) (cherry picked from commit 4b1e85b) Co-authored-by: ixgbe00 <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
|
…SC-V architecture (python#120089) Co-authored-by: Pablo Galindo Salgado <[email protected]>
This seems incomplete. It causes compilation to now fail on riscv64, due to missing support in perf_jit_trampoline.c:
|
Until support is added in perf_jit_trampoline.c pythongh-120089 was incomplete.
Until support is added in perf_jit_trampoline.c pythongh-120089 was incomplete.
This has already been reported in #121201 |
…-121328) Disable perf_trampoline on riscv64 for now Until support is added in perf_jit_trampoline.c pythongh-120089 was incomplete. (cherry picked from commit ca2e876) Co-authored-by: Stefano Rivera <[email protected]>
Thank you very much for your reminder. Can we add a test program for perf jit in test_perf_profiler? |
…SC-V architecture (python#120089) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…21328) Disable perf_trampoline on riscv64 for now Until support is added in perf_jit_trampoline.c pythongh-120089 was incomplete.
…SC-V architecture (python#120089) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…21328) Disable perf_trampoline on riscv64 for now Until support is added in perf_jit_trampoline.c pythongh-120089 was incomplete.
Pull Request title
Refer to gh-96143:Allow Linux perf profiler to see Python calls
Refer to gh-96143:Move the perf trampoline files to the Python directory