summaryrefslogtreecommitdiff
path: root/Userland/Applications/SystemMonitor
AgeCommit message (Collapse)Author
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-08Kernel: Implement an `axallowed` mount optionTim Schumacher
Similar to `W^X` and `wxallowed`, this allows for anonymous executable mappings.
2022-06-03Applications: Use spawn_or_show_error() for common spawn patternMacDue
2022-05-29Everywhere: Fix a bunch of typosLinus Groh
2022-05-13LibGUI+Userland: Make Dialog::ExecResult an enum classSam Atkins
2022-05-05SystemMonitor: Consistently use u64 for ValueFormat::text_formatterLuke Wilde
ValueFormat::text_formatter is called with a u64 retrieved from GraphWidget::m_values. However, the function pointer definition used size_t and all the users of text_formatter used int. If bytes was over ~2 billion, we would interpret bytes to be negative. We then pass this into `human_readable_size` which converts it to a u64, making it out to be about 15.9 EiB. This is fixed by making everything in the path take a u64.
2022-04-27LibCore: Remove main event loopJelle Raaijmakers
The main event loop functionality was used in just two places where the alternative is a bit simpler. Remove it in favor of referencing the event loop directly, or just invoking `EventLoop::current()`. Note that we don't need locking in the constructor since we're now only modifying a thread-local `Vector`. We also don't need locking in the old call sites to `::with_main_locked()` since we already lock the event loop in the subsequent `::post_event()` invocation.
2022-04-18SystemMonitor: Remove MakeInspectable::Yes from constructorSam Atkins
I think this was left in by mistake. No application should be hard-coded as inspectable.
2022-04-09LibGfx: Move other font-related files to LibGfx/Font/Simon Wanner
2022-04-06SystemMonitor: Default initialize all thread state variableskleines Filmröllchen
Having bogus values here when we just initialize the thread state with a process can lead to all sorts of bad things down the line, like infinite draws.
2022-04-06SystemMonitor: Fallback to invalid model index if there's no main threadkleines Filmröllchen
In the process model we check the thread with tid=pid to figure out the main thread of a process. This is used to construct the process view tree with non-main threads listed as children of the process row. However, there are sometimes circumstances where there is no main thread, even though the process should have been removed from the internal list by then. As a safe fallback, let's default to an invalid model index if we can't figure out what the main thread of a process is.
2022-04-06SystemMonitor: Keep current process selection expanded if neededkleines Filmröllchen
This is a hack until persistent model indices work.
2022-04-06SystemMonitor: Display processes and their threads in a tree :^)kleines Filmröllchen
This shows all non-main threads as children of the process they belong to. We also show the TID as that is important to distinguish the different threads in one process. Fixes #65 :skeleyak:
2022-04-06SystemMonitor: Pass the correct parent when checking for selected valueskleines Filmröllchen
This will cause trouble later when the row is not enough to identify a selection.
2022-04-06SystemMonitor: Move TID to the front in ProcessModelkleines Filmröllchen
This will look much nicer once we enable that column.
2022-04-03Kernel+SystemMonitor+lscpu: Rename 'CPUID' -> 'Vendor ID'Linus Groh
This is what the Intel manual, as well as Linux's cpuinfo calls it.
2022-04-03SystemMonitor: Move process window to GMLkleines Filmröllchen
Extra stuff done in this commit to facilitate the above (if you want to really push my commit count, ask for more atomicisation): - Register a bunch of widgets that are used in the process window. - Allow setting the pid after the fact for the process state widget.
2022-04-03SystemMonitor: Open PCI database in parallelkleines Filmröllchen
This was causing a bunch of lag (at least half a second, very noticeable) when first opening the hardware tab, as we would only load the PCI database when initializing the widget lazily. By starting the PCI database open on another thread, we avoid this entirely, as nobody can click the hardware tab this fast :^)
2022-04-03SystemMonitor: Move storage tab into custom widgetkleines Filmröllchen
2022-04-03SystemMonitor: Move hardware tab to custom widgetkleines Filmröllchen
This is just a LazyWidget with fancy initialization code that works perfectly in isolation.
2022-04-03SystemMonitor: Move entire main UI to GMLkleines Filmröllchen
:^)
2022-04-03SystemMonitor: Register GraphWidget's stack_values propertykleines Filmröllchen
2022-04-03SystemMonitor: Register a graph_widget pseudo-property in MemoryStatsWkleines Filmröllchen
The property graph_widget on MemoryStatsWidget is a-pseudo property that specifies the name of the graph widget which should be attached to the MemoryStatsWidget. When the property is set, the widget looks up the graph with that name in its parent, therefore automatically linking to the correct widget given that it's a sibling or descendant of a sibling.
2022-04-03SystemMonitor: Register MemoryStatsWidgetkleines Filmröllchen
This also requires that the associated graph widget may be null.
2022-04-03SystemMonitor: Register GraphWidgetkleines Filmröllchen
2022-04-03SystemMonitor: Move NetworkStatisticsWidget into namespace + register itkleines Filmröllchen
We don't want to clobber the global namespace with registered widgets.
2022-04-03LibGUI: Fully support TabWidget in GMLkleines Filmröllchen
TabWidgets couldn't be used in GML properly, as the GML creation routines didn't actually call the necessary functions in the TabWidget to get a new tab added. This commit fixes that by making the name of the tab a normal property, the previously introduced "title", which can be trivially set from GML. Therefore, try_add_widget() loses an argument (while try_add_tab doesn't, because it newly constructs the widget). This allows us to get rid of the silly "fixing my widget tree after the fact" code in Help and will make it super easy to use TabWidget in future GML. :^)
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-22SystemMonitor: Recognise wxallowed mount flagint16
2022-02-21SystemMonitor: Add missing /boot/Kernel.debug unveilIdan Horowitz
When using the stack tab as root LibSymbolication uses this file to provide Kernel symbols.
2022-02-18SystemMonitor: Add proper icon to the ProcessState windowthankyouverycool
2022-02-18SystemMonitor: Don't invalidate ProcessStateModel on refreshthankyouverycool
The model has a fixed number of rows based on the column enum and shouldn't need to be invalidated every update.
2022-02-17LibGUI: JsonArrayModel update without invalidating indicesmartinfalisse
Add function to update a JsonArrayModel without invalidating it. Now, for example in the SystemMonitor in the Network tab, a selected line will not be deselected whenever the data is updated.
2022-02-14Applications: Use default constructors/destructorsLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-02-11LibConfig: Rename pledge_domains(String) => pledge_domain(String)Vitaly Dyachkov
pledge_domains() that takes only one String argument was specifically added as a shortcut for pledging a single domain. So, it makes sense to use singular here.
2022-01-23LibCore: Allow EventLoops to run on multiple threads safelykleines Filmröllchen
The event loop system was previously very singletony to the point that there's only a single event loop stack per process and only one event loop (the topmost) can run at a time. This commit simply makes the event loop stack and related structures thread-local so that each thread has an isolated event loop system. Some things are kept at a global level and synchronized with the new MutexProtected: The main event loop needs to still be obtainable from anywhere, as it closes down the application when it exits. The ID allocator is global as IDs should not be shared even between threads. And for the inspector server connection, the same as for the main loop holds. Note that currently, the wake pipe is only created by the main thread, so notifications don't work on other threads. This removes the temporary mutex fix for notifiers, introduced in 0631d3fed5623c1f2b0d6085ab24e4dd69c6ce99 .
2022-01-19SystemMonitor: Show unknown in PCI devicesUndefine
In case when the PCI class, device or vendor is unknown, show that it is unknown instead of just putting the ID
2022-01-16SystemMonitor: Don't display empty CPU graphs when number of CPUs < 4Marcus Nilsson
When we have less than 4 CPUs we don't need to display a whole row of CPU graphs.
2022-01-16Everywhere: Mark Vector of mutable references as mutablecreator1creeper1
The point of a reference type is to behave just like the referred-to type. So, a Foo& should behave just like a Foo. In these cases, we had a const Vector. If it was a const Vector of Foo, iterating over the Vector would only permit taking const references to the individual Foos. However, we had a const Vector of Foo&. The behavior should not change. We should still only be permitted to take const references to the individual Foos. Otherwise, we would be allowed to mutate the individual Foos, which would mutate the elements of the const Vector. This wouldn't modify the stored pointers, but it would modify the objects that the references refer to. Since references should be transparent, this should not be legal. So it should be impossible to get mutable references into a const Vector. Since we need mutable references in these cases to call the mutating member functions, we need to mark the Vector as mutable as well.
2022-01-14SystemMonitor: Split multi-core CPU usage graphs into multiple rowsIdan Horowitz
This looks much nicer than the current cramped single-row solution.
2022-01-12Kernel: Rename ProcessorInfo::{m_brandstr => m_brand}Idan Horowitz
There's no need to specify the type of the member in it's name, especially not in shorthand format.
2022-01-09SystemMonitor: Propagate errors using try_set_main_widgetcreator1creeper1
build_process_window now uses try_set_main_widget and might return an error. process_properties_action handles a possible error by simply not updating the process window if an error occured while building it.
2022-01-04SystemMonitor: Remove unused functions and enable warning globallyAndrew Kaster
These two helpers were the only unused functions clang could detect in the entire codebase. Now that's commitment to no dead code :^)
2022-01-04Userland: Resolve unused-but-set-varaible warningsAndrew Kaster
These are almost always bugs, so enable globally. Remove unused counter variables in SystemMonitor and disk_benchmark.
2021-12-28Kernel: Remove the kmalloc_eternal heap :^)Andreas Kling
This was a premature optimization from the early days of SerenityOS. The eternal heap was a simple bump pointer allocator over a static byte array. My original idea was to avoid heap fragmentation and improve data locality, but both ideas were rooted in cargo culting, not data. We would reserve 4 MiB at boot and only ended up using ~256 KiB, wasting the rest. This patch replaces all kmalloc_eternal() usage by regular kmalloc().
2021-12-24SystemMonitor: Remove unused SortingProxyModel includeSam Atkins
2021-12-24LibGUI+Userland: Make SortingProxyModel::create() return ErrorOrSam Atkins
Unfortunately, most of the users are inside constructors, (and two others are inside callback lambdas) so the error can't propagate, but that can be improved later.
2021-12-19SystemMonitor: Add back accidentally removed veil lockIdan Horowitz
Since the call to lock the veil was missing, the protections provided by unveil() were not actually enabled.
2021-12-05Userland: Cast unused BackgroundAction::construct() results to voidSam Atkins
User code does not need to keep this alive, so casting to void is safe. But maybe a bit weird.