Bug 1551698 - disable PGO on some low-level windows files; r=dmajor
authorNathan Froyd <froydnj@mozilla.com>
Wed, 15 May 2019 13:00:39 +0000
changeset 532743 59ae39ef8edf171b0ef5417e74402ae233f71dc4
parent 532742 55d8ca64343b8c2c725ace70eed4e002b775f795
child 532744 17fa1b52803256a98954a02e6196d0a92a25593c
push id11272
push userapavel@mozilla.com
push dateThu, 16 May 2019 15:28:22 +0000
treeherdermozilla-beta@2265bfc5920d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1551698
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1551698 - disable PGO on some low-level windows files; r=dmajor PGO instrumentation interacts badly with this code, and it's not crucial that this code be lightning fast. Differential Revision: https://phabricator.services.mozilla.com/D31131
browser/app/winlauncher/moz.build
security/sandbox/moz.build
--- a/browser/app/winlauncher/moz.build
+++ b/browser/app/winlauncher/moz.build
@@ -6,22 +6,29 @@
 
 Library('winlauncher')
 
 FORCE_STATIC_LIB = True
 
 UNIFIED_SOURCES += [
     '/ipc/mscom/ProcessRuntime.cpp',
     '/widget/windows/WindowsConsole.cpp',
-    'DllBlocklistWin.cpp',
     'ErrorHandler.cpp',
     'LauncherProcessWin.cpp',
     'LaunchUnelevated.cpp',
 ]
 
+SOURCES += [
+    'DllBlocklistWin.cpp',
+]
+# Our patched NtMapViewOfSection can be called before the process's import
+# table is populated.  Don't let the compiler insert any instrumentation
+# that might call an import.
+SOURCES['DllBlocklistWin.cpp'].no_pgo = True
+
 OS_LIBS += [
     'ntdll',
     'oleaut32',
     'ole32',
     'rpcrt4',
     'version',
 ]
 
--- a/security/sandbox/moz.build
+++ b/security/sandbox/moz.build
@@ -139,16 +139,20 @@ elif CONFIG['OS_ARCH'] == 'WINNT':
         'chromium/sandbox/win/src/target_process.cc',
         'chromium/sandbox/win/src/target_services.cc',
         'chromium/sandbox/win/src/top_level_dispatcher.cc',
         'chromium/sandbox/win/src/win2k_threadpool.cc',
         'chromium/sandbox/win/src/win_utils.cc',
         'chromium/sandbox/win/src/window.cc',
         'win/SandboxInitialization.cpp',
     ]
+    # Sandbox interceptors can be called before the process's import table
+    # is populated.  Don't let the compiler insert any instrumentation that
+    # might call an import.
+    SOURCES['chromium/sandbox/win/src/process_thread_interception.cc'].no_pgo = True
 
     if CONFIG['CPU_ARCH'] in ('x86_64', 'aarch64'):
         SOURCES += [
             'chromium/sandbox/win/src/interceptors_64.cc',
             'chromium/sandbox/win/src/resolver_64.cc',
             'chromium/sandbox/win/src/service_resolver_64.cc',
         ]
     else: