Skip to content

Commit

Permalink
PT test: Add 20 PT cases with perf tool.
Browse files Browse the repository at this point in the history
Signed-off-by: Ammy Yi <[email protected]>
  • Loading branch information
ammyyi authored and ysun committed Dec 29, 2022
1 parent d926bdc commit 2380112
Show file tree
Hide file tree
Showing 3 changed files with 553 additions and 19 deletions.
39 changes: 20 additions & 19 deletions pt/README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
# PT

Intel Processor Trace (Intel PT) is an extension of Intel Architecture that
captures information about software execution using dedicated hardware facilities
that cause only minimal performance perturbation to the software being traced.

## Build Tips

Need prepare intel-pt.h and libipt.so for building PT related cases.
You can get them in https://github.com/intel/libipt.

## Usage

Need libipt.so.2 and add it into LD_LIBRARY_PATH before running PT cases.
You can build libipt.so.2 in https://github.com/intel/libipt.

```
# Disable branch and check no TIP/FUP/TNT.
./branch
```
Disable branch and check no TIP/FUP/TNT.
```
# User mode trace check
./cpl 1
```
User mode trace check
```
# Kernel mode trace check
./cpl 2
```
Kernel mode trace check
```
# Check if psb package there.
./psb
```
Check if psb package there.
```
# Check reserved bit cannot be set.
./negative_test
```
Check reserved bit cannot be set.
```
# Non root user do full trace check.
./nonroot_test 1
```
Non root user do full trace check.
```
# Non root user do snapshot trace check.
./nonroot_test 2
```
Non root user do snapshot trace check.

## Expected result

All test results should show pass, no fail.
Usage for perf_tests.sh:

1. Make sure latest perf is there.
2. Run case as
```
./perf_tests.sh -t <case name>
```
Loading

0 comments on commit 2380112

Please sign in to comment.