docs: explain perf install/sudo foo

This commit is contained in:
Maarten A. Breddels 2020-12-15 14:58:14 +01:00
parent b4488bff82
commit ede531f7d7
1 changed files with 17 additions and 0 deletions

View File

@ -3,10 +3,27 @@
This project aims to (at least demonstrate) how to combine the Linux perf tool (aka perf_events) with [viztracer](https://github.com/gaogaotiantian/viztracer) to visualize the GIL (rather process states) and various profiling statistics, or hardware performance counters. This project aims to (at least demonstrate) how to combine the Linux perf tool (aka perf_events) with [viztracer](https://github.com/gaogaotiantian/viztracer) to visualize the GIL (rather process states) and various profiling statistics, or hardware performance counters.
# Installation # Installation
## Python side
From PyPy From PyPy
$ pip install per4m $ pip install per4m
## Linux side
Install perf
$ sudo yum install perf
Enable users to run perf (use at own risk)
$ sudo sysctl kernel.perf_event_paranoid=-1
Enable users to see schedule trace events:
$ sudo mount -o remount,mode=755 /sys/kernel/debug
$ sudo mount -o remount,mode=755 /sys/kernel/debug/tracing
# Usage # Usage
$ per4m giltracer -m per4m.example2 $ per4m giltracer -m per4m.example2