summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler/Profile.h
AgeCommit message (Collapse)Author
2021-06-03Profiler: Remove m_deepest_stack_depthGunnar Beutner
This isn't used anymore so let's remove it entirely.
2021-06-03Profiler: Use sequential serial numbers for profiling eventsGunnar Beutner
Previously Profiler was using timestamps to distinguish processes. However it is possible that separate processes with the same PID exist at the exact same timestamp (e.g. for execve). This changes Profiler to use unique serial numbers for each event instead.
2021-05-22Profiler: Split the call tree into one subtree per processAndreas Kling
This patch adds an additional level of hierarchy to the call tree: Every process gets its own top-level node. :^) Before this, selecting multiple processes would get quite confusing as all the call stacks from different processes were combined together into one big tree.
2021-05-21DevTools: Remove redundant default destructor and forward declarationsLenny Maiorani
Problem: - Default destructors (and constructors) are in `.cpp` files. This prevents the compiler's optimizer from inlining them when it thinks inlining is appropriate (unless LTO is used). - Forward declarations can prevent some optimizations, such as inlining of constructors and destructors. Solution: - Remove them or set them to `= default` and let the compiler handle the generation of them. - Remove unneeded forward declarations.
2021-05-19Profiler: Remove ability to filter Kernel::Scheduler::yield() framesGunnar Beutner
Hiding those frames doesn't really make sense. They're a major contributor to a process' spent CPU time and show up in a lot of profiles. That however is because those processes really do spend quite a bit of time in the scheduler by doing lots of context switches, like WindowServer when responding to IPC calls. Instead of hiding these for aesthetic reasons we should instead improve the scheduler.
2021-05-14Kernel+Profiler: Track lost time between profiler timer ticksGunnar Beutner
We can lose profiling timer events for a few reasons, for example disabled interrupts or system slowness. This accounts for lost time between CPU samples by adding a field lost_samples to each profiling event which tracks how many samples were lost immediately preceding the event.
2021-05-14Profiler: Let the user ignore context switchesGunnar Beutner
Now that the profiling timer is independent from the scheduler the user will get quite a few CPU samples from "within" the scheduler. These events are less useful when just profiling a user-mode process rather than the whole system. This patch adds an option to Profiler to hide these events.
2021-05-08Profiler: Let the user select more than one processGunnar Beutner
2021-05-07Profiler: Move filter checks into their own functionGunnar Beutner
2021-05-04Profiler: Move everything into the "Profiler" namespaceAndreas Kling
2021-04-26Kernel+Profiler: Improve profiling subsystemGunnar Beutner
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-23AK: Rename adopt() to adopt_ref()Andreas Kling
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
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-03-04AK: Simplify Bitmap and implement in terms of BitmapViewAndreas Kling
Add Bitmap::view() and forward most of the calls to BitmapView since the code was identical. Bitmap is now primarily concerned with its dynamically allocated backing store and BitmapView deals with the rest.
2021-03-03Profiler: Symbolicate addresses in non-PIE ELF objectsAndreas Kling
This is a little bit messy, but basically if an ELF object is non-PIE, we have to account for the executable mapping being at a hard-coded offset and subtract that when doing symbolication. There's probably a nicer way to solve this, I just hacked this together so we can see "cc1plus" and friends in profiles. :^)
2021-03-03Profiler: Cache and reuse mapped ELF objectsAndreas Kling
In multi-process profiles, the same ELF objects tend to occur many times (everyone has libc.so for example) so we will quickly run out of VM if we map each object once per process that uses it. Fix this by adding a "mapped object cache" that maps the path of an ELF object to a cached memory mapping and wrapping ELF::Image.
2021-03-02Kernel+Profiler: Capture metadata about all profiled processesAndreas Kling
The perfcore file format was previously limited to a single process since the pid/executable/regions data was top-level in the JSON. This patch moves the process-specific data into a top-level array named "processes" and we now add entries for each process that has been sampled during the profile run. This makes it possible to see samples from multiple threads when viewing a perfcore file with Profiler. This is extremely cool! :^)
2021-02-28Profiler: remove unimplemented Profile::LibraryMetadata::symbolicate() ↵thislooksfun
definition The implementation of Profile::LibraryMetadata::symbolicate() was removed in 340180ba057096d8cca917d2774c5a75c4b15975, but the corresponding public declaration was not.
2021-02-27Profiler: Add a new "Samples" view to the main UIAndreas Kling
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-27Profiler: Move ELF object name to its own profile graph columnAndreas Kling
This way you don't have to look at all the library names if you don't want to. Since we're pretty good about namespacing our things, the library names are slightly redundant information.
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...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-01-12DevTools: Move to Userland/DevTools/Andreas Kling