Commit Graph

282 Commits

Author SHA1 Message Date
52f411e1de memory: add memory source for basic mem stats 2018-10-12 17:11:42 -07:00
64ce198a07 Add translator comments 2018-09-25 20:43:48 +02:00
1584fca77a profiler-menu-button: be robust against window destroy
If the window is closed, we want to be more careful about accessing
structure data. This short-circuits some of those situations.
2018-09-24 20:49:28 -07:00
c8d97eb198 filter: backport fixes from dazzle 2018-09-10 17:07:29 -07:00
bc7e3e27c2 capture: use size of void* instead of glibc-specific __WORDSIZE
__WORDSIZE is glibc-specific so sp-capture-types.h doesn't work with musl.
2018-09-07 10:52:52 +01:00
28c28eb11a kernel-symbol: respect ENABLE_POLKIT setting
This fixes the compilation when we have sysprofd fully disabled.
That is not an ideal configuration, but keeping it working
ensures that some of the code is easy copy/paste'able in the
future for some situations.
2018-08-28 12:22:57 -07:00
6f635ad371 build: don't disable assert on tests
This fixes #2 where meson errors about tests and assert being disabled.
2018-08-22 13:06:15 -07:00
6ead0097de build: fix warnings for release builds 2018-08-22 13:06:15 -07:00
7cb15d2de7 perf: fix incorrect free func for ptr array 2018-06-19 14:19:44 -07:00
f11bc530c3 hostinfo: fix pid parameter 2018-06-17 23:43:41 -07:00
50ccd73592 visualizers: use double instead of float
To give us less changes of incorrect values when converting between scales
(at the cost of 2x the array size).
2018-06-16 20:22:53 -07:00
c9c86ff37a hostinfo: up the sample rate
Now that our CPU sampling has a bit less overhead, we can up the sampling
rate a bit without too much affect on performance.
2018-06-16 20:07:38 -07:00
9665cebbdc hostinfo: reuse proc FD and memory when parsing
Re-opening the FD on every poll is pretty expensive. So we should avoid
doing that as well re-use the read buffer (page-aligned, <=1 page) for
the sample data.
2018-06-16 19:50:44 -07:00
a1e3d06296 cpu: make row a bit bigger
We should make it at least the size of the minimum for the view area, or
things look weird when we dont have marks added.
2018-06-16 19:48:23 -07:00
20e4204919 kernel: use "Kernel" instead of "Linux"
It's more clear about that a nebulous term like Linux.
2018-06-16 19:39:18 -07:00
b3bf7968ad capture: avoid GObject in libsysprof-capture-2.a
The point of this file was to be easily usable by applications that want
to generate capture files (or proxy them). The intention here is that we
only have SpCaptureReader/SpCaptureWriter (and associated bits necessary
to support that).

This makes sure that we do not use GObject from the libsysprof-capture-2.a
while still having GType's in the libsysprof-2.so dynamic library.

We also invert the GObject macro check so that the default is to not
register a GType which increases the chances that copy/paste code does
not run into double-registering a GType if used with an application that
links against libsysprof-2. (One such example could be if Gtk uses this
code for timers, as it would break Sysprof itself).
2018-05-21 13:52:16 -07:00
8a4318d4f1 fps: use fill for fps line 2018-05-20 15:51:35 -07:00
0535691afa line-visualizer: add support for filling line areas
This allows us to fill the area and set it to an RGBA instead of the same
as the line color itself.
2018-05-20 15:51:35 -07:00
fc0eff6d4b visualizers: add comment about how to add data visualizers 2018-05-20 15:51:35 -07:00
2e54a1766e visualizers: tweak row heights 2018-05-18 17:50:33 +01:00
9059b5f93a theme: add row separator between visualizers 2018-05-18 16:36:37 +01:00
7c03499484 writer: add helper to replace time range
This is useful so that we can overwrite the time range in the file when
muxing together multiple streams.
2018-05-18 11:28:15 +01:00
12f627a7bd fps: discover gtk FPS counter and add visualizer row 2018-05-17 20:31:56 +01:00
138f08d4fe line-visualizer: clear line info to visible black 2018-05-17 20:31:29 +01:00
c734f59ba5 mark: use gslice for inferred rect
We can get a little boost by using the gslice allocator for the structs
of the same size.
2018-05-17 19:42:10 +01:00
23a0cebfe2 sources/perf: Disable the broken i915 tracepoints for now.
I need to build a new kernel and test the tracepoints, but disable
these for the moment to prevent people from getting surprising garbage
timelines.
2018-05-17 19:36:01 +01:00
94bb2fba0d visualizer: Make proper rectangles from i915 GPU events.
This reveals that we've got really bogus times from these events.  I
think there are two things here: the begin is the submit time, not the
submit-to-hardware time.  And the end time is retire, which is too
delayed to be really useful.  We need to move i915 over to the
low-level tracepoints.

