Commit Graph

100 Commits

Author SHA1 Message Date
052f44ccb0 libsysprof-analyze: expose metadata as a property of Document 2023-07-08 12:40:50 -07:00
d993bf3d37 libsysprof-analyze: expose logs as document property
# Conflicts:
#	src/libsysprof-analyze/sysprof-document.c
2023-07-06 16:53:38 -07:00
f772b82f66 libsysprof-analyze: expose files as a property 2023-07-06 15:53:48 -07:00
a999a8a455 libsysprof-analyze: expose processes as property 2023-07-06 15:20:11 -07:00
f7bdebe1a8 libsysprof-analyze: ensure all process info get an exit time 2023-07-06 14:59:08 -07:00
2b29ce8e73 libsysprof-analyze: record exit time of processes
This will allow us to treat them as a duration in a chart.
2023-07-06 14:52:02 -07:00
65a567f0d1 libsysprof-analyze: cleanup some signed-int bswap 2023-07-06 14:51:41 -07:00
7f23fd5e9e libsysprof-analyze: pre-sort frames during loading
That way we can be sure that we only have to look forward to find closing
pairs of operation (such as allocation/free, or appended capture data from
controlfd ring buffers).
2023-07-06 10:19:55 -07:00
9fd20c306f libsysprof-analyze: warn on non-aligned or short-frames
And bail doing any further processing on the capture.
2023-07-06 10:18:52 -07:00
7d93b9f581 libsysprof-analyze: add stack traces w/o kernel context
This restores the functionality we had previously for user vs kernel.
2023-07-05 18:06:42 -07:00
9263624fa0 libsysprof-gtk: add track for samples with context switches 2023-07-05 16:31:45 -07:00
2e0f046390 libsysprof-analyze: add aggregate marks by group
This is handy so that we can show aggregate results in other places without
using a FlattenListModel which can mess up event ordering.
2023-07-05 16:07:07 -07:00
d8ba258051 libsysprof-analyze: give SysprofDocument a title 2023-06-30 13:23:54 -07:00
756e647e21 libsysprof-analyze: add sysprof_document_find_counter()
This allows finding a specific counter without having to traverse them
all from consumer code.
2023-06-29 10:36:40 -07:00
a880d02a84 libsysprof-analyze: remove debug code 2023-06-27 12:37:23 -07:00
886ff654a1 libsysprof-analyze: calculate counter range after adding values
Otherwise we are just calculating a null set.
2023-06-27 12:19:56 -07:00
db0d5cce91 libsysprof-analyze: add counters property 2023-06-26 17:52:36 -07:00
453882a39a libsysprof-analyze: expose properties for some data 2023-06-26 16:39:43 -07:00
13323c5e79 libsysprof-analyze: improve progress notifications 2023-06-21 22:06:42 -07:00
29c72cf202 libsysprof-analyze: cleanup tid->symbol hashtable 2023-06-20 11:03:43 -07:00
43ec0e48f5 libsysprof-gtk: start on some loading progress 2023-06-19 19:00:22 -07:00
7f13f0e327 libsysprof-analyze: ignore end time from syscap header
We are already walking through all the frames so we can guess this better
than what is in the capture file. This helps ensure that loading older
captures still has the end clamped to the last event we'll see.
2023-06-16 17:08:21 -07:00
1a94b60fbf libsysprof-analyze: only extend timespan for data types 2023-06-15 16:51:08 -07:00
d4da036f73 libsysprof-analyze: move timespan to analyze library
That way we can use it for the document itself, and have it update the
timespan of the recording in case it didn't get updated due to ctrl+c or
something prematurely stopping.
2023-06-15 16:43:17 -07:00
6dcb5e5fdd libsysprof-analyze: include time as fractions for marks
This allows more easily calculating the horizontal position of marks and
their duration from charts.
2023-06-15 16:14:32 -07:00
b572b7426e libsysprof-analyze: pre-sort marks from hashtable 2023-06-15 13:27:27 -07:00
1455876835 libsysprof-analyze: make mark catalog work with sections
This allows us more flexibility with creating sections usin the flatten
list model as the rows need to contain the data for the headers.
2023-06-15 13:19:18 -07:00
9a762fa1d4 libsysprof-analyze: add mark catalog kind
We can use this to separate catalogs for names vs groups when building
tree models of them.
2023-06-15 11:52:15 -07:00
8b4ab761ab libsysprof-analyze: add mark information during index pass 2023-06-15 11:44:36 -07:00
80dac7c0cd libsysprof-analyze: create mark catalogs from hashtable
We still need to insert these when parsing the mmap'd capture on the
first pass of data.
2023-06-15 10:35:16 -07:00
51ce85b399 libsysprof-analyze: add scaffolding for listing marks by name/group 2023-06-15 09:36:18 -07:00
72be9f240f libsysprof-analyze: add sysprof_document_list_marks() 2023-06-14 16:59:20 -07:00
5b929b8d5d libsysprof-analyze: add callgraph flags for thread-ids
This allows you to set a flag to show the thread id of what was recorded.

