1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 19:38:12 +00:00
serenity/Kernel/FileSystem
Andreas Kling b32e961a84 Kernel: Implement a simple process time profiler
The kernel now supports basic profiling of all the threads in a process
by calling profiling_enable(pid_t). You finish the profiling by calling
profiling_disable(pid_t).

This all works by recording thread stacks when the timer interrupt
fires and the current thread is in a process being profiled.
Note that symbolication is deferred until profiling_disable() to avoid
adding more noise than necessary to the profile.

A simple "/bin/profile" command is included here that can be used to
start/stop profiling like so:

    $ profile 10 on
    ... wait ...
    $ profile 10 off

After a profile has been recorded, it can be fetched in /proc/profile

There are various limits (or "bugs") on this mechanism at the moment:

- Only one process can be profiled at a time.
- We allocate 8MB for the samples, if you use more space, things will
  not work, and probably break a bit.
- Things will probably fall apart if the profiled process dies during
  profiling, or while extracing /proc/profile
2019-12-11 20:36:56 +01:00
..
Custody.cpp Kernel: Don't create a String every time we look up a Custody by name 2019-08-25 06:45:14 +02:00
Custody.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
DevPtsFS.cpp Kernel: Give PTY's *actually* unique major ID's 2019-12-09 21:03:39 +01:00
DevPtsFS.h DevPtsFS: Do not assume there is one of it 2019-08-17 12:07:55 +02:00
DiskBackedFileSystem.cpp Kernel: Implement O_DIRECT open() flag to bypass disk caches 2019-11-05 19:35:12 +01:00
DiskBackedFileSystem.h Kernel: Implement O_DIRECT open() flag to bypass disk caches 2019-11-05 19:35:12 +01:00
ext2_fs.h Add clang-format file 2019-05-28 17:31:20 +02:00
ext2_types.h Add clang-format file 2019-05-28 17:31:20 +02:00
Ext2FileSystem.cpp Ext2FileSystem: set_metadata_dirty(true) during write_directory(). 2019-11-21 13:04:38 +01:00
Ext2FileSystem.h Ext2FS: Rename allocate_inode() => find_a_free_inode() 2019-11-17 19:19:02 +01:00
FIFO.cpp Kernel: Make File's can_read/can_write take a const FileDescription& 2019-11-04 14:03:14 +01:00
FIFO.h Kernel: Make File's can_read/can_write take a const FileDescription& 2019-11-04 14:03:14 +01:00
File.cpp FileDescription: Disallow construction with a null File 2019-08-11 09:33:31 +02:00
File.h Kernel: Make File's can_read/can_write take a const FileDescription& 2019-11-04 14:03:14 +01:00
FileDescription.cpp Kernel: Handle fstat() on sockets 2019-11-26 19:58:25 +01:00
FileDescription.h Kernel: Implement O_DIRECT open() flag to bypass disk caches 2019-11-05 19:35:12 +01:00
FileSystem.cpp AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
FileSystem.h AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
Inode.cpp Kernel: Rename "vmo" to "vmobject" everywhere 2019-09-04 11:27:14 +02:00
Inode.h Ext2FS: Don't uncache inodes while they are being watched 2019-11-04 17:25:44 +01:00
InodeFile.cpp Kernel+SystemMonitor: Log amounts of I/O per thread 2019-12-01 17:40:27 +01:00
InodeFile.h Kernel: Make File's can_read/can_write take a const FileDescription& 2019-11-04 14:03:14 +01:00
InodeIdentifier.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
InodeMetadata.h AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
InodeWatcher.cpp Kernel: Make File's can_read/can_write take a const FileDescription& 2019-11-04 14:03:14 +01:00
InodeWatcher.h Kernel: Make File's can_read/can_write take a const FileDescription& 2019-11-04 14:03:14 +01:00
ProcFS.cpp Kernel: Implement a simple process time profiler 2019-12-11 20:36:56 +01:00
ProcFS.h ProcFS: Do not assume there is one of it 2019-08-17 12:07:55 +02:00
SharedMemory.cpp Kernel: Rename "vmo" to "vmobject" everywhere 2019-09-04 11:27:14 +02:00
SharedMemory.h Kernel: Make File's can_read/can_write take a const FileDescription& 2019-11-04 14:03:14 +01:00
TmpFS.cpp TmpFS: Notify any associated InodeVMObject on inode changes 2019-08-24 19:59:01 +02:00
TmpFS.h Kernel: Add TmpFS 2019-08-15 19:20:51 +02:00
VirtualFileSystem.cpp ByteBuffer: Remove pointer() in favor of data() 2019-09-30 08:57:01 +02:00
VirtualFileSystem.h Kernel: Implement O_DIRECT open() flag to bypass disk caches 2019-11-05 19:35:12 +01:00