Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

yordan-karadzhov/kernel-shark-2.alpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is used to track the prototypes, tested as part of
the development of version 2.0 of the KernelShark.

WARNING: This version is not considered stable.


Third Party Software:
------------------------------------------------------------
KernelShark has the following external dependencies:
  Cmake, Json-C, OpenGL/Glut, Qt5Base.

1. In order to install the packages on Ubuntu do the following:
    sudo apt-get install build-essential git cmake libjson-c-dev -y
    sudo apt-get install freeglut3-dev libxmu-dev libxi-dev -y
    sudo apt-get install qtbase5-dev -y

1.1 I you want to be able to generate Doxygen documentation:
    sudo apt-get install graphviz doxygen-gui -y


2. In order to install the packages on Fedora, as root do the following:
    dnf install gcc gcc-c++ git cmake json-c-devel -y
    dnf install freeglut-devel redhat-rpm-config -y
    dnf install qt5-qtbase-devel -y

2.1 I you want to be able to generate Doxygen documentation:
    dnf install graphviz doxygen -y

3.1 Get the latest version of trace-cmd:
    git clone git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git

3.2 Install trace-cmd:
    cd trace-cmd
    sudo make install
    sudo make install_libs

Building:
------------------------------------------------------------
1. Building KernelShark:
      cd kernel-shark/build
      cmake ../
      make
      sudo make install (optional)

1.1 In order to create a Doxygen documentation add -D_DOXYGEN_DOC=1
as a CMake Command-Line option.

1.2 By default, installation prefix is "/usr/local". It can be changed using
-D_INSTALL_PREFIX= as a CMake Command-Line option.

1.3 In addition to the standard CMake build types (Debug, Release,
RelWithDebInfo, MinSizeRel) KernelShark supports a "Package" build type.
By default this build type adds the "-O2" compiler flag. Package maintainers
can chose their own compiler flags by providing the corresponding
CMAKE_XXXX_FLAGS_PACKAGE Command-Line options (see the example below).

1.3.1 Default compiler options for all CMake build types:
  BUILD_TYPE=Debug           - "-g"
  BUILD_TYPE=Release         - "-O3"
  BUILD_TYPE=RelWithDebInfo  - "-g -O2" (default for KernelShark)
  BUILD_TYPE=MinSizeRel      - "-Os"

-- Note that when built as a "Package" the RPATH-s of the executables are
set directly to _INSTALL_PREFIX/lib/kernelshark/

-- Note that when built as a "Debug" the "Record" dialog will try to use the
version of the trace-cmd executable from the build location. In all other cases
the dialog will derive the absolut path to the trace-cmd executable from
"_INSTALL_PREFIX", hence the dialog will use the installed version.

If no build types is specified, the type will be "RelWithDebInfo".

1.4 In order to be able to install a development version (including
headers e.t.c) add -D_DEVEL=1 as a CMake Command-Line option.

Examples:

    cmake -D_DEVEL=1 -D_INSTALL_PREFIX=/usr ../

    cmake -DCMAKE_BUILD_TYPE=Package -DCMAKE_C_FLAGS_PACKAGE="-O3 -pedantic"  ../

1.5 Use the script "cmake_clean.sh" if you want to delete all already
compiled objects and all files generated by CMake. Use the script
"cmake_uninstall.sh" if you want to delete all installed files.

    cd kernel-shark/build
    ./cmake-clean.sh
    ./cmake_uninstall.sh

2. After building the code "kernel-shark/lib" will contain all libraries
and "kernel-shark/bin" will contain all executables.