Commit graph

266 commits

Author SHA1 Message Date
Jesse Buhagiar 2753505962 SystemMonitor: Use u64 for disk sizes
This fixes #7288, which was being caused by unsigned 32-bit integer
overflow
2021-05-28 16:37:25 +01:00
Andreas Kling a1e133cc6b LibCore: Make ProcessStatisticsReader return results in a Vector
The HashMap API was overkill and made using this less ergonomic than
it should be.
2021-05-23 11:10:15 +02:00
Andreas Kling 786f6841b3 SystemMonitor: Remove "Inspect Process" action from context menu
Since everyone opts out of being inspectable by default now, let's not
offer inspection from the menu since it will fail in a default setup.
2021-05-22 23:30:40 +02:00
Andreas Kling 9676548800 SystemMonitor: Symbolicate process stacks in a background thread
Use a Threading::BackgroundAction to symbolicate stacks. This avoids
blocking the main thread and keeps the GUI running (mostly.)
2021-05-22 19:57:19 +02:00
Andreas Kling 5729b4e9a5 SystemMonitor: Don't unveil /tmp/portal/symbol
This portal doesn't exist after SymbolServer has been removed.
2021-05-22 18:54:22 +02:00
Andreas Kling 5d6252b29e LibSymbolication: Rename Client.{cpp,h} => Symbolication.{cpp,h} 2021-05-22 18:54:22 +02:00
Andreas Kling 252cb54310 LibSymbolication+SystemMonitor+bt: Move symbolication back in-process
Process-separated symbolication was cute, but ultimately the threat
model is kinda silly. We're already *running* the binary, but we're
afraid to parse its symbol table? :^)

This commit makes SystemMonitor and bt do symbolication in-process.
SymbolServer and the symbol user will be removed separately.
2021-05-22 18:54:22 +02:00
Andreas Kling d783076a30 Userland: Rename LibSymbolClient => LibSymbolication 2021-05-22 18:54:22 +02:00
Max Wipfli 229414b002 Applications: Use titlecase and distinct underlined characters in menus
This changes (context) menus across the system to conform to titlecase
capitalization and to not underline the same character twice (for
accessing actions with Alt).
2021-05-21 18:41:28 +01:00
Andreas Kling 6a012ad79f LibGfx: Remove Gfx::FontDatabase::default_bold_font()
Instead use default_font().bold_variant() in cases where we want a bold
variant of the default font. :^)
2021-05-20 20:55:29 +02:00
Marcus Nilsson 63897c469b
SystemMonitor: Don't try and show process window with nothing selected (#7221)
When right-clicking with no selected row in the process list,
SystemMonitor would still show a context menu. This disables
the context menu if index is invalid and also disables Alt+Enter
so that build_process_window() is never called with a PID of -1.

Fixes #7167.
2021-05-18 08:10:27 +02:00
brapru c2ae6c189e SystemMonitor: Show UDP sockets
Creates a new TableView in the socket list for UDP information.

Resolves #6980.
2021-05-18 08:03:40 +02:00
Linus Groh 067b880459 SystemMonitor: Make ProcessModel icon column non-sortable
Sorting by icon is neither intuitive nor useful, so let's disable it
(like in GUI::FileSystemModel).
2021-05-15 00:15:09 +01:00
Andreas Kling ef09f9c825 SystemMonitor: Make sure we set a model before changing column sizes
Changing a view's column metadata requires that a model is set.
2021-05-15 00:50:51 +02:00
Andreas Kling 31d4bcf5bf Userland: Tighten a *lot* of pledges! :^)
Since applications using Core::EventLoop no longer need to create a
socket in /tmp/rpc/, and also don't need to listen for incoming
connections on this socket, we can remove a whole bunch of pledges!
2021-05-13 23:28:40 +02:00
Andreas Kling 3c3b384c80 SystemMonitor: Boost main thread priority to maximum on startup
It's frustrating when the system is under heavy load and you want to
investigate using SystemMonitor, but SystemMonitor chokes on the lag.

