mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 01:37:34 +00:00
Base: Update and expand profile(1) manpage
This commit is contained in:
parent
35126e81c4
commit
33041f3a71
2 changed files with 26 additions and 7 deletions
|
@ -34,7 +34,6 @@ for i in ( \
|
||||||
(nl 1) \
|
(nl 1) \
|
||||||
(ntpquery 1) \
|
(ntpquery 1) \
|
||||||
(passwd 1) \
|
(passwd 1) \
|
||||||
(profile 1) \
|
|
||||||
(readelf 1) \
|
(readelf 1) \
|
||||||
(shot 1) \
|
(shot 1) \
|
||||||
(sql 1) \
|
(sql 1) \
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
## Name
|
## Name
|
||||||
|
|
||||||
profile
|
profile - Process or system profiler
|
||||||
|
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
```sh
|
```**sh
|
||||||
$ profile [-p PID] [-a] [-e] [-d] [-f] [-w] [-c command] [-t event_type]
|
$ profile [-p PID] [-a] [-e] [-d] [-f] [-w] [-t event_type] [COMMAND_TO_PROFILE]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Options:
|
## Description
|
||||||
|
|
||||||
|
`profile` records profiling information that can then be read with `ProfileViewer`.
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
* `-p PID`: Target PID
|
* `-p PID`: Target PID
|
||||||
* `-a`: Profile all processes (super-user only), result at /sys/kernel/profile
|
* `-a`: Profile all processes (super-user only), result at /sys/kernel/profile
|
||||||
|
@ -16,9 +20,25 @@ $ profile [-p PID] [-a] [-e] [-d] [-f] [-w] [-c command] [-t event_type]
|
||||||
* `-d`: Disable
|
* `-d`: Disable
|
||||||
* `-f`: Free the profiling buffer for the associated process(es).
|
* `-f`: Free the profiling buffer for the associated process(es).
|
||||||
* `-w`: Enable profiling and wait for user input to disable.
|
* `-w`: Enable profiling and wait for user input to disable.
|
||||||
* `-c command`: Command
|
|
||||||
* `-t event_type`: Enable tracking specific event type
|
* `-t event_type`: Enable tracking specific event type
|
||||||
|
|
||||||
Event type can be one of: sample, context_switch, page_fault, syscall, read, kmalloc and kfree.
|
Event type can be one of: sample, context_switch, page_fault, syscall, read, kmalloc and kfree.
|
||||||
|
|
||||||
<!-- Auto-generated through ArgsParser -->
|
## Examples
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Enable whole-system profiling
|
||||||
|
$ profile -ae
|
||||||
|
# ...then, to stop
|
||||||
|
$ profile -ad
|
||||||
|
|
||||||
|
# Profile a running process, with PID 42
|
||||||
|
$ profile -p 42
|
||||||
|
|
||||||
|
# Profile syscalls made by echo
|
||||||
|
$ profile -t syscall -- echo "Hello friends!"
|
||||||
|
```
|
||||||
|
|
||||||
|
## See also
|
||||||
|
|
||||||
|
* [`Profiler`(1)](help://man/1/Profiler) GUI for viewing profiling data produced by `profile`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue