Profiling

Perf profiling:

Tools that can be used to generate/ visualise perf results:

Example using perf on micro_bench_ops and visualising using flamescope:

  1. # build `examples/micro_bench_ops`
  2. cargo build --release --example micro_bench_ops
  3. # run `examples/micro_bench_ops` using perf
  4. sudo perf record -F 49 -a -g -- ./target/release/examples/micro_bench_ops
  5. sudo perf script --header > micro_bench_ops_perf
  6. # now open the file using flamescope

Example running deno_tcp.ts in combination with flamegraph (script.sh):

  1. sudo flamegraph -o flamegraph.svg target/debug/deno run --allow-net cli/bench/deno_tcp.ts &
  2. sleep 1
  3. ./third_party/prebuilt/linux64/wrk http://localhost:4500/
  4. sleep 1
  5. kill `pgrep perf`

v8 profiling:

Example using v8 profiling on micro_bench_ops:

  1. # build `examples/micro_bench_ops`
  2. cargo build --release --example micro_bench_ops
  3. # run `examples/micro_bench_ops`
  4. ./target/release/examples/micro_bench_ops --prof

Example using v8 profiling on deno_tcp.ts:

  1. # build `deno`
  2. cargo build --release
  3. # run `deno_tcp.ts`
  4. ./target/release/deno --v8-flags=--prof --allow-net cli/bench/deno_tcp.ts &
  5. sleep 1
  6. ./third_party/prebuilt/linux64/wrk http://localhost:4500/
  7. sleep 1
  8. kill `pgrep deno`

V8 will write a file in the current directory that looks like this: isolate-0x7fad98242400-v8.log. To examine this file:

  1. node --prof-process isolate-0x7fad98242400-v8.log > prof.log

prof.log will contain information about tick distribution of different calls.

To view the log with Web UI, generate JSON file of the log:

Open rusty_v8/v8/tools/profview/index.html in your browser, and select prof.json to view the distribution graphically.

Useful V8 flags during profiling:

  • —prof
  • —log-internal-timer-events
  • —log-timer-events
  • —track-gc
  • —log-source-code
  • —track-gc-object-stats

To learn more about profiling, check out the following links:

Debugging with LLDB

To debug the deno binary, we can use rust-lldb. It should come with rustc and is a wrapper around LLDB.

  1. $ rust-lldb -- ./target/debug/deno run --allow-net tests/http_bench.ts
  2. # On macOS, you might get warnings like
  3. # `ImportError: cannot import name _remove_dead_weakref`
  4. # In that case, use system python by setting PATH, e.g.
  5. # PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH
  6. (lldb) command script import "/Users/kevinqian/.rustup/toolchains/1.36.0-x86_64-apple-darwin/lib/rustlib/etc/lldb_rust_formatters.py"
  7. (lldb) type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust
  8. (lldb) type category enable Rust
  9. (lldb) target create "../deno/target/debug/deno"
  10. Current executable set to '../deno/target/debug/deno' (x86_64).
  11. (lldb) settings set -- target.run-args "tests/http_bench.ts" "--allow-net"
  12. (lldb) b op_start
  13. (lldb) r

V8 flags

