From e4dc67aaa984536f8d0c1ee3adaa806f7555a8f9d5e3c9f1468cdede238269ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Fri, 7 Nov 2025 11:50:13 +0100 Subject: [PATCH] New subpackage profiling --- python315.changes | 1 + python315.spec | 28 +++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/python315.changes b/python315.changes index dfed2b4..b245db5 100644 --- a/python315.changes +++ b/python315.changes @@ -1749,6 +1749,7 @@ Fri Oct 24 21:45:47 UTC 2025 - Matej Cepl of at the compile time to support cross-compiling. Remove the internal macro _Py_NORMALIZE_CENTURY. - gh-127545: Fix crash when building on Linux/m68k. +- New subpackage profiling - Remove upstreamed patches: - gh138131-exclude-pycache-from-digest.patch diff --git a/python315.spec b/python315.spec index 2ae46ac..6b72d6d 100644 --- a/python315.spec +++ b/python315.spec @@ -362,6 +362,29 @@ Provides: python3-dbm An easy to use interface for Unix DBM databases, and more specifically, the GNU implementation GDBM. +%package -n %{python_pkg_name}-profiling +Summary: Python Statistical Sampling Profiler +Requires: %{python_pkg_name} = %{version} +%obsolete_python_versioned profiling +%if %{primary_interpreter} +Provides: python3-profiling +%endif + +%description -n %{python_pkg_name}-profiling +Statistical sampling profiler as profiling.sampling. This +profiler enables low-overhead performance analysis of running +Python processes without requiring code modification or process +restart. + +Unlike deterministic profilers (cProfile and profile) that +instrument every function call, the sampling profiler +periodically captures stack traces from running processes. +This approach provides virtually zero overhead while achieving +sampling rates of up to 1,000,000 Hz, making it the fastest +sampling profiler available for Python (at the time of its +contribution) and ideal for debugging performance issues in +production environments. + %package -n %{python_pkg_name}-idle Summary: An Integrated Development Environment for Python Requires: %{python_pkg_name} = %{version} @@ -799,7 +822,7 @@ install -d -m 755 %{buildroot}%{sitedir}/site-packages/__pycache__ mkdir -p %{buildroot}%{_prefix}/lib/python%{python_abi}/site-packages/__pycache__ # cleanup parts that don't belong -for dir in curses dbm sqlite3 tkinter idlelib; do +for dir in curses dbm sqlite3 tkinter idlelib profiling; do find "%{buildroot}/%{sitedir}/$dir"/* -maxdepth 0 -name "test" -o -exec rm -rf {} + done @@ -941,6 +964,9 @@ fi %dir %{_datadir}/icons/hicolor/48x48 %dir %{_datadir}/icons/hicolor/*/apps +%files -n %{python_pkg_name}-profiling +%{sitedir}/profiling + # endif for if general %endif