Commit Graph

2027 Commits

Author SHA1 Message Date
Ell
460db9d302 tools: add performance-log-progressive-coalesce.py; use in performance-log-viewer
Add a new performance-log-progressive-coalesce.py tool, which
coalesces partial address maps in progressive performacne logs into
a single global address map, suitable for processing by the rest of
the tools.

Use the new tool as part of the pipeline in performance-log-viewer.

(cherry picked from commit 76f9e5feaf)
2020-07-30 01:07:18 +03:00
Ell
b58ccec833 tools: add performance-log-close-tags.py, use in performance-log-viewer
Add a new performance-log-close-tags.py tool, which closes unclosed
tags in incomplete performance logs, allowing the rest of the
perofmance-log tools to process them.  This is necessary for
unfinished progressive logs.

Use the new tool as part of the pipeline in performance-log-viewer.

(cherry picked from commit e5fe1ef152)
2020-07-30 01:06:55 +03:00
0087167cb3 Misc. typos
Found via `codespell`

(cherry picked from commit ac282f2045)
2020-06-10 02:09:26 +02:00
Ell
f70d24784c tools: in performance-log-viewer.py, handle markers with > INT_MAX timestamps
(cherry picked from commit 84ff130e18)
2020-03-06 12:37:11 +02:00
Ell
f8b07bd8b5 icons, tools: add Symbolic high-contrast variants
Add new Symbolic-High-Contrast and Symbolic-Inverted-High-Contrast
themes, which are automatically-generated high-contrast variants of
the (original) Symbolic theme.  The contrast factor is settable in
the makefile, and is currently at 1.5 for both themes.

Rename tools/invert-svg to tools/svg-contrast, which now takes a
contrast-factor argument, and adjusts the input SVG contrast,
instead of just inverting it.  Note that we can still use the tool
to invert icons, using a contrast of -1.
2020-02-22 22:51:18 +02:00
1ca3d99fbc tools, fix implicit declaration of function atoi warning 2019-11-30 02:06:30 +00:00
c1da126a42 tools: add gimp-release-notes.sh to generate Contributors and Translators sections for NEWS 2019-09-16 18:43:55 +02:00
50b1c19f36 tools: clean up patch from merge request !36.
Commit 283ec1da0f previously pushed had some coding style bugs, which
unfortunately couldn't be fixed before pushing because the platform
doesn't allow it and the original contributor is not available lately.
Let's fix these.

(cherry picked from commit 8fa7b5bc74)
2019-09-16 10:50:34 +02:00
6789a4350c issue #2221: gimptool should install plug-ins into subfolders
(cherry picked from commit 283ec1da0f)
2019-09-16 10:50:26 +02:00
Ell
f8432a6dc9 tools: add mnemonic-clashes to EXTRA_DIST
(cherry picked from commit f0a8a5b67b)
2019-09-12 18:17:12 +03:00
Ell
c526f7f7a0 tools: add mnemonic-clashes tool
Add a new mnemonic-clashes tool, which checks for mnemonic clashes
in menus.  This tool can be invoked directly from the shell.  It
takes an optional parameter which limits the search to a specific
type of menus, according to their xml tag (in particular, "menu"
for regular menus, and "popup" for popup menus).

(cherry picked from commit a2a7fc993c)
2019-09-12 17:56:49 +03:00
727b83cbe6 tools: fix windows file handling in gimp-test-clipboard.c
Use g_open() for proper filename encoding and _O_BINARY to avoid line
ending conversions.

(cherry picked from commit a9b36245c9)
2019-06-11 19:33:10 +02:00
Ell
2548dd1acf tools: in performance-log-viewer.py, fix deprecation warnings
(cherry picked from commit b1077a903e)
2019-05-01 15:34:48 -04:00
aaf5816695 Undo some (unnecessary) changes.
(cherry picked from commit fc657184a0)
2019-01-25 21:10:45 +01:00
0436dd1cb7 (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)

(cherry picked from commit fc8303dd0a)
2019-01-25 21:10:41 +01:00
Ell
34c732df1d tools: in performance-log-viewer.py, add markers view
Add a "markers" page to the performance-log viewer, which lists
the event markers contained in the log, and allows navigating
between them.

Update docs accordingly.

(cherry picked from commit dafb63fd66)
2019-01-23 16:33:33 -05:00
Ell
dcc4816770 tools: in performance-log-viewer.py, some cleanup
(cherry picked from commit 5a6548a4b6)
2019-01-23 16:33:33 -05:00
Ell
940cf5f196 tools: in performance-log-viewer.py, allow inverting selection
In the perofmance-log viewer, add header-bar buttons to clear and
invert the selection, and allow inverting the selection by ctrl-
right-clicking on the sample-selection area.

Update the docs.

(cherry picked from commit b74c33db5c)
2019-01-16 03:58:49 -05:00
Ell
46c5e8f33f tools: in performane-log-viewer.py, change sample-selection icon
(cherry picked from commit f246a0197b)
2019-01-16 03:58:49 -05:00
4a294f6d6a tools: fix perl warning about unescaped left brace in gimp-mkenums
Simply use "\{" instead of "{" for matching a literal "{".
2019-01-03 15:20:33 +01:00
Ell
934d896fa8 tools: in performance-log-viewer.py, fix "function()" predicate ...
... when not specifying a thread-ID

(cherry picked from commit 84227fbfec)
2018-11-10 02:52:52 -05:00
Ell
8e1e6dfb83 tools: add performance-log-coalesce.py to EXTRA_DIST
(cherry picked from commit c61138f8f0)
2018-11-09 02:23:46 -05:00
Ell
9489b66eec tools: a few improvements in performance-log-viewer.py
In sample-search predicates, remove the "exclusive" parameter of
the "function()" function, and replace it with optional "id" and
"state" parameters, which limit the match to the call-stacks of
matching threads, as per the "thread()" function.

Sort the backtrace thread-list by thread ID.

(cherry picked from commit 0b2d41635a)
2018-11-07 14:26:39 -05:00
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
a4894b54ad tools: in performance-log-viewer.py, show variable descriptions
In the preformance-log viewer, show instrumentation-variable
descriptions as tooltips for the corresponding treeview rows.

(cherry picked from commit 21b36cd864)
2018-11-03 04:17:56 -04:00
Ell
8e6c7c10df tools: in performance-log-viewer.py, allow sorting profile by function name
In the performance-log viewer's profile view, allow sorting the
call-graph tree-views by function name, in addition to the
inclusive/exclusive frequencies.

(cherry picked from commit 4664fa73fb)
2018-10-21 03:37:35 -04:00
Ell
34f0cc3692 tools: in performance-log-viewer.py, fix percentage cell renderer
(cherry picked from commit 27dc9b815d)
2018-10-20 10:56:39 -04:00
Ell
54dc73192f tools: in performance-log-viewer.py, visualize percentage in profile viewer
In the performance-log viewer's profile view, displasy in-line bar-
chart-like visualization of function and source-line sample
percentages, as part of the corresponding tree-view cells.

(cherry picked from commit 26ea334825)
2018-10-19 10:11:01 -04:00
Ell
65131b2c1b tools: fix performance-log viewer profile thread-filter
In performance-log-viewer.py, fix thread-state toggling in the
profile-view thread-filter popover, when not all threads are
included in the current selection.

(cherry picked from commit 43b492ff83)
2018-10-11 08:23:19 -04:00
Ell
8c91206d55 tools: add performance-log-coalesce.py; use in performance-log-viewer
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.

(cherry picked from commit cb51ea981a)
2018-10-10 15:32:23 -04:00
Ell
c6f1196721 tools: in performance-log-viewer.py, add annotated source view
Add an annotated source view to the performance-log viewer's
profile view.  When selecting the [Self] entry of a function's
profile, for which source information is available and whose source
is found locally, a new column opens, showing the function's
source, annotated with sample statistics.  Header-bar buttons allow
navigation through the annotated lines, selection of all the
samples corresponding to a given line, and opening the text editor
at the current line.

(cherry picked from commit 88438c5055)
2018-09-30 09:01:38 -04:00
Ell
8624f3070e tools: in performance-log-view.py, don't change call-graph path ...
... when selecting a function's samples

Since we now preserve the call-graph path across state changes,
there's no need to explictly set the path after selecting a
function's samples in the profile view.

(cherry picked from commit b672f20075)
2018-09-30 09:01:38 -04:00
Ell
4358430050 tools: in performance-log-viewer.py, cache source file lookups
In the performance-log viewer, cache the results of source-file
lookups, to speed up future lookups.

(cherry picked from commit 97498017c0)
2018-09-30 05:37:25 -04:00
Ell
33269cc8ff tools: in performance-log-viewer.py, allow viewing source files ...
... in backtraces

In the performance-log viewer's backtrace viewer, show a document
icon next to stack frames with source-location information, whose
source file is found locally.  Clicking the icon opens the source
file in a text editor at the relevant line.

Two environment variables control this feature:

  - PERFORMANCE_LOG_VIEWER_PATH is a list of colon-separated
    directories in which to look for source files.  If this
    variable is undefined, the current directory is used.

  - PERFORMANCE_LOG_VIEWER_EDITOR is the command to use to launch
    the text editor, for editing a specific file at a specific
    line.  The special strings "{file}" and "{line}" are replaced
    with the filename and line-number, respectively.  If this
    variable is undefined, "xdg-open {file}" is used.

