Skip to content

Commit e78dbcd

Browse files
authored
Remove --no-write-protect-code-memory (#822)
This flag has been removed from V8: https://chromium.googlesource.com/v8/v8.git/+/dce30c643f280780e6679cfd632c7fa71116455f%5E%21/
1 parent a4abcba commit e78dbcd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/docs/linux-perf.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ This requires a two-step process, first `perf record` creates a `perf.data` file
9696
perf record --call-graph=fp --clockid=mono --freq=max \
9797
--output=perf.data
9898
out/x64.release/d8 \
99-
--perf-prof --no-write-protect-code-memory \
100-
--interpreted-frames-native-stack \
99+
--perf-prof --interpreted-frames-native-stack \
101100
test.js;
102101
perf inject --jit --input=perf.data --output=perf.data.jitted;
103102
perf report --input=perf.data.jitted;
@@ -107,8 +106,6 @@ perf report --input=perf.data.jitted;
107106

108107
[`--perf-prof`](https://source.chromium.org/search?q=FLAG_perf_prof) is used to the V8 command-line to record performance samples in JIT code.
109108

110-
[`--nowrite-protect-code-memory`](https://source.chromium.org/search?q=FLAG_nowrite_protect_code_memory) is required to disable write protection for code memory. This is necessary because `perf` discards information about code pages when it sees the event corresponding to removing the write bit from the code page. Here’s an example that records samples from a test JavaScript file:
111-
112109
[`--interpreted-frames-native-stack`](https://source.chromium.org/search?q=FLAG_interpreted_frames_native_stack) is used to create different entry points (copied versions of InterpreterEntryTrampoline) for interpreted functions so they can be distinguished by `perf` based on the address alone. Since the InterpreterEntryTrampoline has to be copied this comes at slight performance and memory regression.
113110

114111

@@ -122,7 +119,7 @@ perf report --input=perf.data.jitted;
122119
out/x64.release/chrome \
123120
--user-data-dir=`mktemp -d` \
124121
--no-sandbox --incognito --enable-benchmarking \
125-
--js-flags='--perf-prof --no-write-protect-code-memory --interpreted-frames-native-stack'
122+
--js-flags='--perf-prof --interpreted-frames-native-stack'
126123
```
127124

128125
1. After starting up chrome, find the renderer process id using the Task Manager and use it to start profiling:

0 commit comments

Comments
 (0)