Use this to help disassociate similar threads in a process to figure out
which thread is consuming a majority of the Total time of that process.
2023-06-14 15:11:56 -07:00
2a65bf30af libsysprof-analyze: add symbol kind property for symbols
Additionally, add the pid as the binary nick for processes so that we can
show them in the callgraph with the process name.
2023-06-14 12:08:23 -07:00
ddfa3f57ab libsysprof-analyze: add sysprof_document_list_symbols_in_traceable()
This function will list the symbols in a traceable in a way that is
suitable for showing in a GtkListView or GtkColumnView. For example, that
requires creating copies of the symbols so that duplicates do not cause
hickups with GtkListItemManager.
2023-06-12 16:41:30 -07:00
63b42c2319 libsysprof-analyze: track relative offset for frame
This is handy so that we don't have to keep multiple objects around to
handle this request. Otherwise we'd need to keep references to the
document and that is a bit annoying.

This of course has a limit of about an hour (in tv_nsec), but that is
far longer than we can realistically record anyway.
2023-06-12 15:41:29 -07:00
0529cfb2f0 libsysprof-analyze: add helper to get clock start time 2023-06-12 15:11:42 -07:00
f701e028b4 libsysprof-analyze: add some flags for internal state
This can help us to avoid various work items when processing symbols.
2023-06-12 14:15:08 -07:00
663ae8746a libsysprof-analyze: add list model index for allocation records 2023-06-06 16:45:27 -07:00
9cba99d894 libsysprof-analyze: handle pid == -1
This can happen from Perf sometimes so be explicit about remapping it to
process 0, which is our sort of catchall for kernel stuff.
2023-06-05 16:45:07 -07:00
1e8e1adb73 libsysprof-analyze: automatically handle compressed streams
If we want /proc/kallsyms and we discover /proc/kallsyms.gz, then use the
/proc/kallsyms.gz instead and transparently decompress it. Also, list the
file in sysprof_document_list_files() as /proc/kallsyms instead of
/proc/kallsyms.gz as that is really the intention (but mark the compressed
bit for decoding the chunks).
2023-05-30 12:46:42 -07:00
ff41633abc libsysprof-analyze: use EggBitset instead of GTK
This uses the newly brought in EggBitset instead of GtkBitset so that we
can drop our GTK dependency in the libsysprof-analyze library.
2023-05-25 15:16:13 -07:00
6f90a552e7 libsysprof-analyze: include final address context
We may need to know the final address context so we can inject symbols as
necessary into the top of the callgraph. We know it when generating the
symbols, so just yield it to the caller too.
2023-05-25 11:15:07 -07:00
1b0434c854 libsysprof-analyze: add private API to get the kernel symbol
We may need to inject "- - Kernel - -" in some stack traces.
2023-05-25 11:13:57 -07:00
3ae108464d libsysprof-analyze: implement augmented callgraph
This creates a SysprofCallgraph object which is a GListModel of
SysprofCallgraphFrame. The SysprofCallgraphFrame is also a GListModel of
SysprofCallgraphFrame so that we can map this all into a GtkListView in
the future for tree-like visibility.

The augmentation allows for the same callgraph code to be used for multiple
scenarios such as CPU sampling as well as memory allocation tracking.

If your augmentation size is <=sizeof(void*) then you do not occur an extra
allocation and you can use the inline augmentation space.

The test-callgraph clearly shows that we still need to do the shuffling
of -- Kernel -- and -- User -- like the old callgraph code did. But that
will come soon enough.
2023-05-24 17:11:30 -07:00
ca2b008547 libsysprof-analyze: skip symbols we failed to symbolize 2023-05-24 17:08:09 -07:00
d723e41683 libsysprof-analyze: wrap processes in [] like previously 2023-05-24 17:07:52 -07:00
f12f2b760c libsysprof-analyze: add API to get symbol to represent process
And include a fallback in case we never got an actual Process frame which
will contain the cmdline for the process. We need to hold onto the fallback
too so that we can keep symbols lightweight by not having to reference them
so long as the document is alive.
2023-05-24 15:19:44 -07:00
5b00127d7d libsysprof-analyze: add API to get only samples
We'll probably want this for allocations too at some point.
2023-05-24 14:30:13 -07:00
8348f7fe2c libsysprof-analyze: start on scaffolding for callgraph API 2023-05-24 13:00:47 -07:00