• Jesse McKenna's avatar
    Move ChromeDllPrefetchResult histogram to chrome.dll · dac859ba
    Jesse McKenna authored
    This change moves the code to emit histogram
    "Windows.ChromeDllPrefetchResult" histogram into ChromeMain(). This
    fixes an issue where the histogram was created in chrome.exe and
    thus failed to be emitted by chrome.dll on non-components builds.
    
    Currently, the histogram is created before chrome.dll is entered, in
    chrome.exe. On non-component (release) builds, chrome.exe and
    chrome.dll each have separate copies of base, because base is
    statically linked ('baked in') into each portable executable file.
    Creating the histogram in chrome.exe's base means that chrome.dll's
    base, the one that actually emits the histograms to UMA, does not see
    the histogram.
    
    This change addresses this by passing the histogram value into
    ChromeMain() and emitting the histogram there.
    
    Bug: 1096609
    Change-Id: I918144dff4fc0d5189d5882462ffadd88f27b9b2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280242
    Commit-Queue: Jesse McKenna <jessemckenna@google.com>
    Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#786465}
    dac859ba
main_dll_loader_win.cc 8.51 KB