You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perf is used to collect CPU Sampling (cpu-clock) events as LTTng doesn't support capturing these yet. Note: Stacks may require symbol setup
101
+
Perf is used to collect tracepoint events.
102
102
103
-
[perf](https://perf.wiki.kernel.org/) CPU Sampling(cpu-clock)
103
+
[perf](https://perf.wiki.kernel.org/)
104
104
105
105
If you want to trace .NET Core then you need [perfcollect](http://aka.ms/perfcollect) which capture CPU sampling and more
106
106
@@ -109,11 +109,6 @@ If you want to trace .NET Core then you need [perfcollect](http://aka.ms/perfcol
109
109
$ sudo apt-get install linux-tools-common
110
110
```
111
111
112
-
## User-Mode (UM) Symbols Install
113
-
KM symbols are automatically resolved. If you wish to resolve UM cpu sample functions and stacks, you may need to install debug packages for the binary you are profiling
114
-
115
-
For example, [Debug Symbol Packages on Ubuntu](https://wiki.ubuntu.com/Debug%20Symbol%20Packages)
116
-
117
112
## Record a trace
118
113
```bash
119
114
$ sudo /usr/bin/perf record -g -a -F 999 -e cpu-clock,sched:sched_stat_sleep,sched:sched_switch,sched:sched_process_exit -o perf_cpu.data
@@ -124,52 +119,21 @@ $ sudo /usr/bin/perf record -g -a -F 999 -e cpu-clock,sched:sched_stat_sleep,sch
124
119
$ Ctrl-C
125
120
```
126
121
127
-
## Convert trace to text format
128
-
This is to useful along-side the CTF trace to resolve UM IP/Symbols. Similar to what [perfcollect](https://raw.githubusercontent.com/microsoft/perfview/master/src/perfcollect/perfcollect) uses
Place the "captured on" timestamp for example "Thu Oct 17 15:37:36 2019" in a timestamp.txt file next to the trace folder. The timestamp will be interpreted as UTC
156
-
157
122
# Transferring the files to Windows UI (optional)
158
123
You then need to transfer the perf files to a Windows box where WPA runs. The most important file is perf.data.txt
159
124
160
125
```bash
161
-
$ sudo chmod 777 -R perf*
126
+
$ sudo chmod 777 -R perf_cpu.data
162
127
```
163
128
164
129
- Copy files from Linux to Windows box with WinSCP/SCP OR
165
130
```bash
166
-
$ tar -czvf perf_cpu.tar.gz perf*
131
+
$ tar -czvf perf_cpu.tar.gz perf_cpu.data
167
132
```
168
-
- (Optional if you want absolute timestamps) Place timestamp.txt next to perf.data.txt
169
-
- Open perf.data.txt with WPA
170
133
134
+
- Open perf_cpu.data with WPA
171
135
172
136
# Presentations
173
137
174
138
If you want to see a demo or get more in-depth info on using these tools check out a talk given at the [Linux Tracing Summit](https://www.tracingsummit.org/ts/2019/):
175
-
>Linux & Windows Perf Analysis using WPA, ([slides](https://www.tracingsummit.org/ts/2019/files/Tracingsummit2019-wpa-berg-gibeau.pdf)) ([video](https://youtu.be/HUbVaIi-aaw))
139
+
>Linux & Windows Perf Analysis using WPA, ([slides](https://www.tracingsummit.org/ts/2019/files/Tracingsummit2019-wpa-berg-gibeau.pdf)) ([video](https://youtu.be/HUbVaIi-aaw))
0 commit comments