Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1446)

Unified Diff: content/public/common/content_switches.cc

Issue 1612663002: Use a valid /prefetch argument when launching a process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bit
Patch Set: self-review Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/common/content_switches.cc
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index bf5d0c1f399e402aba56691b593a1990ef7827f3..b7cb3c84af08579e808ab69c55fdcb458d1f4a23 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -962,6 +962,26 @@ const char kDisableCoreAnimationPlugins[] =
#endif
#if defined(OS_WIN)
+// /prefetch:# arguments to use when launching various process types. It has
+// been observed that when file reads are consistent for 3 process launches with
+// the same /prefetch:# argument, the Windows prefetcher starts issuing reads in
+// batch at process launch. Because reads depend on the process type, the
+// prefetcher wouldn't be able to observe consistent reads if no /prefetch:#
+// arguments were used. Note that the browser process has no /prefetch:#
+// argument. Also, # must always be in [1, 8]; otherwise it is ignored by the
gab 2016/01/26 21:40:26 s/Also, /Note: /
gab 2016/01/26 21:40:26 "Note that the browser process has no /prefetch:#
fdoray 2016/01/27 20:12:19 Done.
fdoray 2016/01/27 20:12:19 Done.
+// Windows prefetcher.
+const char kPrefetchArgumentRenderer[] = "/prefetch:1";
+const char kPrefetchArgumentGpu[] = "/prefetch:2";
+const char kPrefetchArgumentPpapi[] = "/prefetch:3";
+const char kPrefetchArgumentPpapiBroker[] = "/prefetch:4";
+
gab 2016/01/26 21:40:26 I would really really like for all of this logic t
fdoray 2016/01/27 20:12:19 Done.
+// /prefetch:# argument shared by all process types that don't have their own.
+// It is likely that the prefetcher won't work for these process types as it
+// won't be able to observe consistent file reads across launches. However,
+// having a valid prefetch argument for these process types prevents them from
+// interfering with the prefetch profile of the browser process.
gab 2016/01/26 21:40:26 How about: "However having a valid prefetch argum
fdoray 2016/01/27 20:12:19 Done.
+const char kPrefetchArgumentOther[] = "/prefetch:8";
+
// Device scale factor passed to certain processes like renderers, etc.
const char kDeviceScaleFactor[] = "device-scale-factor";
« content/public/browser/content_browser_client.h ('K') | « content/public/common/content_switches.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698