V8 has many many internal command-line flags:

  1. $ deno run --v8-flags=--help _
  2. SSE3=1 SSSE3=1 SSE4_1=1 SSE4_2=1 SAHF=1 AVX=1 FMA3=1 BMI1=1 BMI2=1 LZCNT=1 POPCNT=1 ATOM=0
  3. Synopsis:
  4. shell [options] [--shell] [<file>...]
  5. d8 [options] [-e <string>] [--shell] [[--module] <file>...]
  6. -e execute a string in V8
  7. --shell run an interactive JavaScript shell
  8. --module execute a file as a JavaScript module
  9. Note: the --module option is implicitly enabled for *.mjs files.
  10. The following syntax for options is accepted (both '-' and '--' are ok):
  11. --flag (bool flags only)
  12. --no-flag (bool flags only)
  13. --flag=value (non-bool flags only, no spaces around '=')
  14. --flag value (non-bool flags only)
  15. -- (captures all remaining args in JavaScript)
  16. Options:
  17. --use-strict (enforce strict mode)
  18. type: bool default: false
  19. --es-staging (enable test-worthy harmony features (for internal use only))
  20. type: bool default: false
  21. --harmony (enable all completed harmony features)
  22. type: bool default: false
  23. --harmony-shipping (enable all shipped harmony features)
  24. type: bool default: true
  25. --harmony-regexp-sequence (enable "RegExp Unicode sequence properties" (in progress))
  26. type: bool default: false
  27. --harmony-weak-refs-with-cleanup-some (enable "harmony weak references with FinalizationRegistry.prototype.cleanupSome" (in progress))
  28. type: bool default: false
  29. --harmony-regexp-match-indices (enable "harmony regexp match indices" (in progress))
  30. type: bool default: false
  31. --harmony-top-level-await (enable "harmony top level await")
  32. type: bool default: false
  33. --harmony-namespace-exports (enable "harmony namespace exports (export * as foo from 'bar')")
  34. type: bool default: true
  35. --harmony-sharedarraybuffer (enable "harmony sharedarraybuffer")
  36. type: bool default: true
  37. --harmony-import-meta (enable "harmony import.meta property")
  38. type: bool default: true
  39. --harmony-dynamic-import (enable "harmony dynamic import")
  40. type: bool default: true
  41. --harmony-promise-all-settled (enable "harmony Promise.allSettled")
  42. type: bool default: true
  43. --harmony-promise-any (enable "harmony Promise.any")
  44. type: bool default: true
  45. --harmony-private-methods (enable "harmony private methods in class literals")
  46. type: bool default: true
  47. --harmony-weak-refs (enable "harmony weak references")
  48. type: bool default: true
  49. --harmony-string-replaceall (enable "harmony String.prototype.replaceAll")
  50. type: bool default: true
  51. --harmony-logical-assignment (enable "harmony logical assignment")
  52. type: bool default: true
  53. --lite-mode (enables trade-off of performance for memory savings)
  54. type: bool default: false
  55. --future (Implies all staged features that we want to ship in the not-too-far future)
  56. type: bool default: false
  57. --assert-types (generate runtime type assertions to test the typer)
  58. type: bool default: false
  59. --allocation-site-pretenuring (pretenure with allocation sites)
  60. type: bool default: true
  61. --page-promotion (promote pages based on utilization)
  62. type: bool default: true
  63. --always-promote-young-mc (always promote young objects during mark-compact)
  64. type: bool default: true
  65. --page-promotion-threshold (min percentage of live bytes on a page to enable fast evacuation)
  66. type: int default: 70
  67. --trace-pretenuring (trace pretenuring decisions of HAllocate instructions)
  68. type: bool default: false
  69. --trace-pretenuring-statistics (trace allocation site pretenuring statistics)
  70. type: bool default: false
  71. --track-fields (track fields with only smi values)
  72. type: bool default: true
  73. --track-double-fields (track fields with double values)
  74. type: bool default: true
  75. --track-heap-object-fields (track fields with heap values)
  76. type: bool default: true
  77. --track-computed-fields (track computed boilerplate fields)
  78. type: bool default: true
  79. --track-field-types (track field types)
  80. type: bool default: true
  81. --trace-block-coverage (trace collected block coverage information)
  82. type: bool default: false
  83. --trace-protector-invalidation (trace protector cell invalidations)
  84. type: bool default: false
  85. --feedback-normalization (feed back normalization to constructors)
  86. type: bool default: false
  87. --enable-one-shot-optimization (Enable size optimizations for the code that will only be executed once)
  88. type: bool default: false
  89. --unbox-double-arrays (automatically unbox arrays of doubles)
  90. type: bool default: true
  91. --interrupt-budget (interrupt budget which should be used for the profiler counter)
  92. type: int default: 147456
  93. --jitless (Disable runtime allocation of executable memory.)
  94. type: bool default: false
  95. --use-ic (use inline caching)
  96. type: bool default: true
  97. --budget-for-feedback-vector-allocation (The budget in amount of bytecode executed by a function before we decide to allocate feedback vectors)
  98. type: int default: 1024
  99. --lazy-feedback-allocation (Allocate feedback vectors lazily)
  100. type: bool default: true
  101. --ignition-elide-noneffectful-bytecodes (elide bytecodes which won't have any external effect)
  102. type: bool default: true
  103. --ignition-reo (use ignition register equivalence optimizer)
  104. type: bool default: true
  105. --ignition-filter-expression-positions (filter expression positions before the bytecode pipeline)
  106. type: bool default: true
  107. --ignition-share-named-property-feedback (share feedback slots when loading the same named property from the same object)
  108. type: bool default: true
  109. --print-bytecode (print bytecode generated by ignition interpreter)
  110. type: bool default: false
  111. --enable-lazy-source-positions (skip generating source positions during initial compile but regenerate when actually required)
  112. type: bool default: true
  113. --stress-lazy-source-positions (collect lazy source positions immediately after lazy compile)
  114. type: bool default: false
  115. --print-bytecode-filter (filter for selecting which functions to print bytecode)
  116. type: string default: *
  117. --trace-ignition-codegen (trace the codegen of ignition interpreter bytecode handlers)
  118. type: bool default: false
  119. --trace-ignition-dispatches (traces the dispatches to bytecode handlers by the ignition interpreter)
  120. type: bool default: false
  121. --trace-ignition-dispatches-output-file (the file to which the bytecode handler dispatch table is written (by default, the table is not written to a file))
  122. type: string default: nullptr
  123. --fast-math (faster (but maybe less accurate) math functions)
  124. type: bool default: true
  125. --trace-track-allocation-sites (trace the tracking of allocation sites)
  126. type: bool default: false
  127. --trace-migration (trace object migration)
  128. type: bool default: false
  129. --trace-generalization (trace map generalization)
  130. type: bool default: false
  131. --turboprop (enable experimental turboprop mid-tier compiler.)
  132. type: bool default: false
  133. --concurrent-recompilation (optimizing hot functions asynchronously on a separate thread)
  134. type: bool default: true
  135. --trace-concurrent-recompilation (track concurrent recompilation)
  136. type: bool default: false
  137. --concurrent-recompilation-queue-length (the length of the concurrent compilation queue)
  138. type: int default: 8
  139. --concurrent-recompilation-delay (artificial compilation delay in ms)
  140. type: int default: 0
  141. --block-concurrent-recompilation (block queued jobs until released)
  142. type: bool default: false
  143. --concurrent-inlining (run optimizing compiler's inlining phase on a separate thread)
  144. type: bool default: false
  145. --max-serializer-nesting (maximum levels for nesting child serializers)
  146. type: int default: 25
  147. --trace-heap-broker-verbose (trace the heap broker verbosely (all reports))
  148. type: bool default: false
  149. --trace-heap-broker-memory (trace the heap broker memory (refs analysis and zone numbers))
  150. type: bool default: false
  151. --trace-heap-broker (trace the heap broker (reports on missing data only))
  152. type: bool default: false
  153. --stress-runs (number of stress runs)
  154. type: int default: 0
  155. --deopt-every-n-times (deoptimize every n times a deopt point is passed)
  156. type: int default: 0
  157. --print-deopt-stress (print number of possible deopt points)
  158. type: bool default: false
  159. --opt (use adaptive optimizations)
  160. type: bool default: true
  161. --turbo-sp-frame-access (use stack pointer-relative access to frame wherever possible)
  162. type: bool default: false
  163. --turbo-control-flow-aware-allocation (consider control flow while allocating registers)
  164. type: bool default: true
  165. --turbo-filter (optimization filter for TurboFan compiler)
  166. type: string default: *
  167. --trace-turbo (trace generated TurboFan IR)
  168. type: bool default: false
  169. --trace-turbo-path (directory to dump generated TurboFan IR to)
  170. type: string default: nullptr
  171. --trace-turbo-filter (filter for tracing turbofan compilation)
  172. type: string default: *
  173. --trace-turbo-graph (trace generated TurboFan graphs)
  174. type: bool default: false
  175. --trace-turbo-scheduled (trace TurboFan IR with schedule)
  176. type: bool default: false
  177. --trace-turbo-cfg-file (trace turbo cfg graph (for C1 visualizer) to a given file name)
  178. type: string default: nullptr
  179. --trace-turbo-types (trace TurboFan's types)
  180. type: bool default: true
  181. --trace-turbo-scheduler (trace TurboFan's scheduler)
  182. type: bool default: false
  183. --trace-turbo-reduction (trace TurboFan's various reducers)
  184. type: bool default: false
  185. --trace-turbo-trimming (trace TurboFan's graph trimmer)
  186. type: bool default: false
  187. --trace-turbo-jt (trace TurboFan's jump threading)
  188. type: bool default: false
  189. --trace-turbo-ceq (trace TurboFan's control equivalence)
  190. type: bool default: false
  191. --trace-turbo-loop (trace TurboFan's loop optimizations)
  192. type: bool default: false
  193. --trace-turbo-alloc (trace TurboFan's register allocator)
  194. type: bool default: false
  195. --trace-all-uses (trace all use positions)
  196. type: bool default: false
  197. --trace-representation (trace representation types)
  198. type: bool default: false
  199. --turbo-verify (verify TurboFan graphs at each phase)
  200. type: bool default: false
  201. --turbo-verify-machine-graph (verify TurboFan machine graph before instruction selection)
  202. type: string default: nullptr
  203. --trace-verify-csa (trace code stubs verification)
  204. type: bool default: false
  205. --csa-trap-on-node (trigger break point when a node with given id is created in given stub. The format is: StubName,NodeId)
  206. type: string default: nullptr
  207. --turbo-stats (print TurboFan statistics)
  208. type: bool default: false
  209. --turbo-stats-nvp (print TurboFan statistics in machine-readable format)
  210. type: bool default: false
  211. --turbo-stats-wasm (print TurboFan statistics of wasm compilations)
  212. type: bool default: false
  213. --turbo-splitting (split nodes during scheduling in TurboFan)
  214. type: bool default: true
  215. --function-context-specialization (enable function context specialization in TurboFan)
  216. type: bool default: false
  217. --turbo-inlining (enable inlining in TurboFan)
  218. type: bool default: true
  219. --max-inlined-bytecode-size (maximum size of bytecode for a single inlining)
  220. type: int default: 500
  221. --max-inlined-bytecode-size-cumulative (maximum cumulative size of bytecode considered for inlining)
  222. type: int default: 1000
  223. --max-inlined-bytecode-size-absolute (maximum cumulative size of bytecode considered for inlining)
  224. type: int default: 5000
  225. --reserve-inline-budget-scale-factor (maximum cumulative size of bytecode considered for inlining)
  226. type: float default: 1.2
  227. --max-inlined-bytecode-size-small (maximum size of bytecode considered for small function inlining)
  228. type: int default: 30
  229. --max-optimized-bytecode-size (maximum bytecode size to be considered for optimization; too high values may cause the compiler to hit (release) assertions)
  230. type: int default: 61440
  231. --min-inlining-frequency (minimum frequency for inlining)
  232. type: float default: 0.15
  233. --polymorphic-inlining (polymorphic inlining)
  234. type: bool default: true
  235. --stress-inline (set high thresholds for inlining to inline as much as possible)
  236. type: bool default: false
  237. --trace-turbo-inlining (trace TurboFan inlining)
  238. type: bool default: false
  239. --turbo-inline-array-builtins (inline array builtins in TurboFan code)
  240. type: bool default: true
  241. --use-osr (use on-stack replacement)
  242. type: bool default: true
  243. --trace-osr (trace on-stack replacement)
  244. type: bool default: false
  245. --analyze-environment-liveness (analyze liveness of environment slots and zap dead values)
  246. type: bool default: true
  247. --trace-environment-liveness (trace liveness of local variable slots)
  248. type: bool default: false
  249. --turbo-load-elimination (enable load elimination in TurboFan)
  250. type: bool default: true
  251. --trace-turbo-load-elimination (trace TurboFan load elimination)
  252. type: bool default: false
  253. --turbo-profiling (enable basic block profiling in TurboFan)
  254. type: bool default: false
  255. --turbo-profiling-verbose (enable basic block profiling in TurboFan, and include each function's schedule and disassembly in the output)
  256. type: bool default: false
  257. --turbo-verify-allocation (verify register allocation in TurboFan)
  258. type: bool default: false
  259. --turbo-move-optimization (optimize gap moves in TurboFan)
  260. type: bool default: true
  261. --turbo-jt (enable jump threading in TurboFan)
  262. type: bool default: true
  263. --turbo-loop-peeling (Turbofan loop peeling)
  264. type: bool default: true
  265. --turbo-loop-variable (Turbofan loop variable optimization)
  266. type: bool default: true
  267. --turbo-loop-rotation (Turbofan loop rotation)
  268. type: bool default: true
  269. --turbo-cf-optimization (optimize control flow in TurboFan)
  270. type: bool default: true
  271. --turbo-escape (enable escape analysis)
  272. type: bool default: true
  273. --turbo-allocation-folding (Turbofan allocation folding)
  274. type: bool default: true
  275. --turbo-instruction-scheduling (enable instruction scheduling in TurboFan)
  276. type: bool default: false
  277. --turbo-stress-instruction-scheduling (randomly schedule instructions to stress dependency tracking)
  278. type: bool default: false
  279. --turbo-store-elimination (enable store-store elimination in TurboFan)
  280. type: bool default: true
  281. --trace-store-elimination (trace store elimination)
  282. type: bool default: false
  283. --turbo-rewrite-far-jumps (rewrite far to near jumps (ia32,x64))
  284. type: bool default: true
  285. --stress-gc-during-compilation (simulate GC/compiler thread race related to https://crbug.com/v8/8520)
  286. type: bool default: false
  287. --turbo-fast-api-calls (enable fast API calls from TurboFan)
  288. type: bool default: false
  289. --reuse-opt-code-count (don't discard optimized code for the specified number of deopts.)
  290. type: int default: 0
  291. --turbo-nci (enable experimental native context independent code.)
  292. type: bool default: false
  293. --turbo-nci-as-highest-tier (replace default TF with NCI code as the highest tier for testing purposes.)
  294. type: bool default: false
  295. --print-nci-code (print native context independent code.)
  296. type: bool default: false
  297. --trace-turbo-nci (trace native context independent code.)
  298. type: bool default: false
  299. --turbo-collect-feedback-in-generic-lowering (enable experimental feedback collection in generic lowering.)
  300. type: bool default: false
  301. --optimize-for-size (Enables optimizations which favor memory size over execution speed)
  302. type: bool default: false
  303. --untrusted-code-mitigations (Enable mitigations for executing untrusted code)
  304. type: bool default: false
  305. --expose-wasm (expose wasm interface to JavaScript)
  306. type: bool default: true
  307. --assume-asmjs-origin (force wasm decoder to assume input is internal asm-wasm format)
  308. type: bool default: false
  309. --wasm-num-compilation-tasks (maximum number of parallel compilation tasks for wasm)
  310. type: int default: 128
  311. --wasm-write-protect-code-memory (write protect code memory on the wasm native heap)
  312. type: bool default: false
  313. --wasm-async-compilation (enable actual asynchronous compilation for WebAssembly.compile)
  314. type: bool default: true
  315. --wasm-test-streaming (use streaming compilation instead of async compilation for tests)
  316. type: bool default: false
  317. --wasm-max-mem-pages (maximum initial number of 64KiB memory pages of a wasm instance)
  318. type: uint default: 32767
  319. --wasm-max-mem-pages-growth (maximum number of 64KiB pages a Wasm memory can grow to)
  320. type: uint default: 65536
  321. --wasm-max-table-size (maximum table size of a wasm instance)
  322. type: uint default: 10000000
  323. --wasm-max-code-space (maximum committed code space for wasm (in MB))
  324. type: uint default: 1024
  325. --wasm-tier-up (enable tier up to the optimizing compiler (requires --liftoff to have an effect))
  326. type: bool default: true
  327. --trace-wasm-ast-start (start function for wasm AST trace (inclusive))
  328. type: int default: 0
  329. --trace-wasm-ast-end (end function for wasm AST trace (exclusive))
  330. type: int default: 0
  331. --liftoff (enable Liftoff, the baseline compiler for WebAssembly)
  332. type: bool default: true
  333. --trace-wasm-memory (print all memory updates performed in wasm code)
  334. type: bool default: false
  335. --wasm-tier-mask-for-testing (bitmask of functions to compile with TurboFan instead of Liftoff)
  336. type: int default: 0
  337. --wasm-expose-debug-eval (Expose wasm evaluator support on the CDP)
  338. type: bool default: false
  339. --validate-asm (validate asm.js modules before compiling)
  340. type: bool default: true
  341. --suppress-asm-messages (don't emit asm.js related messages (for golden file testing))
  342. type: bool default: false
  343. --trace-asm-time (log asm.js timing info to the console)
  344. type: bool default: false
  345. --trace-asm-scanner (log tokens encountered by asm.js scanner)
  346. type: bool default: false
  347. --trace-asm-parser (verbose logging of asm.js parse failures)
  348. type: bool default: false
  349. --stress-validate-asm (try to validate everything as asm.js)
  350. type: bool default: false
  351. --dump-wasm-module-path (directory to dump wasm modules to)
  352. type: string default: nullptr
  353. --experimental-wasm-eh (enable prototype exception handling opcodes for wasm)
  354. type: bool default: false
  355. --experimental-wasm-simd (enable prototype SIMD opcodes for wasm)
  356. type: bool default: false
  357. --experimental-wasm-return-call (enable prototype return call opcodes for wasm)
  358. type: bool default: false
  359. --experimental-wasm-compilation-hints (enable prototype compilation hints section for wasm)
  360. type: bool default: false
  361. --experimental-wasm-gc (enable prototype garbage collection for wasm)
  362. type: bool default: false
  363. --experimental-wasm-typed-funcref (enable prototype typed function references for wasm)
  364. type: bool default: false
  365. --experimental-wasm-reftypes (enable prototype reference type opcodes for wasm)
  366. type: bool default: false
  367. --experimental-wasm-threads (enable prototype thread opcodes for wasm)
  368. type: bool default: false
  369. --experimental-wasm-type-reflection (enable prototype wasm type reflection in JS for wasm)
  370. type: bool default: false
  371. --experimental-wasm-bigint (enable prototype JS BigInt support for wasm)
  372. type: bool default: true
  373. --experimental-wasm-bulk-memory (enable prototype bulk memory opcodes for wasm)
  374. type: bool default: true
  375. --experimental-wasm-mv (enable prototype multi-value support for wasm)
  376. type: bool default: true
  377. --wasm-staging (enable staged wasm features)
  378. type: bool default: false
  379. --wasm-opt (enable wasm optimization)
  380. type: bool default: false
  381. --wasm-bounds-checks (enable bounds checks (disable for performance testing only))
  382. type: bool default: true
  383. --wasm-stack-checks (enable stack checks (disable for performance testing only))
  384. type: bool default: true
  385. --wasm-math-intrinsics (intrinsify some Math imports into wasm)
  386. type: bool default: true
  387. --wasm-trap-handler (use signal handlers to catch out of bounds memory access in wasm (currently Linux x86_64 only))
  388. type: bool default: true
  389. --wasm-fuzzer-gen-test (generate a test case when running a wasm fuzzer)
  390. type: bool default: false
  391. --print-wasm-code (Print WebAssembly code)
  392. type: bool default: false
  393. --print-wasm-stub-code (Print WebAssembly stub code)
  394. type: bool default: false
  395. --asm-wasm-lazy-compilation (enable lazy compilation for asm-wasm modules)
  396. type: bool default: false
  397. --wasm-lazy-compilation (enable lazy compilation for all wasm modules)
  398. type: bool default: false
  399. --wasm-lazy-validation (enable lazy validation for lazily compiled wasm functions)
  400. type: bool default: false
  401. --wasm-atomics-on-non-shared-memory (allow atomic operations on non-shared WebAssembly memory)
  402. type: bool default: true
  403. --wasm-grow-shared-memory (allow growing shared WebAssembly memory objects)
  404. type: bool default: true
  405. --wasm-simd-post-mvp (allow experimental SIMD operations for prototyping that are not included in the current proposal)
  406. type: bool default: false
  407. --wasm-code-gc (enable garbage collection of wasm code)
  408. type: bool default: true
  409. --trace-wasm-code-gc (trace garbage collection of wasm code)
  410. type: bool default: false
  411. --stress-wasm-code-gc (stress test garbage collection of wasm code)
  412. type: bool default: false
  413. --wasm-max-initial-code-space-reservation (maximum size of the initial wasm code space reservation (in MB))
  414. type: int default: 0
  415. --frame-count (number of stack frames inspected by the profiler)
  416. type: int default: 1
  417. --stress-sampling-allocation-profiler (Enables sampling allocation profiler with X as a sample interval)
  418. type: int default: 0
  419. --lazy-new-space-shrinking (Enables the lazy new space shrinking strategy)
  420. type: bool default: false
  421. --min-semi-space-size (min size of a semi-space (in MBytes), the new space consists of two semi-spaces)
  422. type: size_t default: 0
  423. --max-semi-space-size (max size of a semi-space (in MBytes), the new space consists of two semi-spaces)
  424. type: size_t default: 0
  425. --semi-space-growth-factor (factor by which to grow the new space)
  426. type: int default: 2
  427. --max-old-space-size (max size of the old space (in Mbytes))
  428. type: size_t default: 0
  429. --max-heap-size (max size of the heap (in Mbytes) both max_semi_space_size and max_old_space_size take precedence. All three flags cannot be specified at the same time.)
  430. type: size_t default: 0
  431. --initial-heap-size (initial size of the heap (in Mbytes))
  432. type: size_t default: 0
  433. --huge-max-old-generation-size (Increase max size of the old space to 4 GB for x64 systems withthe physical memory bigger than 16 GB)
  434. type: bool default: true
  435. --initial-old-space-size (initial old space size (in Mbytes))
  436. type: size_t default: 0
  437. --global-gc-scheduling (enable GC scheduling based on global memory)
  438. type: bool default: true
  439. --gc-global (always perform global GCs)
  440. type: bool default: false
  441. --random-gc-interval (Collect garbage after random(0, X) allocations. It overrides gc_interval.)
  442. type: int default: 0
  443. --gc-interval (garbage collect after <n> allocations)
  444. type: int default: -1
  445. --retain-maps-for-n-gc (keeps maps alive for <n> old space garbage collections)
  446. type: int default: 2
  447. --trace-gc (print one trace line following each garbage collection)
  448. type: bool default: false
  449. --trace-gc-nvp (print one detailed trace line in name=value format after each garbage collection)
  450. type: bool default: false
  451. --trace-gc-ignore-scavenger (do not print trace line after scavenger collection)
  452. type: bool default: false
  453. --trace-idle-notification (print one trace line following each idle notification)
  454. type: bool default: false
  455. --trace-idle-notification-verbose (prints the heap state used by the idle notification)
  456. type: bool default: false
  457. --trace-gc-verbose (print more details following each garbage collection)
  458. type: bool default: false
  459. --trace-gc-freelists (prints details of each freelist before and after each major garbage collection)
  460. type: bool default: false
  461. --trace-gc-freelists-verbose (prints details of freelists of each page before and after each major garbage collection)
  462. type: bool default: false
  463. --trace-evacuation-candidates (Show statistics about the pages evacuation by the compaction)
  464. type: bool default: false
  465. --trace-allocations-origins (Show statistics about the origins of allocations. Combine with --no-inline-new to track allocations from generated code)
  466. type: bool default: false
  467. --trace-allocation-stack-interval (print stack trace after <n> free-list allocations)
  468. type: int default: -1
  469. --trace-duplicate-threshold-kb (print duplicate objects in the heap if their size is more than given threshold)
  470. type: int default: 0
  471. --trace-fragmentation (report fragmentation for old space)
  472. type: bool default: false
  473. --trace-fragmentation-verbose (report fragmentation for old space (detailed))
  474. type: bool default: false
  475. --minor-mc-trace-fragmentation (trace fragmentation after marking)
  476. type: bool default: false
  477. --trace-evacuation (report evacuation statistics)
  478. type: bool default: false
  479. --trace-mutator-utilization (print mutator utilization, allocation speed, gc speed)
  480. type: bool default: false
  481. --incremental-marking (use incremental marking)
  482. type: bool default: true
  483. --incremental-marking-wrappers (use incremental marking for marking wrappers)
  484. type: bool default: true
  485. --incremental-marking-task (use tasks for incremental marking)
  486. type: bool default: true
  487. --incremental-marking-soft-trigger (threshold for starting incremental marking via a task in percent of available space: limit - size)
  488. type: int default: 0
  489. --incremental-marking-hard-trigger (threshold for starting incremental marking immediately in percent of available space: limit - size)
  490. type: int default: 0
  491. --trace-unmapper (Trace the unmapping)
  492. type: bool default: false
  493. --parallel-scavenge (parallel scavenge)
  494. type: bool default: true
  495. --scavenge-task (schedule scavenge tasks)
  496. type: bool default: true
  497. --scavenge-task-trigger (scavenge task trigger in percent of the current heap limit)
  498. type: int default: 80
  499. --scavenge-separate-stack-scanning (use a separate phase for stack scanning in scavenge)
  500. type: bool default: false
  501. --trace-parallel-scavenge (trace parallel scavenge)
  502. type: bool default: false
  503. --write-protect-code-memory (write protect code memory)
  504. type: bool default: true
  505. --concurrent-marking (use concurrent marking)
  506. type: bool default: true
  507. --concurrent-array-buffer-sweeping (concurrently sweep array buffers)
  508. type: bool default: true
  509. --concurrent-allocation (concurrently allocate in old space)
  510. type: bool default: false
  511. --local-heaps (allow heap access from background tasks)
  512. type: bool default: false
  513. --stress-concurrent-allocation (start background threads that allocate memory)
  514. type: bool default: false
  515. --parallel-marking (use parallel marking in atomic pause)
  516. type: bool default: true
  517. --ephemeron-fixpoint-iterations (number of fixpoint iterations it takes to switch to linear ephemeron algorithm)
  518. type: int default: 10
  519. --trace-concurrent-marking (trace concurrent marking)
  520. type: bool default: false
  521. --concurrent-store-buffer (use concurrent store buffer processing)
  522. type: bool default: true
  523. --concurrent-sweeping (use concurrent sweeping)
  524. type: bool default: true
  525. --parallel-compaction (use parallel compaction)
  526. type: bool default: true
  527. --parallel-pointer-update (use parallel pointer update during compaction)
  528. type: bool default: true
  529. --detect-ineffective-gcs-near-heap-limit (trigger out-of-memory failure to avoid GC storm near heap limit)
  530. type: bool default: true
  531. --trace-incremental-marking (trace progress of the incremental marking)
  532. type: bool default: false
  533. --trace-stress-marking (trace stress marking progress)
  534. type: bool default: false
  535. --trace-stress-scavenge (trace stress scavenge progress)
  536. type: bool default: false
  537. --track-gc-object-stats (track object counts and memory usage)
  538. type: bool default: false
  539. --trace-gc-object-stats (trace object counts and memory usage)
  540. type: bool default: false
  541. --trace-zone-stats (trace zone memory usage)
  542. type: bool default: false
  543. --zone-stats-tolerance (report a tick only when allocated zone memory changes by this amount)
  544. type: size_t default: 1048576
  545. --track-retaining-path (enable support for tracking retaining path)
  546. type: bool default: false
  547. --concurrent-array-buffer-freeing (free array buffer allocations on a background thread)
  548. type: bool default: true
  549. --gc-stats (Used by tracing internally to enable gc statistics)
  550. type: int default: 0
  551. --track-detached-contexts (track native contexts that are expected to be garbage collected)
  552. type: bool default: true
  553. --trace-detached-contexts (trace native contexts that are expected to be garbage collected)
  554. type: bool default: false
  555. --move-object-start (enable moving of object starts)
  556. type: bool default: true
  557. --memory-reducer (use memory reducer)
  558. type: bool default: true
  559. --memory-reducer-for-small-heaps (use memory reducer for small heaps)
  560. type: bool default: true
  561. --heap-growing-percent (specifies heap growing factor as (1 + heap_growing_percent/100))
  562. type: int default: 0
  563. --v8-os-page-size (override OS page size (in KBytes))
  564. type: int default: 0
  565. --always-compact (Perform compaction on every full GC)
  566. type: bool default: false
  567. --never-compact (Never perform compaction on full GC - testing only)
  568. type: bool default: false
  569. --compact-code-space (Compact code space on full collections)
  570. type: bool default: true
  571. --flush-bytecode (flush of bytecode when it has not been executed recently)
  572. type: bool default: true
  573. --stress-flush-bytecode (stress bytecode flushing)
  574. type: bool default: false
  575. --use-marking-progress-bar (Use a progress bar to scan large objects in increments when incremental marking is active.)
  576. type: bool default: true
  577. --stress-per-context-marking-worklist (Use per-context worklist for marking)
  578. type: bool default: false
  579. --force-marking-deque-overflows (force overflows of marking deque by reducing it's size to 64 words)
  580. type: bool default: false
  581. --stress-compaction (stress the GC compactor to flush out bugs (implies --force_marking_deque_overflows))
  582. type: bool default: false
  583. --stress-compaction-random (Stress GC compaction by selecting random percent of pages as evacuation candidates. It overrides stress_compaction.)
  584. type: bool default: false
  585. --stress-incremental-marking (force incremental marking for small heaps and run it more often)
  586. type: bool default: false
  587. --fuzzer-gc-analysis (prints number of allocations and enables analysis mode for gc fuzz testing, e.g. --stress-marking, --stress-scavenge)
  588. type: bool default: false
  589. --stress-marking (force marking at random points between 0 and X (inclusive) percent of the regular marking start limit)
  590. type: int default: 0
  591. --stress-scavenge (force scavenge at random points between 0 and X (inclusive) percent of the new space capacity)
  592. type: int default: 0
  593. --gc-experiment-background-schedule (new background GC schedule heuristics)
  594. type: bool default: false
  595. --gc-experiment-less-compaction (less compaction in non-memory reducing mode)
  596. type: bool default: false
  597. --disable-abortjs (disables AbortJS runtime function)
  598. type: bool default: false
  599. --randomize-all-allocations (randomize virtual memory reservations by ignoring any hints passed when allocating pages)
  600. type: bool default: false
  601. --manual-evacuation-candidates-selection (Test mode only flag. It allows an unit test to select evacuation candidates pages (requires --stress_compaction).)
  602. type: bool default: false
  603. --fast-promotion-new-space (fast promote new space on high survival rates)
  604. type: bool default: false
  605. --clear-free-memory (initialize free memory with 0)
  606. type: bool default: false
  607. --young-generation-large-objects (allocates large objects by default in the young generation large object space)
  608. type: bool default: true
  609. --debug-code (generate extra code (assertions) for debugging)
  610. type: bool default: false
  611. --code-comments (emit comments in code disassembly; for more readable source positions you should add --no-concurrent_recompilation)
  612. type: bool default: false
  613. --enable-sse3 (enable use of SSE3 instructions if available)
  614. type: bool default: true
  615. --enable-ssse3 (enable use of SSSE3 instructions if available)
  616. type: bool default: true
  617. --enable-sse4-1 (enable use of SSE4.1 instructions if available)
  618. type: bool default: true
  619. --enable-sse4-2 (enable use of SSE4.2 instructions if available)
  620. type: bool default: true
  621. --enable-sahf (enable use of SAHF instruction if available (X64 only))
  622. type: bool default: true
  623. --enable-avx (enable use of AVX instructions if available)
  624. type: bool default: true
  625. --enable-fma3 (enable use of FMA3 instructions if available)
  626. type: bool default: true
  627. --enable-bmi1 (enable use of BMI1 instructions if available)
  628. type: bool default: true
  629. --enable-bmi2 (enable use of BMI2 instructions if available)
  630. type: bool default: true
  631. --enable-lzcnt (enable use of LZCNT instruction if available)
  632. type: bool default: true
  633. --enable-popcnt (enable use of POPCNT instruction if available)
  634. type: bool default: true
  635. --arm-arch (generate instructions for the selected ARM architecture if available: armv6, armv7, armv7+sudiv or armv8)
  636. type: string default: armv8
  637. --force-long-branches (force all emitted branches to be in long mode (MIPS/PPC only))
  638. type: bool default: false
  639. --mcpu (enable optimization for specific cpu)
  640. type: string default: auto
  641. --partial-constant-pool (enable use of partial constant pools (X64 only))
  642. type: bool default: true
  643. --sim-arm64-optional-features (enable optional features on the simulator for testing: none or all)
  644. type: string default: none
  645. --enable-source-at-csa-bind (Include source information in the binary at CSA bind locations.)
  646. type: bool default: false
  647. --enable-armv7 (deprecated (use --arm_arch instead))
  648. type: maybe_bool default: unset
  649. --enable-vfp3 (deprecated (use --arm_arch instead))
  650. type: maybe_bool default: unset
  651. --enable-32dregs (deprecated (use --arm_arch instead))
  652. type: maybe_bool default: unset
  653. --enable-neon (deprecated (use --arm_arch instead))
  654. type: maybe_bool default: unset
  655. --enable-sudiv (deprecated (use --arm_arch instead))
  656. type: maybe_bool default: unset
  657. --enable-armv8 (deprecated (use --arm_arch instead))
  658. type: maybe_bool default: unset
  659. --enable-regexp-unaligned-accesses (enable unaligned accesses for the regexp engine)
  660. type: bool default: true
  661. --script-streaming (enable parsing on background)
  662. type: bool default: true
  663. --stress-background-compile (stress test parsing on background)
  664. type: bool default: false
  665. --finalize-streaming-on-background (perform the script streaming finalization on the background thread)
  666. type: bool default: false
  667. --disable-old-api-accessors (Disable old-style API accessors whose setters trigger through the prototype chain)
  668. type: bool default: false
  669. --expose-gc (expose gc extension)
  670. type: bool default: false
  671. --expose-gc-as (expose gc extension under the specified name)
  672. type: string default: nullptr
  673. --expose-externalize-string (expose externalize string extension)
  674. type: bool default: false
  675. --expose-trigger-failure (expose trigger-failure extension)
  676. type: bool default: false
  677. --stack-trace-limit (number of stack frames to capture)
  678. type: int default: 10
  679. --builtins-in-stack-traces (show built-in functions in stack traces)
  680. type: bool default: false
  681. --experimental-stack-trace-frames (enable experimental frames (API/Builtins) and stack trace layout)
  682. type: bool default: false
  683. --disallow-code-generation-from-strings (disallow eval and friends)
  684. type: bool default: false
  685. --expose-async-hooks (expose async_hooks object)
  686. type: bool default: false
  687. --expose-cputracemark-as (expose cputracemark extension under the specified name)
  688. type: string default: nullptr
  689. --allow-unsafe-function-constructor (allow invoking the function constructor without security checks)
  690. type: bool default: false
  691. --force-slow-path (always take the slow path for builtins)
  692. type: bool default: false
  693. --test-small-max-function-context-stub-size (enable testing the function context size overflow path by making the maximum size smaller)
  694. type: bool default: false
  695. --inline-new (use fast inline allocation)
  696. type: bool default: true
  697. --trace (trace javascript function calls)
  698. type: bool default: false
  699. --trace-wasm (trace wasm function calls)
  700. type: bool default: false
  701. --lazy (use lazy compilation)
  702. type: bool default: true
  703. --max-lazy (ignore eager compilation hints)
  704. type: bool default: false
  705. --trace-opt (trace lazy optimization)
  706. type: bool default: false
  707. --trace-opt-verbose (extra verbose compilation tracing)
  708. type: bool default: false
  709. --trace-opt-stats (trace lazy optimization statistics)
  710. type: bool default: false
  711. --trace-deopt (trace optimize function deoptimization)
  712. type: bool default: false
  713. --trace-file-names (include file names in trace-opt/trace-deopt output)
  714. type: bool default: false
  715. --always-opt (always try to optimize functions)
  716. type: bool default: false
  717. --always-osr (always try to OSR functions)
  718. type: bool default: false
  719. --prepare-always-opt (prepare for turning on always opt)
  720. type: bool default: false
  721. --trace-serializer (print code serializer trace)
  722. type: bool default: false
  723. --compilation-cache (enable compilation cache)
  724. type: bool default: true
  725. --cache-prototype-transitions (cache prototype transitions)
  726. type: bool default: true
  727. --parallel-compile-tasks (enable parallel compile tasks)
  728. type: bool default: false
  729. --compiler-dispatcher (enable compiler dispatcher)
  730. type: bool default: false
  731. --trace-compiler-dispatcher (trace compiler dispatcher activity)
  732. type: bool default: false
  733. --cpu-profiler-sampling-interval (CPU profiler sampling interval in microseconds)
  734. type: int default: 1000
  735. --trace-side-effect-free-debug-evaluate (print debug messages for side-effect-free debug-evaluate for testing)
  736. type: bool default: false
  737. --hard-abort (abort by crashing)
  738. type: bool default: true
  739. --expose-inspector-scripts (expose injected-script-source.js for debugging)
  740. type: bool default: false
  741. --stack-size (default size of stack region v8 is allowed to use (in kBytes))
  742. type: int default: 984
  743. --max-stack-trace-source-length (maximum length of function source code printed in a stack trace.)
  744. type: int default: 300
  745. --clear-exceptions-on-js-entry (clear pending exceptions when entering JavaScript)
  746. type: bool default: false
  747. --histogram-interval (time interval in ms for aggregating memory histograms)
  748. type: int default: 600000
  749. --heap-profiler-trace-objects (Dump heap object allocations/movements/size_updates)
  750. type: bool default: false
  751. --heap-profiler-use-embedder-graph (Use the new EmbedderGraph API to get embedder nodes)
  752. type: bool default: true
  753. --heap-snapshot-string-limit (truncate strings to this length in the heap snapshot)
  754. type: int default: 1024
  755. --sampling-heap-profiler-suppress-randomness (Use constant sample intervals to eliminate test flakiness)
  756. type: bool default: false
  757. --use-idle-notification (Use idle notification to reduce memory footprint.)
  758. type: bool default: true
  759. --trace-ic (trace inline cache state transitions for tools/ic-processor)
  760. type: bool default: false
  761. --modify-field-representation-inplace (enable in-place field representation updates)
  762. type: bool default: true
  763. --max-polymorphic-map-count (maximum number of maps to track in POLYMORPHIC state)
  764. type: int default: 4
  765. --native-code-counters (generate extra code for manipulating stats counters)
  766. type: bool default: false
  767. --thin-strings (Enable ThinString support)
  768. type: bool default: true
  769. --trace-prototype-users (Trace updates to prototype user tracking)
  770. type: bool default: false
  771. --trace-for-in-enumerate (Trace for-in enumerate slow-paths)
  772. type: bool default: false
  773. --trace-maps (trace map creation)
  774. type: bool default: false
  775. --trace-maps-details (also log map details)
  776. type: bool default: true
  777. --allow-natives-syntax (allow natives syntax)
  778. type: bool default: false
  779. --allow-natives-for-differential-fuzzing (allow only natives explicitly allowlisted for differential fuzzers)
  780. type: bool default: false
  781. --parse-only (only parse the sources)
  782. type: bool default: false
  783. --trace-sim (Trace simulator execution)
  784. type: bool default: false
  785. --debug-sim (Enable debugging the simulator)
  786. type: bool default: false
  787. --check-icache (Check icache flushes in ARM and MIPS simulator)
  788. type: bool default: false
  789. --stop-sim-at (Simulator stop after x number of instructions)
  790. type: int default: 0
  791. --sim-stack-alignment (Stack alignment in bytes in simulator (4 or 8, 8 is default))
  792. type: int default: 8
  793. --sim-stack-size (Stack size of the ARM64, MIPS64 and PPC64 simulator in kBytes (default is 2 MB))
  794. type: int default: 2048
  795. --log-colour (When logging, try to use coloured output.)
  796. type: bool default: true
  797. --trace-sim-messages (Trace simulator debug messages. Implied by --trace-sim.)
  798. type: bool default: false
  799. --async-stack-traces (include async stack traces in Error.stack)
  800. type: bool default: true
  801. --stack-trace-on-illegal (print stack trace when an illegal exception is thrown)
  802. type: bool default: false
  803. --abort-on-uncaught-exception (abort program (dump core) when an uncaught exception is thrown)
  804. type: bool default: false
  805. --correctness-fuzzer-suppressions (Suppress certain unspecified behaviors to ease correctness fuzzing: Abort program when the stack overflows or a string exceeds maximum length (as opposed to throwing RangeError). Use a fixed suppression string for error messages.)
  806. type: bool default: false
  807. --randomize-hashes (randomize hashes to avoid predictable hash collisions (with snapshots this option cannot override the baked-in seed))
  808. type: bool default: true
  809. --rehash-snapshot (rehash strings from the snapshot to override the baked-in seed)
  810. type: bool default: true
  811. --hash-seed (Fixed seed to use to hash property keys (0 means random)(with snapshots this option cannot override the baked-in seed))
  812. type: uint64 default: 0
  813. --random-seed (Default seed for initializing random generator (0, the default, means to use system random).)
  814. type: int default: 0
  815. --fuzzer-random-seed (Default seed for initializing fuzzer random generator (0, the default, means to use v8's random number generator seed).)
  816. type: int default: 0
  817. --trace-rail (trace RAIL mode)
  818. type: bool default: false
  819. --print-all-exceptions (print exception object and stack trace on each thrown exception)
  820. type: bool default: false
  821. --detailed-error-stack-trace (includes arguments for each function call in the error stack frames array)
  822. type: bool default: false
  823. --adjust-os-scheduling-parameters (adjust OS specific scheduling params for the isolate)
  824. type: bool default: true
  825. --runtime-call-stats (report runtime call counts and times)
  826. type: bool default: false
  827. --rcs (report runtime call counts and times)
  828. type: bool default: false
  829. --rcs-cpu-time (report runtime times in cpu time (the default is wall time))
  830. type: bool default: false
  831. --profile-deserialization (Print the time it takes to deserialize the snapshot.)
  832. type: bool default: false
  833. --serialization-statistics (Collect statistics on serialized objects.)
  834. type: bool default: false
  835. --serialization-chunk-size (Custom size for serialization chunks)
  836. type: uint default: 4096
  837. --regexp-optimization (generate optimized regexp code)
  838. type: bool default: true
  839. --regexp-mode-modifiers (enable inline flags in regexp.)
  840. type: bool default: false
  841. --regexp-interpret-all (interpret all regexp code)
  842. type: bool default: false
  843. --regexp-tier-up (enable regexp interpreter and tier up to the compiler after the number of executions set by the tier up ticks flag)
  844. type: bool default: true
  845. --regexp-tier-up-ticks (set the number of executions for the regexp interpreter before tiering-up to the compiler)
  846. type: int default: 1
  847. --regexp-peephole-optimization (enable peephole optimization for regexp bytecode)
  848. type: bool default: true
  849. --trace-regexp-peephole-optimization (trace regexp bytecode peephole optimization)
  850. type: bool default: false
  851. --trace-regexp-bytecodes (trace regexp bytecode execution)
  852. type: bool default: false
  853. --trace-regexp-assembler (trace regexp macro assembler calls.)
  854. type: bool default: false
  855. --trace-regexp-parser (trace regexp parsing)
  856. type: bool default: false
  857. --trace-regexp-tier-up (trace regexp tiering up execution)
  858. type: bool default: false
  859. --testing-bool-flag (testing_bool_flag)
  860. type: bool default: true
  861. --testing-maybe-bool-flag (testing_maybe_bool_flag)
  862. type: maybe_bool default: unset
  863. --testing-int-flag (testing_int_flag)
  864. type: int default: 13
  865. --testing-float-flag (float-flag)
  866. type: float default: 2.5
  867. --testing-string-flag (string-flag)
  868. type: string default: Hello, world!
  869. --testing-prng-seed (Seed used for threading test randomness)
  870. type: int default: 42
  871. --testing-d8-test-runner (test runner turns on this flag to enable a check that the function was prepared for optimization before marking it for optimization)
  872. type: bool default: false
  873. --fuzzing (Fuzzers use this flag to signal that they are ... fuzzing. This causes intrinsics to fail silently (e.g. return undefined) on invalid usage.)
  874. type: bool default: false
  875. --embedded-src (Path for the generated embedded data file. (mksnapshot only))
  876. type: string default: nullptr
  877. --embedded-variant (Label to disambiguate symbols in embedded data file. (mksnapshot only))
  878. type: string default: nullptr
  879. --startup-src (Write V8 startup as C++ src. (mksnapshot only))
  880. type: string default: nullptr
  881. --startup-blob (Write V8 startup blob file. (mksnapshot only))
  882. type: string default: nullptr
  883. --target-arch (The mksnapshot target arch. (mksnapshot only))
  884. type: string default: nullptr
  885. --target-os (The mksnapshot target os. (mksnapshot only))
  886. type: string default: nullptr
  887. --target-is-simulator (Instruct mksnapshot that the target is meant to run in the simulator and it can generate simulator-specific instructions. (mksnapshot only))
  888. type: bool default: false
  889. --minor-mc-parallel-marking (use parallel marking for the young generation)
  890. type: bool default: true
  891. --trace-minor-mc-parallel-marking (trace parallel marking for the young generation)
  892. type: bool default: false
  893. --minor-mc (perform young generation mark compact GCs)
  894. type: bool default: false
  895. --help (Print usage message, including flags, on console)
  896. type: bool default: true
  897. --dump-counters (Dump counters on exit)
  898. type: bool default: false
  899. --dump-counters-nvp (Dump counters as name-value pairs on exit)
  900. type: bool default: false
  901. --use-external-strings (Use external strings for source code)
  902. type: bool default: false
  903. --map-counters (Map counters to a file)
  904. type: string default:
  905. --mock-arraybuffer-allocator (Use a mock ArrayBuffer allocator for testing.)
  906. type: bool default: false
  907. --mock-arraybuffer-allocator-limit (Memory limit for mock ArrayBuffer allocator used to simulate OOM for testing.)
  908. type: size_t default: 0
  909. --gdbjit (enable GDBJIT interface)
  910. type: bool default: false
  911. --gdbjit-full (enable GDBJIT interface for all code objects)
  912. type: bool default: false
  913. --gdbjit-dump (dump elf objects with debug info to disk)
  914. type: bool default: false
  915. --gdbjit-dump-filter (dump only objects containing this substring)
  916. type: string default:
  917. --log (Minimal logging (no API, code, GC, suspect, or handles samples).)
  918. type: bool default: false
  919. --log-all (Log all events to the log file.)
  920. type: bool default: false
  921. --log-api (Log API events to the log file.)
  922. type: bool default: false
  923. --log-code (Log code events to the log file without profiling.)
  924. type: bool default: false
  925. --log-handles (Log global handle events.)
  926. type: bool default: false
  927. --log-suspect (Log suspect operations.)
  928. type: bool default: false
  929. --log-source-code (Log source code.)
  930. type: bool default: false
  931. --log-function-events (Log function events (parse, compile, execute) separately.)
  932. type: bool default: false
  933. --prof (Log statistical profiling information (implies --log-code).)
  934. type: bool default: false
  935. --detailed-line-info (Always generate detailed line information for CPU profiling.)
  936. type: bool default: false
  937. --prof-sampling-interval (Interval for --prof samples (in microseconds).)
  938. type: int default: 1000
  939. --prof-cpp (Like --prof, but ignore generated code.)
  940. type: bool default: false
  941. --prof-browser-mode (Used with --prof, turns on browser-compatible mode for profiling.)
  942. type: bool default: true
  943. --logfile (Specify the name of the log file.)
  944. type: string default: v8.log
  945. --logfile-per-isolate (Separate log files for each isolate.)
  946. type: bool default: true
  947. --ll-prof (Enable low-level linux profiler.)
  948. type: bool default: false
  949. --gc-fake-mmap (Specify the name of the file for fake gc mmap used in ll_prof)
  950. type: string default: /tmp/__v8_gc__
  951. --log-internal-timer-events (Time internal events.)
  952. type: bool default: false
  953. --redirect-code-traces (output deopt information and disassembly into file code-<pid>-<isolate id>.asm)
  954. type: bool default: false
  955. --redirect-code-traces-to (output deopt information and disassembly into the given file)
  956. type: string default: nullptr
  957. --print-opt-source (print source code of optimized and inlined functions)
  958. type: bool default: false
  959. --vtune-prof-annotate-wasm (Used when v8_enable_vtunejit is enabled, load wasm source map and provide annotate support (experimental).)
  960. type: bool default: false
  961. --win64-unwinding-info (Enable unwinding info for Windows/x64)
  962. type: bool default: true
  963. --interpreted-frames-native-stack (Show interpreted frames on the native stack (useful for external profilers).)
  964. type: bool default: false
  965. --predictable (enable predictable mode)
  966. type: bool default: false
  967. --predictable-gc-schedule (Predictable garbage collection schedule. Fixes heap growing, idle, and memory reducing behavior.)
  968. type: bool default: false
  969. --single-threaded (disable the use of background tasks)
  970. type: bool default: false
  971. --single-threaded-gc (disable the use of background gc tasks)
  972. type: bool default: false

Particularly useful ones:

  1. --async-stack-trace