Commit Graph

2019 Commits

Author SHA1 Message Date
Salamandar fc657184a0 Undo some (unnecessary) changes. 2019-01-25 19:08:28 +00:00
Félix Piédallu fc8303dd0a (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)
2019-01-25 19:08:28 +00:00
Ell dafb63fd66 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.
2019-01-23 16:33:25 -05:00
Ell 5a6548a4b6 tools: in performance-log-viewer.py, some cleanup 2019-01-23 16:33:24 -05:00
Ell b74c33db5c 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.
2019-01-16 03:58:44 -05:00
Ell f246a0197b tools: in performane-log-viewer.py, change sample-selection icon 2019-01-16 03:58:44 -05:00
Michael Natterer 24233bc4ec tools: fix perl warning about unescaped left brace in gimp-mkenums
Simply use "\{" instead of "{" for matching a literal "{".

(cherry picked from commit 4a294f6d6a)
2019-01-03 15:22:43 +01:00
Ell 84227fbfec tools: in performance-log-viewer.py, fix "function()" predicate ...
... when not specifying a thread-ID
2018-11-10 02:52:32 -05:00
Ell c61138f8f0 tools: add performance-log-coalesce.py to EXTRA_DIST 2018-11-09 02:23:13 -05:00
Ell 0b2d41635a 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.
2018-11-07 14:26:16 -05:00
Ell fb95d3b86e tools: in performance-log-expand.py, preserve threads with empty stacks
... which can be present in logs since last commit.
2018-11-07 14:26:16 -05:00
Ell 21b36cd864 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.
2018-11-03 04:17:49 -04:00
Ell 4664fa73fb 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.
2018-10-21 03:36:48 -04:00
Ell 27dc9b815d tools: in performance-log-viewer.py, fix percentage cell renderer 2018-10-20 10:56:36 -04:00
luz.paz ac282f2045 Misc. typos
Found via `codespell`
2018-10-19 15:30:27 +00:00
Ell 26ea334825 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.
2018-10-19 10:10:57 -04:00
Ell 43b492ff83 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.
2018-10-11 08:23:16 -04:00
Ell cb51ea981a 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.
2018-10-10 15:32:14 -04:00
Ell 88438c5055 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.
2018-09-30 09:01:12 -04:00
Ell b672f20075 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.
2018-09-30 09:01:12 -04:00
Ell 97498017c0 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.
2018-09-30 05:36:49 -04:00
Ell 0f38709259 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.
2018-09-30 05:10:47 -04:00
Ell 46e5e4d478 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.
2018-09-29 15:43:46 -04:00
Ell fca05065e1 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.
2018-09-29 00:16:20 -04:00
Ell 6ad3dbdb17 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.
2018-09-28 16:30:57 -04:00
Ell d33fb0e7b8 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.
2018-09-27 01:13:04 -04:00
Ell 51d9934942 tools: in performance-log-viewer.py, right-align backtrace frame number column 2018-09-23 01:38:09 -04:00
Ell 407e9f36ca tools: in performance-log-viewer.py, set thread filter search column 2018-09-23 01:17:52 -04:00
Ell 3f630378b0 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.
2018-09-23 00:53:20 -04:00
Ell a7afbe13ec 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.
2018-09-23 00:53:20 -04:00
Ell 2c8e3f8e0a tools: only show object/source basename in performance-log backtraces
... to reduce their verbosity.  Show the full path in the
corresponding tooltip.
2018-09-21 09:29:10 -04:00
Ell c7a4eb4602 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.
2018-09-21 07:45:14 -04:00
Ell c537341d35 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.
2018-09-21 02:41:56 -04:00
Ell f8dd444e98 tools: in performance-log-viewer.py, fix profile viewer search column 2018-09-16 12:34:58 -04:00
Ell 3601c9189b 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.
2018-09-16 12:03:57 -04:00
Ell 7e186f3e5d tools: add performance-log-deduce.py
... which statistically deduces the correct thread states based on
backtrace address frequency, fixing local inaccuracies.
2018-09-16 11:58:38 -04:00
Ell 78adb7c900 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).
2018-09-03 18:30:10 -04:00
Ell d7c74a615b 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.
2018-09-02 03:12:09 -04:00
Jehan 49fc5e3034 tools: invert-svg build tool no longer necessary.
This tool has been outdated for some time now as we don't generate an
"inverted icons" theme anymore. This is all done through CSS from a
single symbolic icon theme.
2018-08-20 17:52:22 +02:00
Jehan 1461496999 tools: fix linking error.
Though no error was raised during a native build, a cross-build was
choking on this missing link to libgimpbase and failing.
The error returned by the linker though was a bit amiss.

Fixes:
> gimp-test-clipboard.o: In function `test_clipboard_copy_callback':
> tools/gimp-test-clipboard.c:419: undefined reference to `g_file_get_contents'
> collect2: error: ld returned 1 exit status

(cherry picked from commit 0865e9db1f)
2018-08-12 22:46:44 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Jehan 8a36b786bc tools: post-process SVG objects with "color-important" label.
This will allow a designer to simply "tag" an object so that its color
does not get overrided by GTK+ without needing to edit the file as text.
2018-06-23 20:24:26 +02:00
Félix Piédallu 15075932be Fix Python files:
* Prefer python2 to python that may point on python3 on modern installs.
* Fix indent/spaces consistency.

(cherry picked from commit 2265701268)
2018-06-16 02:57:06 +02:00
Jehan 276d9b60b3 configure, tools: actually use GIMP_PKGCONFIG_VERSION and...
... GIMP_TOOL_VERSION rather than hardcoding versions.
We may still have issues with "gtk+-3.0", but let's let this one slip
for now.
2018-06-15 17:22:38 +02:00
Jehan 10480ef7c6 tools: gimptool should check gimp*-3.0 pkg-config file.
And "gtk+-3.0" as well.
Thanks to Benoit Touchette for noting.
2018-06-15 16:47:05 +02:00
Michael Natterer bd9d85e60b tools: rename test-keyboard.c and install it as gimp-test-clipboard
Clibpard bugs are so common, it will be useful to have on users'
machines.
2018-06-04 22:35:18 +02:00
Michael Natterer 061f4e4019 tools, app-tools: update .gitignore 2018-05-28 12:41:48 +02:00
Jehan f3de5cd3fe tools: make gimptool memory-managed.
The code was basically leaking memory everywhere, and apparently on
purpose (according to a top comment). Even on short-lived process, not
properly managing memory is not a good habit, especially if we plan to
maintain a program for the long run.
So here are some fixes. I'm sure I must have missed some places (code
was a mess), and hopefully I broke nothing. But that's good for now. At
least it is somewhat sane code now.
2018-05-27 17:53:26 +02:00
Jehan 02fc818bf6 tools: do not segfault gimptool with source without extension.
Since commit 58fa382001, gimptool would accept source files with
non-standard extensions when using known C or C++ compilers. This would
include source with no extensions at all.
When this happens, do not try to set a pointer to a non-existing dot
separator to '\0'. That obviously segfaults.
2018-05-27 16:11:38 +02:00
Jehan 355676e7ae tools: clean tabs out of gimptool code. 2018-05-27 15:17:42 +02:00