ladybird/Userland
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
..
al.cpp Userland: Fix many compiler warnings. 2019-06-22 15:47:08 +02:00
allocate.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
aplay.cpp aplay: Fixed incomplete playback of files 2019-10-19 20:05:13 +02:00
avol.cpp AudioServer: Allow muting the system audio 2019-11-22 21:44:02 +01:00
basename.cpp Userland: Add a /bin/basename program. 2019-04-15 13:57:09 +02:00
cal.cpp Userland: Add the cal command (#838) 2019-12-02 15:22:55 +01:00
cat.cpp cat: Use a 32 KB I/O buffer here to improve "cat a > b" scenario 2019-11-03 00:09:17 +01:00
chmod.cpp chmod: Add understanding of simple permission strings. (#295) 2019-07-13 19:36:02 +02:00
chown.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
clear.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
copy.cpp Userland: Unbreak "copy" and "paste" after GEventLoop removal 2019-09-23 09:36:25 +02:00
cp.cpp cp: Fail immediately if there's not enough space for the destination 2019-11-02 23:47:22 +01:00
crash.cpp Kernel: Crash on memory access in non-readable regions 2019-12-02 19:18:52 +01:00
cut.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
date.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
df.cpp LibCore: Convert CFile to ObjectPtr 2019-09-21 20:50:06 +02:00
disk_benchmark.cpp disk_benchmark: Add a -c flag to enable use of disk caches 2019-11-05 19:37:23 +01:00
dmesg.cpp LibCore: Convert CFile to ObjectPtr 2019-09-21 20:50:06 +02:00
echo.cpp Userland: Add a simple /bin/echo program. 2019-04-25 04:42:09 +02:00
env.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
false.cpp Build LibC and Userland with clang as well. 2018-11-09 14:29:00 +01:00
fgrep.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
head.cpp Userland: Fix many compiler warnings. 2019-06-22 15:47:08 +02:00
host.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
hostname.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
html.cpp LibGUI: Make GMenu inherit from CObject 2019-12-09 21:05:44 +01:00
id.cpp Userland: Fixed "id" usage error typo (#254) 2019-06-30 07:36:14 +02:00
ifconfig.cpp Kernel+ifconfig: Add an MTU value to NetworkAdapter 2019-11-28 14:14:26 +01:00
jp.cpp jp: Print double-quotes around string values in output 2019-11-29 21:35:01 +01:00
keymap.cpp Userland: Add keymap program. 2019-11-25 11:53:02 +01:00
kill.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
killall.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
ln.cpp Userland: Fix many compiler warnings. 2019-06-22 15:47:08 +02:00
ls.cpp AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
lspci.cpp LibCore: Convert CFile to ObjectPtr 2019-09-21 20:50:06 +02:00
Makefile pro: Add a little userland utility for testing ProtocolServer 2019-11-23 21:50:36 +01:00
man.cpp AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
md.cpp AK: Use size_t for the length of strings 2019-12-09 17:51:21 +01:00
mkdir.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
mknod.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
modload.cpp modload: Take the module-to-load as a command-line argument 2019-11-29 21:19:23 +01:00
modunload.cpp modunload: Take the module-to-unload as a command-line argument 2019-11-29 21:35:10 +01:00
mon.cpp Kernel: Add a mechanism for listening for changes to an inode. 2019-07-22 20:01:11 +02:00
more.cpp more: Don't printf(string), printf("%s", string)! 2019-08-01 11:39:41 +02:00
mount.cpp LibCore: Convert CFile to ObjectPtr 2019-09-21 20:50:06 +02:00
mv.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
nc.cpp Userland: Make sure sockaddr_len is initialised correctly in nc 2019-08-10 08:51:20 +02:00
nl.cpp Userland: Add the utility "nl" (number line) (#693) 2019-11-04 12:44:32 +01:00
pape.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
paste.cpp Userland: Unbreak "copy" and "paste" after GEventLoop removal 2019-09-23 09:36:25 +02:00
pidof.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
ping.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
pro.cpp LibProtocol: Add a Download object so users don't have to manage ID's 2019-11-24 13:22:01 +01:00
profile.cpp Kernel: Implement a simple process time profiler 2019-12-11 20:36:56 +01:00
ps.cpp Kernel: Expose per-thread information in /proc/all 2019-11-26 21:37:30 +01:00
purge.cpp purge: Add a small command-line utility for purging all volatile memory 2019-12-09 19:16:45 +01:00
realpath.cpp Userland: Add realpath 2019-08-25 19:47:37 +02:00
reboot.cpp Kernel+Userland: Addd reboot syscall (#334) 2019-07-19 09:58:12 +02:00
rm.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
rmdir.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
rpcdump.cpp LibCore: Convert CLocalSocket to ObjectPtr 2019-09-21 15:25:08 +02:00
shutdown.cpp Kernel: Only allow superuser to halt() the system (#342) 2019-07-19 13:08:26 +02:00
sleep.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
sort.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
stat.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
strace.cpp AK: Rename the common integer typedefs to make it obvious what they are. 2019-07-03 21:20:13 +02:00
su.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
sync.cpp Add sync() syscall and a /bin/sync. 2018-12-20 00:39:29 +01:00
syscall.cpp Kernel+LibC: Remove the isatty() syscall 2019-11-17 20:03:42 +01:00
sysctl.cpp ByteBuffer: Remove pointer() in favor of data() 2019-09-30 08:57:01 +02:00
tail.cpp ByteBuffer: Remove pointer() in favor of data() 2019-09-30 08:57:01 +02:00
tee.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
top.cpp Kernel: Make syscall counters and page fault counters per-thread 2019-11-26 21:37:38 +01:00
touch.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
tr.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
true.cpp Build LibC and Userland with clang as well. 2018-11-09 14:29:00 +01:00
truncate.cpp Userland: Implement truncate command 2019-08-05 08:36:28 +02:00
tt.cpp Kernel+LibPthread: pthread_create handles pthread_attr_t 2019-11-18 09:04:32 +01:00
tty.cpp Fix all current build warnings in the userland. 2018-11-09 10:19:33 +01:00
umount.cpp Kernel: Added unmount ability to VFS 2019-08-17 09:29:54 +02:00
uname.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
uptime.cpp Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
wc.cpp wc: Rewritten with added features (#690) 2019-11-04 12:42:30 +01:00
which.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
whoami.cpp Userland: Add /bin/whoami 2019-05-16 20:18:17 +02:00
yes.cpp Userland: Add a /bin/yes program (fixes #110) 2019-06-01 12:16:55 +02:00