[RFC v2 0/6] NumPy Interface for KernelShark

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NumPy is an efficient multi-dimensional container of generic data.
It uses strong typing in order to provide fast data processing in
Python. The NumPy interface will allow sophisticated analysis of
tracing data via scripts, but it also opens the door for exposing
the kernel tracing data to the instruments provided by the scientific
toolkit of Python (stats, matplotlib, scikit-learn, ...) or maybe
even to PyTorch and TensorFlow in the future.

Disclaimer: I am not very good in Python. Please check as carefully
as possible :-)

Changes in v2:
 - Patch "[RFC 1/7] kernel-shark: kshark_string_config_alloc() must
   take no arguments" has been dropped from the patch-set because it
   was applied by Steven.
 - Proper clean up in the case when data_matrix_alloc() fails to
   allocate memory.
 - in kspy_read_event_field(), tep_find_event() is use instead of
   tep_find_event_by_name(). This makes the retrieval of the field
   value more efficient.
 - Fixed memory leak in kspy_new_session_file().
 - Python code follows the PEP8 Style Guide.
 - load_data() returns a Python dictionary. The user can specify the
   data-fields to be loaded via the named parameters of the function.

IMPORTANT: the patch-set must be applied on top of
[RFC 1/7] kernel-shark: kshark_string_config_alloc() must take no arguments

Yordan Karadzhov (6):
  kernel-shark: Add new dataloading method to be used by the NumPu
    interface
  kernel-shark: Prepare for building the NumPy interface
  kernel-shark: Add the core components of the NumPy API
  kernel-shark: Add Numpy Interface for processing of tracing data
  kernel-shark: Add automatic building of the NumPy interface
  kernel-shark: Add basic example demonstrating the NumPy interface

 kernel-shark/CMakeLists.txt                 |   3 +
 kernel-shark/README                         |  12 +-
 kernel-shark/bin/sched_wakeup.py            | 106 +++++++
 kernel-shark/build/FindNumPy.cmake          |  35 +++
 kernel-shark/build/py/libkshark_wrapper.pyx | 302 ++++++++++++++++++++
 kernel-shark/build/py/np_setup.py           | 101 +++++++
 kernel-shark/build/py/pybuild.sh            |  29 ++
 kernel-shark/src/CMakeLists.txt             |  59 +++-
 kernel-shark/src/libkshark-py.c             | 175 ++++++++++++
 kernel-shark/src/libkshark.c                | 136 +++++++++
 kernel-shark/src/libkshark.h                |   7 +
 11 files changed, 954 insertions(+), 11 deletions(-)
 create mode 100755 kernel-shark/bin/sched_wakeup.py
 create mode 100644 kernel-shark/build/FindNumPy.cmake
 create mode 100644 kernel-shark/build/py/libkshark_wrapper.pyx
 create mode 100644 kernel-shark/build/py/np_setup.py
 create mode 100755 kernel-shark/build/py/pybuild.sh
 create mode 100644 kernel-shark/src/libkshark-py.c

-- 
2.19.1




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux