File: trace.sh

package info (click to toggle)
wayvnc 0.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 836 kB
  • sloc: ansic: 8,928; xml: 2,660; sh: 430; python: 127; makefile: 4
file content (30 lines) | stat: -rwxr-xr-x 447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

set -e

EVENTS="sdt_wayvnc:* sdt_neatvnc:*"

delete_all_events()
{
	for e in $EVENTS; do
		sudo perf probe -d "$e" || true
	done
}

add_all_events()
{
	for e in $EVENTS; do
		sudo perf probe "$e"
	done
}

sudo perf buildid-cache -a build/wayvnc
sudo perf buildid-cache -a build/subprojects/neatvnc/libneatvnc.so

delete_all_events
add_all_events

trap "sudo chown $USER:$USER perf.data*" EXIT

sudo perf record -aR -e ${EVENTS// /,}