Let's at give it a fighting chance by maxing out the main thread prio.
2021-05-13 23:28:40 +02:00
Linus Groh c8738bbd7e SystemMonitor: Spell process window title as "System Monitor"
This is what we use for the main window and elsewhere.
2021-05-12 17:52:56 +01:00
Ali Mohammad Pur a91a49337c LibCore+Everywhere: Move OpenMode out of IODevice
...and make it an enum class so people don't omit "OpenMode".
2021-05-12 11:00:45 +01:00
Andreas Kling 4b0098e52f Everywhere: Rename app_menu to file_menu or game_menu 2021-05-01 17:40:54 +02:00
Andreas Kling 3d4afe7614 Everywhere: "indexes" => "indices"
I've wasted a silly amount of time in the past fretting over which
of these words to use. Let's just choose one and use it everywhere. :^)
2021-04-29 22:23:52 +02:00
Andreas Kling 935be7f297 SystemMonitor: Show action status tips in the statusbar :^) 2021-04-23 17:25:33 +02:00
Andreas Kling b91c49364d AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
2021-04-23 16:46:57 +02:00
Andreas Kling 0eedf3bfea SystemMonitor: Only show two decimal digits for the CPU usage 2021-04-22 18:24:12 +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
Andreas Kling 2a6a54dea5 Userland: Use Core::DirIterator::next_full_path()
Simplify some code by using this instead of concatenating the full path
ourselves at the call site.
2021-04-21 23:49:01 +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 e43fba0c58 SystemMonitor: Add tab with detailed state to process properties window
This is done using a wrapper model that transforms all the information
about a single process in the ProcessModel and turns it into a 2-column
table model with only that process in it.
2021-04-11 13:24:59 +02:00
Andreas Kling a78ea2c0b2 SystemMonitor: Add a little header to the process properties window
Show a larger (32x32) version of the executable icon and the process
name + PID above the various property tabs.
2021-04-11 12:52:42 +02:00
Andreas Kling 1c52dc86ee SystemMonitor: Simplify executable icon lookup in ProcessModel 2021-04-11 12:52:42 +02:00
Andreas Kling 2c94c9fa7f SystemMonitor: Add Alt shorcuts to menu actions 2021-04-09 17:10:30 +02:00
Andreas Kling 7b9754d976 SystemMonitor: Highlight kernel processes a bit better in SystemMonitor
Kernel processes are now displayed with a gear icon and a "(*)" suffix
in the process list.
2021-04-06 17:55:47 +02:00
Andreas Kling 516868e197 SystemMonitor: Add Alt shortcuts for top-level menus 2021-04-05 23:15:43 +02:00
Andreas Kling 6902adbb84 SystemMonitor: Only show the most important process stats by default
You can still enable additional columns via the context menu, and this
gives us a much more focused default interface.
2021-04-05 13:40:25 +02:00
Andreas Kling cbc582e0df SystemMonitor: Don't generate backtraces while not looking at them 2021-04-05 11:42:54 +02:00
Linus Groh 45d4bf156d SystemMonitor: Tweak default window size
This ensures that all information on the 'Graphs' tab is visible by
default without having to resize the window.

Fixes #6135.
2021-04-05 11:26:07 +02:00
Andreas Kling 7b7cbcecdf SystemMonitor: Scope the process-specific actions to the process list
We don't want the process-specific actions to activate via keyboard
shortcuts when we're not focusing the process list.
2021-04-04 22:45:45 +02:00
Andreas Kling 5d379fcfb4 SystemMonitor: Actually reuse existing process properties windows 2021-04-04 22:43:43 +02:00
Andreas Kling eff7ea5b84 LibGUI: Add GUI::CommonActions::make_properties_action()
Many apps want a "Properties" action with the same icon and shortcut.
2021-04-04 22:43:43 +02:00
Andreas Kling 578f749791 SystemMonitor: Remove unnecessary splitter from UI layout 2021-04-04 22:43:43 +02:00
Andreas Kling 8f0f6af369 SystemMonitor: Show total CPU usage percentage in status bar 2021-04-04 22:43:43 +02:00
Andreas Kling 9cba533e36 SystemMonitor: Tweak main UI layout :^) 2021-04-04 22:43:43 +02:00
Andreas Kling a1b7bd6fea SystemMonitor: Add ability to open process properties from context menu 2021-04-04 22:43:43 +02:00
Andreas Kling af06eac364 SystemMonitor: Remove "Process" context menu from menu bar
This menu is only relevant while interacting with the process list,
so let's not have it in the menu bar where its presence implies
universal relevance.
2021-04-04 22:43:43 +02:00
Andreas Kling 58ae8aabea SystemMonitor: Show process-specific details in a separate window
When double-clicking a process in the process list, we now open the
detailed information in a new window instead of showing it in a view
below the process list.

This declutters the main UI, and allows you to view details for
multiple processes at the same time.

This is just a first cut, there are many refinements possible here. :^)
2021-04-04 22:43:43 +02:00
Andreas Kling 5fcce5c7e2 SystemMonitor: Start capturing CPU/memory graphs on startup
It felt really weird that the graphs didn't start filling in before
you opened the graph tab for the first time.
2021-04-04 22:43:43 +02:00
Andreas Kling 0f7443f010 SystemMonitor: Add a status bar to the main window
To get us started, this shows the number of processes and threads in
the last captured state.
2021-04-04 22:43:43 +02:00
Andreas Kling 78b12e1521 Userland: Turn all application menus into window menus :^) 2021-03-25 22:14:09 +01:00
thankyouverycool 2e5d5eb3d8 SystemMonitor: Return icon display data as GUI::Icons
And delete the generic icon member which has been dormant since
switching to FileIconProvider. Fixes icon column not being properly
painted as icon cells.
2021-03-04 16:28:12 +01:00
Andreas Kling 5d180d1f99 Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)

Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.

We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
2021-02-23 20:56:54 +01:00
Andreas Kling 525f472dc5 SystemMonitor: Remove pid-and-tid tuple concept from ProcessModel
This was an old relic from back when thread IDs were per-process
instead of globally unique.
2021-02-16 20:38:49 +01:00
Andreas Kling 5f81babad2 SystemMonitor: Remove some unused cruft in ProcessModel 2021-02-16 20:24:22 +01:00
Sahan Fernando ca731e2cdd SystemMonitor: Define graphs by ColorRole, not by Color
Currently, graphs are defined in terms of graph color. This means that
when the system palette is changed, the old colors are still used. We
switch to storing the color roles and looking up the palette colors on
paint events. We also define the graph line background color as the
graph color at half-transparency.
2021-02-14 13:27:36 +01:00
Andreas Kling 8415866c03 Kernel: Remove user/kernel flags from Region
Now that we no longer need to support the signal trampolines being
user-accessible inside the kernel memory range, we can get rid of the
"kernel" and "user-accessible" flags on Region and simply use the
address of the region to determine whether it's kernel or user.

This also tightens the page table mapping code, since it can now set
user-accessibility based solely on the virtual address of a page.
2021-02-14 01:34:23 +01:00
Sahan Fernando e47af3044a SystemMonitor: Use system color themes for graph widgets 2021-02-12 22:04:40 +01:00
Andreas Kling 5dd555fe2f SystemMonitor: Use SymbolServer to symbolicate thread stacks 2021-02-04 23:20:39 +01:00
Andreas Kling 47d0ca85e8 pmap+SystemMonitor: Mark syscall regions with 'C' 2021-02-02 20:13:44 +01:00
Jean-Baptiste Boric b48d8d1d6d Userland: Rename PCI slot to PCI device terminology 2021-01-31 19:06:40 +01:00
Linus Groh 5b43419a63 SystemMonitor: Handle PCIDB::Database::open() failure gracefully
No need to dereference the nullptr, let's just show raw IDs instead.
2021-01-30 13:42:15 +01:00
Andreas Kling 0682a35148 SystemMonitor: Show VM region addresses as zero-padded hex ({:p})
0x1000000 and 0x10000000 looked way too similar without a leading zero.
2021-01-29 11:00:46 +01:00
Andreas Kling 3c7f5392a9 SystemMonitor: Trim "VMObject" suffix from VMObject types
Every VMObject type ends in "VMObject" and it's just taking up space.
2021-01-29 11:00:46 +01:00
Andreas Kling b72f067f0d Kernel+Userland: Remove unused "effective priority" from threads
This has been merged with the regular Thread::priority field after
the recent changes to the scheduler.
2021-01-28 08:25:53 +01:00
Andreas Kling d312011708 Everywhere: Drop "shared_buffer" in most GUI programs, pledge "recvfd"
Now that WindowServer broadcasts the system theme using an anonymous
file, we need clients to pledge "recvfd" so they can receive it.

Some programs keep the "shared_buffer" pledge since it's still used for
a handful of things.
2021-01-16 19:30:32 +01:00
Andreas Kling c71807a3fc Everywhere: Convert a handful of String::format() => formatted() 2021-01-16 14:52:04 +01:00
Andreas Kling 64610ca80e Everywhere: Remove a bunch of <AK/SharedBuffer.h> includes 2021-01-16 11:26:53 +01:00
Andreas Kling 20915795a8 Everywhere: Pledge "sendfd" in WindowServer client programs
This is needed for the new way we transfer window backing stores.
2021-01-15 14:10:32 +01:00
Andreas Kling dc28c07fa5 Applications: Move to Userland/Applications/ 2021-01-12 12:05:23 +01:00