Skip to content

Build trace-cruncher as Python pakage

Yordan Karadzhov (VMware) linux-trace-devel 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest11 patches 0 repliesNew
  2. v311 patches 0 repliesSuperseded
  3. v29 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v19 patches2 repliesSuperseded

Changes in v2 from the cover letter

- Addressing the comments made by Steven in his review.
- Start using the libtracefs APIs for enable/disable events.
- Add functionalities for enable/disable event filters.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11trace-cruncher: Refactor the part that wraps ftracesetup.py src/common.h src/ftracepy-utils.c +2 more+2117 -00 replies
2/11trace-cruncher: Add basic methods for tracingsrc/ftracepy-utils.c src/ftracepy-utils.h src/ftracepy.c+361 -00 replies
3/11trace-cruncher: Refactor the part that wraps libksharksetup.py src/ksharkpy-utils.c src/ksharkpy-utils.h +3 more+804 -20 replies
4/11trace-cruncher: Add "utils"tracecruncher/__init__.py tracecruncher/ft_utils.py tracecruncher/ks_utils.py+246 -00 replies
5/11trace-cruncher: Refactor the examplesexamples/gpareto_fit.py examples/page_faults.py examples/sched_wakeup.py+30 -4880 replies
6/11trace-cruncher: Add ftracefy exampleexamples/start_tracing.py+20 -00 replies
6/11trace-cruncher: Add ftracepy exampleexamples/start_tracing.py+20 -00 replies
7/11trace-cruncher: Add MakefileMakefile+33 -00 replies
8/11trace-cruncher: Update README.mdREADME.md+54 -300 replies
9/11trace-cruncher: Remove all leftover files.0001-kernel-shark-Add-_DEVEL-build-flag.patch 0002-kernel-shark-Add-reg_pid-plugin.patch clean.sh +4 more+0 -10260 replies
10/11trace-cruncher: Add testingtests/0_get_data/__init__.py tests/0_get_data/test_get_data.py tests/1_unit/__init__.py +7 more+748 -00 replies
11/11trace-cruncher: Add github workflow for CI testing.github/workflows/main.yml+58 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 00/11] Build trace-cruncher as Python pakage

This patch-set restructures the project and makes it build as a native Python package. Although it looks like a complete rewrite, this is essentially just a switching from using Cython to using directly the C API of Python. Cython is still being used but only for the implementation of the NumPy data wrapper. The functionalities that are wrapping Ftrace are extended substantially. This is possible due to switching to use of the recently released libraries: libtraceevent and libtracefs.

Major changes in v4:
- More robust signal handling in iterate_trace() (PATCH 02/11).

Major changes in v3:
- More basic methods for tracing are added ([PATCH 02/11] new).
- Auto-naming of the instances is sypported.
- Recently implemented new APIs in libtracefs are adopted.

Changes in v2:
- Addressing the comments made by Steven in his review.
- Start using the libtracefs APIs for enable/disable events.
- Add functionalities for enable/disable event filters.

Yordan Karadzhov (VMware) (11):
trace-cruncher: Refactor the part that wraps ftrace
trace-cruncher: Add basic methods for tracing
trace-cruncher: Refactor the part that wraps libkshark
trace-cruncher: Add "utils"
trace-cruncher: Refactor the examples
trace-cruncher: Add ftracepy example
trace-cruncher: Add Makefile
trace-cruncher: Update README.md
trace-cruncher: Remove all leftover files.
trace-cruncher: Add testing
trace-cruncher: Add github workflow for CI testing

 .github/workflows/main.yml                    |   58 +
 0001-kernel-shark-Add-_DEVEL-build-flag.patch |   90 -
 0002-kernel-shark-Add-reg_pid-plugin.patch    |  231 --
 Makefile                                      |   33 +
 README.md                                     |   84 +-
 clean.sh                                      |    6 -
 examples/gpareto_fit.py                       |  328 ---
 examples/ksharksetup.py                       |   24 -
 examples/page_faults.py                       |  120 --
 examples/sched_wakeup.py                      |   70 +-
 examples/start_tracing.py                     |   20 +
 libkshark-py.c                                |  224 --
 libkshark_wrapper.pyx                         |  361 ----
 np_setup.py                                   |   90 -
 setup.py                                      |   81 +
 src/common.h                                  |  105 +
 src/ftracepy-utils.c                          | 1869 +++++++++++++++++
 src/ftracepy-utils.h                          |  144 ++
 src/ftracepy.c                                |  292 +++
 src/ksharkpy-utils.c                          |  411 ++++
 src/ksharkpy-utils.h                          |   41 +
 src/ksharkpy.c                                |   94 +
 src/npdatawrapper.pyx                         |  203 ++
 src/trace2matrix.c                            |   40 +
 tests/0_get_data/__init__.py                  |    0
 tests/0_get_data/test_get_data.py             |   26 +
 tests/1_unit/__init__.py                      |    0
 tests/1_unit/test_01_ftracepy_unit.py         |  471 +++++
 tests/1_unit/test_02_datawrapper_unit.py      |   41 +
 tests/1_unit/test_03_ksharkpy_unit.py         |   72 +
 tests/2_integration/__init__.py               |    0
 .../test_01_ftracepy_integration.py           |  113 +
 .../test_03_ksharkpy_integration.py           |   25 +
 tests/__init__.py                             |    0
 tracecruncher/__init__.py                     |    0
 tracecruncher/ft_utils.py                     |   19 +
 tracecruncher/ks_utils.py                     |  227 ++
 37 files changed, 4469 insertions(+), 1544 deletions(-)
 create mode 100644 .github/workflows/main.yml
 delete mode 100644 0001-kernel-shark-Add-_DEVEL-build-flag.patch
 delete mode 100644 0002-kernel-shark-Add-reg_pid-plugin.patch
 create mode 100644 Makefile
 delete mode 100755 clean.sh
 delete mode 100755 examples/gpareto_fit.py
 delete mode 100644 examples/ksharksetup.py
 delete mode 100755 examples/page_faults.py
 create mode 100755 examples/start_tracing.py
 delete mode 100644 libkshark-py.c
 delete mode 100644 libkshark_wrapper.pyx
 delete mode 100755 np_setup.py
 create mode 100644 setup.py
 create mode 100644 src/common.h
 create mode 100644 src/ftracepy-utils.c
 create mode 100644 src/ftracepy-utils.h
 create mode 100644 src/ftracepy.c
 create mode 100644 src/ksharkpy-utils.c
 create mode 100644 src/ksharkpy-utils.h
 create mode 100644 src/ksharkpy.c
 create mode 100644 src/npdatawrapper.pyx
 create mode 100644 src/trace2matrix.c
 create mode 100644 tests/0_get_data/__init__.py
 create mode 100755 tests/0_get_data/test_get_data.py
 create mode 100644 tests/1_unit/__init__.py
 create mode 100644 tests/1_unit/test_01_ftracepy_unit.py
 create mode 100755 tests/1_unit/test_02_datawrapper_unit.py
 create mode 100755 tests/1_unit/test_03_ksharkpy_unit.py
 create mode 100644 tests/2_integration/__init__.py
 create mode 100755 tests/2_integration/test_01_ftracepy_integration.py
 create mode 100755 tests/2_integration/test_03_ksharkpy_integration.py
 create mode 100644 tests/__init__.py
 create mode 100644 tracecruncher/__init__.py
 create mode 100644 tracecruncher/ft_utils.py
 create mode 100644 tracecruncher/ks_utils.py
Signature · 1 line
2.27.0