GeezerVison is showing github.com — child_process: improve spawn performance on Linux · nodejs/node@4f4d0b8
File treeExpand 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 +18-1Lines changed: 18 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 72 | 72 | 'v8_enable_etw_stack_walking': 1, | 73 | 73 | }, { | 74 | 74 | 'v8_enable_etw_stack_walking': 0, | 75 | | - }] | | 75 | + }], | | 76 | + ['OS=="linux"', { | | 77 | + # Sets -dV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION. | | 78 | + # | | 79 | + # This flag speeds up the performance of fork/execve on Linux systems for | | 80 | + # embedders which use it (like Node.js). It works by marking the pages that | | 81 | + # V8 allocates as MADV_DONTFORK. Without MADV_DONTFORK, the Linux kernel | | 82 | + # spends a long time manipulating page mappings on fork and exec which the | | 83 | + # child process doesn't generally need to access. | | 84 | + # | | 85 | + # See v8:7381 for more details. | | 86 | + 'v8_enable_private_mapping_fork_optimization': 1, | | 87 | + }, { | | 88 | + 'v8_enable_private_mapping_fork_optimization': 0, | | 89 | + }], | 76 | 90 | ], | 77 | 91 | 'is_debug%': 0, | 78 | 92 |
| | 320 | 334 | ['v8_enable_hugepage==1', { | 321 | 335 | 'defines': ['ENABLE_HUGEPAGE',], | 322 | 336 | }], | | 337 | + ['v8_enable_private_mapping_fork_optimization==1', { | | 338 | + 'defines': ['V8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION'], | | 339 | + }], | 323 | 340 | ['v8_enable_vtunejit==1', { | 324 | 341 | 'defines': ['ENABLE_VTUNE_JIT_INTERFACE',], | 325 | 342 | }], | |
|