Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Suchakra Sharma committed Apr 18, 2016
0 parents commit 5d67292
Show file tree
Hide file tree
Showing 4 changed files with 459 additions and 0 deletions.
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# vmpt
#
# VMCS packet analysis using Intel Processor Trace
# Copyright (c) 2016, Suchakra Sharma <[email protected]>

cmake_minimum_required(VERSION 2.6)

set(CMAKE_PREFIX_PATH /usr/lib64)

find_library( PT_LIBRARY
NAMES libipt ipt
HINTS "${CMAKE_PREFIX_PATH}"
)

set(VMPT_FILES
src/vmpt.c
)

add_executable(vmpt
${VMPT_FILES}
)

target_link_libraries(vmpt ${PT_LIBRARY})
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# VMPT
A simple Intel processor trace decoder based on Intel's [processor-trace](https://github.com/01org/processor-trace) library. It creates bundles of linked PIP, VMCS and TSC packets from a processor trace stream and saves them as as JSON file. Can probably be useful for analyzing VMs using hardware traces.

### Build
VMPT is dependent on [processor-trace](https://github.com/01org/processor-trace) library and `cmake` v2.6+.
```
$ mkdir build && cd build
$ cmake ../
$ make
```

### Test
Start multiple VMs on a Skylake machine and pin them to a single CPU. Get a processor trace snapshot and save it as `snapshot.pt`. Now generate the bundles with VMPT
```
$ ./vmpt snapshot.pt
$ less bundles.json
```

### Licence
Original Copyright holder of processor trace library is Intel. Plese refer `vmpt.c` header.

### Acknowledgements
* Intel folks
* Andi Kleen for [simple-pt](https://github.com/andikleen/simple-pt)
Binary file added snapshot.pt
Binary file not shown.
Loading

0 comments on commit 5d67292

Please sign in to comment.