From 870e1ef4decf2d62ef4413a1b9272ed89e25cd96 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Mar 13 2010 00:09:02 +0000 Subject: - add pyfuntop.stp; allow systemtap support to be disabled - remove trailing period from tkinter summary - don't own /usr/bin/python-config if you're not the main python --- diff --git a/pyfuntop.stp b/pyfuntop.stp new file mode 100644 index 0000000..f235a23 --- /dev/null +++ b/pyfuntop.stp @@ -0,0 +1,21 @@ +#!/usr/bin/stap + +global fn_calls; + +probe python.function.entry +{ + fn_calls[pid(), filename, funcname, lineno] += 1; +} + +probe timer.ms(1000) { + printf("\033[2J\033[1;1H") /* clear screen */ + printf("%6s %80s %6s %30s %6s\n", + "PID", "FILENAME", "LINE", "FUNCTION", "CALLS") + foreach ([pid, filename, funcname, lineno] in fn_calls- limit 20) { + printf("%6d %80s %6d %30s %6d\n", + pid, filename, lineno, funcname, + fn_calls[pid, filename, funcname, lineno]); + } + + delete fn_calls; +} diff --git a/python.spec b/python.spec index a5256d6..99f6021 100644 --- a/python.spec +++ b/python.spec @@ -52,7 +52,7 @@ Summary: An interpreted, interactive, object-oriented programming language Name: %{python} Version: 2.6.4 -Release: 20%{?dist} +Release: 21%{?dist} License: Python Group: Development/Languages Provides: python-abi = %{pybasever} @@ -92,6 +92,9 @@ Source3: libpython.stp # Written by wcohen, mjw, dmalcolm; not yet sent upstream Source4: systemtap-example.stp +# Another example systemtap script that uses the tapset +# Written by dmalcolm; not yet sent upstream +Source5: pyfuntop.stp # Modules/Setup.dist is ultimately used by the "makesetup" script to construct # the Makefile and config.c @@ -247,7 +250,7 @@ Patch54: python-2.6.4-setup-db48.patch # Systemtap support: add statically-defined probe points # Patch based on upstream bug: http://bugs.python.org/issue4111 -# fixed up by mjw and mcohen for 2.6.2, then fixed up by dmalcolm for 2.6.4 +# fixed up by mjw and wcohen for 2.6.2, then fixed up by dmalcolm for 2.6.4 # then rewritten by mjw (attachment 390110 of rhbz 545179) Patch55: python-2.6.4-dtrace.patch @@ -387,7 +390,7 @@ programs, including IDLE (an IDE with editing and debugging facilities), a color editor (pynche), and a python gettext program (pygettext.py). %package -n %{tkinter} -Summary: A graphical user interface for the Python scripting language. +Summary: A graphical user interface for the Python scripting language Group: Development/Languages BuildRequires: tcl, tk Requires: %{name} = %{version}-%{release} @@ -430,6 +433,7 @@ code that uses more than just unittest and/or test_support.py. %if 0%{?with_systemtap} # Provide an example of usage of the tapset: cp -a %{SOURCE4} . +cp -a %{SOURCE5} . %endif # with_systemtap # Ensure that we're using the system copy of various libraries, rather than @@ -473,7 +477,9 @@ rm -r Modules/zlib || exit 1 %patch52 -p0 -b .valgrind %patch53 -p1 -b .db48 %patch54 -p1 -b .setup-db48 +%if 0%{?with_systemtap} %patch55 -p1 -b .systemtap +%endif %ifarch alpha ia64 # 64bit, but not lib64 arches need this too... @@ -879,7 +885,7 @@ rm -fr %{buildroot} %{_libdir}/%{py_INSTSONAME} %if 0%{?with_systemtap} %{tapsetdir}/%{libpython_stp} -%doc systemtap-example.stp +%doc systemtap-example.stp pyfuntop.stp %endif %files devel @@ -889,7 +895,9 @@ rm -fr %{buildroot} %{_includedir}/python%{pybasever}/*.h %exclude %{_includedir}/python%{pybasever}/%{_pyconfig_h} %doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit +%if %{main_python} %{_bindir}/python-config +%endif %{_bindir}/python%{pybasever}-config %{pylibdir}/config/* %{_libdir}/libpython%{pybasever}.so @@ -945,6 +953,11 @@ rm -fr %{buildroot} # payload file would be unpackaged) %changelog +* Fri Mar 12 2010 David Malcolm - 2.6.4-21 +- add pyfuntop.stp; allow systemtap support to be disabled +- remove trailing period from tkinter summary +- don't own /usr/bin/python-config if you're not the main python + * Thu Feb 11 2010 David Malcolm - 2.6.4-20 - avoid having the "test" subdirectory and the files within it that are in the core subpackage also be owned by the test subpackage (rhbz:467588)