1. 10 Oct, 2018 1 commit
    • Ell's avatar
      tools: add performance-log-coalesce.py; use in performance-log-viewer · cb51ea98
      Ell authored
      Add a new performance-log-coalesce.py tool, which groups together
      performance-log address-map entries belonging to the same function
      into a single symbol, by filling-in missing base symbol addresses.
      The addresses are grouped such that each set of addresses
      corresponding to a symbol of the same name, in the same source
      file, are given the same (unique, but arbitrary) base address.
      See the previous commit for why this is necessary.
      
      This should work fine in most cases, however, for logs produced on
      Windows, it can over-coalesce addresses belonging to different C++
      lambda-functions in the same source file, since they all seem to be
      given the same _FUN symbol name.
      
      Use the new tool as part of the pipeline in performance-log-viewer.
      cb51ea98
  2. 02 Sep, 2018 1 commit
    • Ell's avatar
      tools: add performance-log-related tools · d7c74a61
      Ell authored
      performance-log-expand.py decodes a delta-encoded performance log
      by expanding the deltas, producing a log where each sample (and
      other relevant elements) contain complete information.  Note that
      the structure of expanded logs is identical to that of delta-
      encoded logs, the expanded log simply has no deltas.
      
      performance-log-resolve.py resolves symbol information in
      backtraces.  The logs produced by GIMP only specify the program
      counter at each stack frame, providing an address-map to map
      program-counter addresses to actual symbols separately.  This tool
      looks up each program-counter address in the address map,
      incorporating the relevant symbol information directly into the
      backtrace.
      
      Both tools read their input from STDIN, and write their output to
      STDOUT, and can be chained in a pipeline (with
      gimp-performance-log-expand.py appearing first).
      
      Note that these tools require Python 3.
      d7c74a61