GeezerVison is showing github.com — child_process: improve spawn performance on Linux · nodejs/node@7f68e14
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tools/v8_gypfiles/features.gypi +17Lines changed: 17 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
68 | 68 | }, { |
69 | 69 | 'v8_enable_system_instrumentation': 0, |
70 | 70 | }], |
| 71 | + ['OS=="linux"', { |
| 72 | + # Sets -dV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION. |
| 73 | + # |
| 74 | + # This flag speeds up the performance of fork/execve on Linux systems for |
| 75 | + # embedders which use it (like Node.js). It works by marking the pages that |
| 76 | + # V8 allocates as MADV_DONTFORK. Without MADV_DONTFORK, the Linux kernel |
| 77 | + # spends a long time manipulating page mappings on fork and exec which the |
| 78 | + # child process doesn't generally need to access. |
| 79 | + # |
| 80 | + # See v8:7381 for more details. |
| 81 | + 'v8_enable_private_mapping_fork_optimization': 1, |
| 82 | + }, { |
| 83 | + 'v8_enable_private_mapping_fork_optimization': 0, |
| 84 | + }], |
71 | 85 | ], |
72 | 86 | 'is_debug%': 0, |
73 | 87 |
|
|
310 | 324 | ['v8_enable_hugepage==1', { |
311 | 325 | 'defines': ['ENABLE_HUGEPAGE',], |
312 | 326 | }], |
| 327 | + ['v8_enable_private_mapping_fork_optimization==1', { |
| 328 | + 'defines': ['V8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION'], |
| 329 | + }], |
313 | 330 | ['v8_enable_vtunejit==1', { |
314 | 331 | 'defines': ['ENABLE_VTUNE_JIT_INTERFACE',], |
315 | 332 | }], |
|