Skip to content
  • Georges Basile Stavracas Neto's avatar
    profiler: Concat entry.label() and entry.dynamicString() · 3112e2aa
    Georges Basile Stavracas Neto authored and Philip Chimento's avatar Philip Chimento committed
    In MozJS 60, only using entry.label() is not enough to give
    meaningful Sysprof entries, since it might be an empty string
    in various cases. This gives many empty entries in Sysprof,
    making the profiler not as useful.
    
    As per upstream MozJS, in version 60, the final string is a
    combination of entry.label() and entry.dynamicString(). In [1],
    however, the dynamic string is conditionally added depending
    on a privacy toggle - which is not really the case with GJS
    since enabling the profiler isn't possible without a large
    control over the software stack, and opting in.
    
    Thus, use entry.dynamicLabel() as an additional source of
    information when saving the profiling labels, with enough
    care to not allocate new strings while there.
    
    [1] https://hg.mozilla.org/releases/mozilla-esr60/rev/768e500ad190
    3112e2aa