Skip to content

Commit cebb9c4

Browse files
committed
Profiling: update recommended build instructions
1 parent 1256e71 commit cebb9c4

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/hacking/building-servo.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,32 @@ There are three main build profiles, which you can build and use independently o
4747
<th>debug
4848
<th>release
4949
<th>production
50+
<th>profiling
5051
<tbody>
5152
<tr>
5253
<th>mach option
5354
<td><code>-d</code>
5455
<td><code>-r</code>
5556
<td><code>--profile production</code>
57+
<td><code>--profile profiling</code>
5658
<tr>
5759
<th>optimised?
58-
<td>no<td>yes<td>yes
60+
<td>no<td>yes<td>yes (with LTO)<td>yes
5961
<tr>
6062
<th>debug info?
61-
<td>yes<td>no<td>no
63+
<td>yes<td>no<td>no<td>yes
6264
<tr>
6365
<th>debug assertions?
64-
<td>yes<td>yes(!)<td>no
66+
<td>yes<td>yes(!)<td>no<td>no
6567
<tr>
6668
<th>maximum RUST_LOG level
67-
<td><code>trace</code><td><code>info</code><td><code>info</code>
69+
<td><code>trace</code>
70+
<td><code>info</code>
71+
<td><code>info</code>
72+
<td><code>info</code>
6873
<tr>
6974
<th>finds resources in<br>current working dir?
70-
<td>yes<td>yes<td>no
75+
<td>yes<td>yes<td>no(!)<td>yes
7176
</table>
7277

7378
You can change these settings in a servobuild file (see [servobuild.example](https://github.com/servo/servo/blob/b79e2a0b6575364de01b1f89021aba0ec3fcf399/servobuild.example)) or in the root [Cargo.toml](https://github.com/servo/servo/blob/b79e2a0b6575364de01b1f89021aba0ec3fcf399/Cargo.toml).

src/hacking/profiling.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22

33
# Profiling
44

5-
First, ensure that you are building Servo in release (optimized) mode with optimal debugging symbols:
6-
In Cargo.toml:
5+
When profiling Servo or measuring its performance, make sure your build is optimised in a way that still allows for accurate profiling data.
76

8-
```
9-
[profile.release]
10-
debug = true
11-
lto = false
7+
```sh
8+
$ ./mach build --profile profiling --with-frame-pointer
129
```
1310

14-
```
15-
./mach build --release --with-frame-pointers
16-
```
11+
- **--profile profiling** builds Servo with [our profiling configuration](http://localhost:3000/hacking/building-servo.html#build-profiles)
12+
- **--with-frame-pointer** builds Servo with stack frame pointers on all platforms
1713

1814
Several ways to get profiling information about Servo's runs:
1915
* [Interval Profiling](#interval-profiling)

0 commit comments

Comments
 (0)