Commit graph

21 commits

Author SHA1 Message Date
Brian Gianforcaro
e3ee539fea Profiler: Don't iterate all events when filtering timeline view
There is no need to iterate through all events in a profile when
loading the timeline view, as soon as we see one event we can
move on to the next process.
2021-05-07 15:35:23 +02:00
Gunnar Beutner
43b3fd748a Profiler: Make processes selectable in the timeline view 2021-05-07 15:26:51 +02:00
Gunnar Beutner
7b9cabb5a3 Profiler: Remove the old process selection widget 2021-05-07 15:26:51 +02:00
Andreas Kling
fb6d236ba2 Profiler: Add fixed track headers to the timeline view
The architecture here is a little bit convoluted. I ended up making a
new container widget (TimelineContainer) that works similarly to
GUI::ScrollableContainerWidget but has two subwidgets (a fixed header
that only scrolls vertically, and the timeline view that scrolls on
both axes.)

It would be nice to generalize this mechanism eventually and move it
back into LibGUI, but for now let's go with a special widget for
Profiler so we can continue iterating on the GUI. :^)
2021-05-06 22:18:45 +02:00
Andreas Kling
59da118f2e Profiler: Add a statusbar and show the timeline selection info in it :^) 2021-05-06 22:18:45 +02:00
Andreas Kling
814200f8da Profiler: Rename ProfileTimelineWidget => TimelineTrack 2021-05-06 22:18:45 +02:00
Andreas Kling
abc3ad01b2 Profiler: Add TimelineView widget and make the timeline cursor global
There's no longer a cursor in each process timeline, instead the parent
widget keeps track of it (along with the selection) and it all moves
in sync.
2021-05-06 22:18:45 +02:00
Andreas Kling
9273054b2b Profiler: Show one timeline per process :^)
Instead of smashing together all the samples into a single timeline,
make one per process and put them all in a ScrollableContainerWidget.

This makes it much easier to see which processes were active and when.
No timeline is displayed for processes with zero samples in the profile.
2021-05-06 22:18:45 +02:00
Andreas Kling
dbbc6096a9 Profiler: Move everything into the "Profiler" namespace 2021-05-04 20:59:32 +02:00
Andreas Kling
4b0098e52f Everywhere: Rename app_menu to file_menu or game_menu 2021-05-01 17:40:54 +02:00
Gunnar Beutner
eb798d5538 Kernel+Profiler: Improve profiling subsystem
This turns the perfcore format into more a log than it was before,
which lets us properly log process, thread and region
creation/destruction. This also makes it unnecessary to dump the
process' regions every time it is scheduled like we did before.

Incidentally this also fixes 'profile -c' because we previously ended
up incorrectly dumping the parent's region map into the profile data.

Log-based mmap support enables profiling shared libraries which
are loaded at runtime, e.g. via dlopen().

This enables profiling both the parent and child process for
programs which use execve(). Previously we'd discard the profiling
data for the old process.

The Profiler tool has been updated to not treat thread IDs as
process IDs anymore. This enables support for processes with more
than one thread. Also, there's a new widget to filter which
process should be displayed.
2021-04-26 17:13:55 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Nicholas-Baron
73dd293ec4 Everywhere: Add -Wdouble-promotion warning
This warning informs of float-to-double conversions. The best solution
seems to be to do math *either* in 32-bit *or* in 64-bit, and only to
cross over when absolutely necessary.
2021-04-16 19:01:54 +02:00
Andreas Kling
a2baab38fd Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
2021-04-13 16:58:15 +02:00
Andreas Kling
3bca395190 Profiler: Alt shortcuts and book title capitalization in menus 2021-04-10 15:55:34 +02:00
Andreas Kling
ff52a0f90b Profiler: Don't change window title based on last enabled option
This behavior was bizarre and only highlighted whichever setting
was the last one to be activated.
2021-04-10 15:54:12 +02:00
Andreas Kling
78b12e1521 Userland: Turn all application menus into window menus :^) 2021-03-25 22:14:09 +01:00
Linus Groh
50ea0c3500 Profiler: Get perfcore file from ArgsParser
Fixes #5641.
2021-03-05 09:52:22 +01:00
Andreas Kling
1fb1279cfd Profiler: Add a new "Samples" view to the main UI
You can now view the individual samples in a profile one by one with
the new "Samples" view. The "old" main view moves into a "Call Tree"
tab (but it remains the default view.)

When you select a sample in the samples view, we show you the full
symbolicated backtrace in a separate view on the right hand side. :^)
2021-02-27 18:34:21 +01:00
Brendan Coles
0ffc06b795 Profiler: Add help documentation 2021-02-24 20:40:00 +01:00
Andreas Kling
4055b03291 DevTools: Move to Userland/DevTools/ 2021-01-12 12:18:55 +01:00
Renamed from DevTools/Profiler/main.cpp (Browse further)