• Stephen Nusko's avatar
    Use a static string in InputLatency::.* TraceEvent names. · f86cf225
    Stephen Nusko authored
    Currently we use a dynamically created trace event name this has a
    couple implications:
    
    1) Has to be computed at run time and allocated dynamically, and copied
       by the TraceEvent implementation.
    2) Will be stripped from traces when tracing with privacy filtering
       enabled.
    3) Has to be serialized and sent over mojo and then parsed.
    
    This fixes all of these by directly computing the trace name as a
    static string. This comes potentially at the slight cost of binary size
    (since now the strings need to be stored in the full form), but this is
    limited to ("InputLatency::" + Name(num WebInputEvent::Type)) * number of
    Types, and we get to remove some mojo code so it should end up close to a
    wash in binary size (+528 bytes).
    
    Change-Id: I285d8bb24f8497bc067480201fdd3bac0b390083
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062286Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
    Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    Auto-Submit: Stephen Nusko <nuskos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#742963}
    f86cf225
latency_info_mojom_traits.h 2.68 KB