However, this code proved to be useful for vc4, where I have good
timings.
2018-05-17 19:36:01 +01:00
7f889b487d capture: add doc for new_from_fd 2018-05-17 13:13:36 +01:00
1ef68eeb31 capture: do 24 bit counter identifier checks
Max uint was more than we allow, since we steal the top 8 bits for some
other data. This instead checks for 24-bit and warns if the user tries to
store a counter value that was not registered.
2018-05-17 12:29:04 +01:00
3d14ce4eaa capture: use uint for requested counter id
Also document this thing so it is more obvious what is going on with the
resulting counter ranges.
2018-05-17 12:19:54 +01:00
b4d5fdd5e4 writer: clear values before setting counters
We have an annoying issue where we look at all fiends of a counter values
chunk in the counter set frame. So we need those values set to zero. If
we are passed fewer counter values than can fit in the frame, we leave
some of that data uninitialized. This ensures that it is cleared.
2018-05-17 11:38:34 +01:00
851e593ae5 hostinfo: fix cpu/pid parameters for setting cpu counters
We don't need pid here anyway, since we're just passing on counters for the
system itself.
2018-05-17 11:04:23 +01:00
d523fcc024 rectangles: cycle colors
We will still probably want something smarter here, but this gets things
to be more distinguished than black.
2018-05-17 09:05:26 +01:00
896bbaea89 Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html
2018-05-16 18:12:56 +02:00
9381ae3070 rectangles: add basic tooltip support
We definitely want to do something better, but this at least allows testing
some data which is useful now to see what is going on.
2018-05-16 16:33:46 +01:00
ca5684910f rectangles: improve rectangle positioning 2018-05-16 15:09:33 +01:00
a15eb358ce visualizer: ignore anchor x/y position
We don't need that, and it breaks for things not at index 0,0.
2018-05-16 15:09:20 +01:00
a61703d7e5 sources/perf: Add drm/i915 GPU begin/end times. 2018-05-16 14:27:38 +01:00
a3bda35b28 sources/perf: Capture the CRTC number and MSC for vblank events.
This will help make sense of vblank events in a multi-screen
environment (where there are two streams of vblanks), and hopefully
also useful for correlating to compositor events.
2018-05-16 14:27:33 +01:00
88af69c3ec visualizers: mark fields as private 2018-05-16 12:44:48 +01:00
af3e3b0e2a marks: start on visualizer row data for marks
This is sort of a minimal implementation to get started. There is still
plenty to do, but we can iterate from here.
2018-05-16 12:44:48 +01:00
1140e80efc rectangles: start on helper to generate rectangle data
This is meant to be used by marks visualizer to show rectangles.
2018-05-16 12:44:48 +01:00
590d317a94 cursor: add helper to get reader
We might need this so that we can access to the updated end time that was
determined by iterating frames.
2018-05-16 12:44:48 +01:00
0e9f4ca291 visualizers: limit mark rows to 30 2018-05-16 12:44:48 +01:00
14d2554c35 marks: add group to visualizer row
This will allow us to filter events that we do not care about for a given
row. We add a visualizer row per-group.
2018-05-16 12:44:48 +01:00
4f9ea0fce8 visualizers: discover group types when locating mark types 2018-05-16 12:44:48 +01:00
540ff0e05d marks: stub out a visualizer row
This doesn't do any rendering yet, but it gets us the plumbing we need to
start rendering mark content into a visualizer row.
2018-05-16 12:44:48 +01:00
6fa2c270e8 visualizers: discover visualizers from capture reader
The goal here is to avoid having to hard code what visualizers are shown
from the .ui files. We just should add things that we find are supported.

Long term, I think we'll add a concept of an "instrument" which is the
combination of a data source (SpSource) and a visualizer (SpVisualizerRow).

The other goal here is to enable the future support for discovering marks
and adding rows for each of those threads.
2018-05-16 12:44:48 +01:00
6da2a3be4b clock: handle uninitialized clock gracefully
If we haven't discovered the proper clock, just default to monotonic.
2018-05-16 12:30:10 +01:00
f8176b699b clock: prefer clock monotonic
Various articles claim that CLOCK_MONOTONIC is actually faster than the
CLOCK_MONOTONIC_RAW, and that seems to be my experience.
2018-05-16 12:28:42 +01:00