(cherry picked from commit 0f38709259)
2018-09-30 05:10:52 -04:00
Ell
c44015a84e tools: in performance-log-viewer.py, handle infinities in sample graph
Don't take infinite values into account when calculating the
vertical scale of sample graphs, and rather display infinite values
as dashed lines at the top of the graph.

(cherry picked from commit 46e5e4d478)
2018-09-29 15:43:50 -04:00
Ell
df265073e4 tools: in performance-log-viewer.py, retain call-graph path
In the performance-log viewer's profile view, retain the current
call-graph path across state changes.

(cherry picked from commit fca05065e1)
2018-09-29 00:16:25 -04:00
Ell
61367b3f39 app: in performance-log-viewer.py, add undo support
Add undo functionality to the performance-log viewer, which allows
undoing/redoing changes to the sample selection, and the call-graph
state.

(cherry picked from commit 6ad3dbdb17)
2018-09-28 16:31:00 -04:00
Ell
6bc2b330bb tools: various improvements in gimp-performance-log-viewer.py
Fix int-ratio variable formatting when the input is NaN, which can
happen when calculating the standard deviation, if all the values
are infinite.

Fix keyboard sample-range selection.

Deselect all samples when right-clicking a sample graph.

(cherry picked from commit d33fb0e7b8)
2018-09-27 01:13:12 -04:00
Ell
54fbf1a8cb tools: in performance-log-viewer.py, right-align backtrace frame number column
(cherry picked from commit 51d9934942)
2018-09-23 01:38:17 -04:00
Ell
fab6b4746d tools: in performance-log-viewer.py, set thread filter search column
(cherry picked from commit 407e9f36ca)
2018-09-23 01:17:57 -04:00
Ell
b5d628bec2 tools: in performance-log-viewer.py, add thread filter to profile
In the performance-log viewer, add an option to filter which
threads, and which states of each thread, are included in the
profile.  By default, all threads in the RUNNING state are
included.

(cherry picked from commit 3f630378b0)
2018-09-23 00:53:30 -04:00
Ell
ea17d18d1b tools: in performance-log-viewer.py, defer UI updates util needed
In the performance-log viewer, defer updates to the various UI
elements when the selection changes until they're actually shown.
This improves responsiveness when changing the selection.

(cherry picked from commit a7afbe13ec)
2018-09-23 00:53:30 -04:00
Ell
cb26c31a96 tools: only show object/source basename in performance-log backtraces
... to reduce their verbosity.  Show the full path in the
corresponding tooltip.

(cherry picked from commit 2c8e3f8e0a)
2018-09-21 09:29:13 -04:00
Ell
e839794d36 tools: replace performance-log viewer call-graph direction icons
Use the less-ambiguous, if just as clumsy,
"format-indent-more/less" icons, to stand for the
caller -> callee, and callee -> caller, directions, respectively.

(cherry picked from commit c7a4eb4602)
2018-09-21 07:45:19 -04:00
Ell
c0e82c0381 tools: a few improvements in performance-log-viewer.py
Fix searching for samples by thread name, in particular, when there
are unnamed threads.

Use GtkMenuButton, instead of GtkButton, for the find-samples
header button.

Add mnemonics to the find-samples popover.

(cherry picked from commit c537341d35)
2018-09-21 02:42:05 -04:00
Ell
3d24dfbc6e tools: in performance-log-viewer.py, fix profile viewer search column
(cherry picked from commit f8dd444e98)
2018-09-16 12:35:09 -04:00
Ell
cc18c2f890 tools: add performance-log-viewer.py and driver
performance-log-viewer.py is a viewer for GIMP performance logs.
The viewer is made up of two parts: a sample-selection area at the
top, and an information area at the bottom.

The sample-selection area visualizes the sampled variables and
markers using a simultaneous set of plots, and displays the
currently selected samples.  Samples can be selected directly
through the sample-selection area, or by other means, such as
searching for all samples satisfying a certain condition, or
containing a certain function.

The information area shows global information stored in the log, as
well as information specific to the currently selected samples,
including variable listing and statistics, full backtrace, and
profile/call-graph information.

Note that performance-log-viewer.py takes its input from STDIN,
like the rest of the performance-log tools, and is therefore
suitable for use as part of a pipeline.  For standalone use, the
performance-log-viewer driver is also included, which takes the log
file as a command-line argument, and processes it through an
appropriate pipeline before feeding it to the viewer.

(cherry picked from commit 3601c9189b)
2018-09-16 12:05:35 -04:00
Ell
440695fa45 tools: add performance-log-deduce.py
... which statistically deduces the correct thread states based on
backtrace address frequency, fixing local inaccuracies.

(cherry picked from commit 7e186f3e5d)
2018-09-16 12:05:35 -04: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