Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Latest commit

 

History

History
50 lines (45 loc) · 2.35 KB

README.md

File metadata and controls

50 lines (45 loc) · 2.35 KB

XenTrace plugin for KernelShark

This plugin allows you to view the traces generated by XenTrace on KernelShark-v2.
This is a project for the final three-year degree exam at the University of Turin.
Development is supervised by Dario Faggioli (@dfaggioli) and Enrico Bini (@ebni).


A "freelance" implementation of this project using the Rust programming language can be found at this repository: giuseppe998e/kernelshark-xentrace-plugin-rs.


Building

Dependencies

  • xen (opt.)
  • kernelshark-v2 (opt.)
  • json-c

Testing/Development

$ git clone --recurse-submodules https://github.com/giuseppe998e/kernelshark-xentrace-plugin.git
$ cd kernelshark-xentrace-plugin/
$ make CFLAGS="-fPIC -Wall -g -DDEBUG"

N.B. KernelShark should be compiled with the argument -DCMAKE_BUILD_TYPE=Debug for a better debugging experience.

Optimized for usage

$ git clone --recurse-submodules https://github.com/giuseppe998e/kernelshark-xentrace-plugin.git
$ cd kernelshark-xentrace-plugin/
$ make

Usage

$ export XEN_CPUHZ=3,6G # Sets the CPU speed used (in (G)hz / (M)hz / (K)hz / hz )
$ export XEN_ABSTS=1    # Sets the timestamp as absolute value ( 1 / Y / y ) (WIP)
$ kernelshark -p out/ks-xentrace.so trace.xen

N.B. When environment variables are not set, the plugin uses predefined values: 2,4G and 0 respectively.

License

This plugin is released under the GNU Lesser General Public License v2.1 (or later).
This plugin uses code from various projects:

  • libkshark.h and libkshark-plugin.h, from KernelShark-v2.beta, released under the LGPLv2.1;
  • trace.h, from Xen, released under the MIT License;
  • XenTrace-Parser released under the LGPLv2.1.