• Alexei Svitkine's avatar
    Optimize use of feature params in UKM recorder. · d258b5ff
    Alexei Svitkine authored
    Feature params cannot change at runtime. Retrieve them only once,
    instead of repeatedly.
    
    We're seeing lots of crashes with SIGABRT on shutdown retrieving
    UKM feature params by these code paths. SIGABRT may suggest that
    it's just shutdown taking too long and it just happens to land
    here (because retrieving params takes a bit of time). Eliminate
    this possibility by caching these values.
    
    This should slightly speed up UKM recording, including on shut
    down. If shut down still takes too long and is the cause of the
    SIGABRTs we're seeing, the stack traces should hopefully change
    and the field trial param code won't be blamed anymore (perhaps
    replaced by some other slow code, which can be fixed separately).
    
    Bug: 1131877
    Change-Id: I365e7a6fac5d3ef941cd0a26e9b280d03df6b28b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615820
    Commit-Queue: Robert Kaplow <rkaplow@chromium.org>
    Auto-Submit: Alexei Svitkine <asvitkine@chromium.org>
    Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#841485}
    d258b5ff
ukm_recorder_impl.cc 32.8 KB