Add SubframeShutdownDelay experiment

This change adds experiment SubframeShutdownDelay, which delays
shutdown of subframe renderer processes by a few seconds. This
experiment aims to increase the chance for subframe processes to be
reused, particularly when navigating between pages that share a common
subframe domain. Successful subframe-process reuse saves the cost of
process recreation, which can take ~3 seconds of CPU time per
navigation. This savings needs to be balanced against the memory cost
of keeping each subframe renderer alive a few seconds longer.

To this end, the experiment has multiple branches with different
delays, in order to determine the best-performing method:
* constant: a flat 2s delay
* constant-long: a flat 8s delay
* history-based: a 0-8s delay; the median
              TimeSinceReusableProcessDestroyed in the past 5 subframe
              navigations, with "no reuse possible" counting as 0s
* history-based-long: a 0-8s delay; the 75th-percentile
              TimeSinceReusableProcessDestroyed in the past 5 subframe
              navigations, with "no reuse possible" counting as 0s
* memory-based: a 2s delay when available memory is under 8 GB, and a
                2-8s delay when it is higher, up to 16 GB

These will be enabled via Finch, and can be manually enabled by
appending command-line flag:
   --enable-features="SubframeShutdownDelay:type/constant
where "constant" can be any of the above experiment labels.

Design doc:
https://docs.google.com/document/d/1x_h4Gg4ForILEj8A4rMBX6d84uHWyQ9RSXmGVqMlBTk/edit

Bug: 894253
Change-Id: I64c64532d6185412d7f3f97bf9917de9574aecc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2431587
Commit-Queue: Jesse McKenna <jessemckenna@google.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Olivier Li <olivierli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#875466}
GitOrigin-RevId: 3447a7a52eecea83be3ddb03ae65d4c2f8df5b43
1 file changed
tree: 4bf60f73511acc35a9dbc206ab9a364924fea78a
  1. .style.yapf
  2. DEPS
  3. DIR_METADATA
  4. OWNERS
  5. accessibility/
  6. android/
  7. apply_cpplint_header_guard.py
  8. auto-nav.py
  9. autotest.py
  10. bash-completion
  11. binary_size/
  12. bisect-builds.py
  13. bisect_repackage/
  14. bisect_test.py
  15. boilerplate.py
  16. buildstate.bat
  17. buildstate.py
  18. cfi/
  19. check_ecs_deps/
  20. check_git_config.py
  21. check_grd_for_unused_strings.py
  22. checkbins/
  23. checklicenses/
  24. checkperms/
  25. checkteamtags/
  26. chrome_extensions/
  27. clang-format-js
  28. clang/
  29. code_coverage/
  30. compile_test/
  31. coverity/
  32. cr/
  33. cros/
  34. cygprofile/
  35. determinism/
  36. diagnose-me.py
  37. diagnosis/
  38. download_optimization_profile.py
  39. dromaeo_benchmark_runner/
  40. dump_process_memory/
  41. emacs/
  42. find_runtime_symbols/
  43. flags/
  44. flakiness/
  45. fuchsia/
  46. gdb/
  47. generate_library_loader/
  48. generate_shim_headers/
  49. generate_stubs/
  50. get_swarming_logs/
  51. git/
  52. gn/
  53. grit/
  54. gritsettings/
  55. gypv8sh.py
  56. idl_parser/
  57. imagediff/
  58. include_tracer.py
  59. infra/
  60. ipc_fuzzer/
  61. ipc_messages_log.py
  62. json_comment_eater/
  63. json_schema_compiler/
  64. json_to_struct/
  65. l10n/
  66. licenses.py
  67. linux/
  68. lldb/
  69. luci-go/
  70. mac/
  71. make-gtest-filter.py
  72. mb/
  73. md_browser/
  74. media_engagement_preload/
  75. memory/
  76. memory_inspector/
  77. metrics/
  78. msan/
  79. multi_process_rss.py
  80. nocompile_driver.py
  81. omahaproxy.py
  82. oopif/
  83. origin_trials/
  84. page_cycler/
  85. perf/
  86. perry.py
  87. polymer/
  88. privacy_budget/
  89. protoc_wrapper/
  90. python/
  91. real_world_impact/
  92. remove_duplicate_includes.py
  93. remove_stale_pyc_files.py
  94. resources/
  95. resultdb/
  96. roll_webgl_conformance.py
  97. run-swarmed.py
  98. security/
  99. site_compare/
  100. sort-headers.py
  101. sort_sources.py
  102. stats_viewer/
  103. strict_enum_value_checker/
  104. style_variable_generator/
  105. sublime/
  106. symsrc/
  107. tcmalloc/
  108. tests/
  109. traceline/
  110. traffic_annotation/
  111. translation/
  112. typescript/
  113. uberblame.py
  114. ubsan/
  115. unused-symbols-report.py
  116. update_pgo_profiles.py
  117. usb_gadget/
  118. v8_context_snapshot/
  119. valgrind/
  120. variations/
  121. vim/
  122. vscode/
  123. web_bluetooth/
  124. web_dev_style/
  125. win/
  126. yes_no.py