Commit Graph

3 Commits

Author SHA1 Message Date
Ell
3fdb5b32f7 tools: in performance-log-expand.py, preserve threads with empty stacks
... which can be present in logs since last commit.

(cherry picked from commit fb95d3b86e)
2018-11-07 14:26:39 -05:00
Ell
0fcf02a7c6 app, tools: add "running" thread attribute to GimpBacktrace/performance-log
The "running" attribute (readable through
gimp_backtrace_is_thread_running(), and recorded in the performance
log) specifies if the thread was in a running or suspended state at
the time the backtrace was taken.  It is accurate on Linux, but
only approximated on Windows.

Adapt the performance-log-expand.py tool to maintain this attribute
(and any future thread attributes we might add).

(cherry picked from commit 78adb7c900)
2018-09-03 18:30:34 -04:00
Ell
1122b3e492 tools: add performance-log-related tools
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.

(cherry picked from commit d7c74a615b)
2018-09-02 03:27:33 -04:00