aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/perf.txt
Commit message (Collapse)AuthorAgeFilesLines
* sys/linux: use nested flag definitions where sensiblePaul Chaignon2023-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All flags that are subset of other flags were identified with the following Bash script [1]. Only a small set of flags identified by the script were rewritten to use nested flag definitions, after manually checking if it makes sense (based on syzkaller context and man pages). For example, msgget_flags was rewritten as follows: -msgget_flags = IPC_CREAT, IPC_EXCL, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH +msgget_flags = IPC_CREAT, IPC_EXCL, open_mode According to the msgget(2) man page: Upon creation, the least significant bits of the argument msgflg define the permissions of the message queue. These permission bits have the same format and semantics as the permissions specified for the mode argument of open(2). So it is correct to use open_mode directly in the definition of the flags for msgget(2). 1 - #!/bin/bash regexp_flags="^(\w+)\s*=\s+([a-zA-Z\"][^=]*)$" is_subset() { local -n subset=$1 local -n superset=$2 for element in "${subset[@]}"; do if [[ ! " ${superset[@]} " =~ " $element " ]]; then return 1 fi done return 0 } declare -A parsed_lines while IFS= read -r line; do if [[ ! "$line" =~ $regexp_flags ]]; then continue fi list_name="${BASH_REMATCH[1]}" values="${BASH_REMATCH[2]}" IFS=',' read -r -a values_array <<< "$(echo "$values" | sed 's/ //g' | tr ',' '\n' | sort | tr '\n' ',')" # Skip flags with too few value. if [ "${#values_array[@]}" -lt 3 ]; then continue fi # Skip the syz0, syz1, etc. lists. if [ "${values_array[0]}" = "\"syz0\"" ]; then continue fi parsed_lines["${list_name}"]="${values_array[@]}" done for list_name in "${!parsed_lines[@]}"; do values_array=(${parsed_lines["$list_name"]}) for other_list_name in "${!parsed_lines[@]}"; do other_values_array=(${parsed_lines["$other_list_name"]}) if [ "$list_name" = "$other_list_name" ]; then continue fi if is_subset values_array other_values_array; then if [ "${#values_array[@]}" -eq "${#other_values_array[@]}" ]; then echo "$list_name EQUALS $other_list_name" else echo "$list_name is a SUBET of $other_list_name" fi fi done done Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
* sys/linux: update perf_event_attr based on latest linux-nextMarco Elver2021-04-231-1/+13
| | | | | Updates perf_event_attr (perf events subsystem) to be in sync with latest linux-next.
* pkg/ast: remove trailing spaces when formattingDmitry Vyukov2020-11-251-1/+1
|
* sys/linux: update TODO commentsDmitry Vyukov2019-01-241-1/+1
| | | | | | Change TODO comments that refer to missing description language features to NEED comments as that it's easier to grep for them. Remove some outdated comments. Fix 2 easy fixable TODOs.
* sys/linux: add perf, kvm, btrfs consts for trace2syzshankarapailoor2018-10-301-0/+5
|
* sys/linux: slightly refine perf descriptionsDmitry Vyukov2018-10-281-2/+5
| | | | | CPU argument can be -1. It makes sense to mmap perf fd.
* sys/linux: add btf descriptionsDmitry Vyukov2018-09-111-1/+2
| | | | | Add some new bpf descriptions, most notably btf. Not perfect, but something.
* pkg/compiler: check for unused declarationsDmitry Vyukov2018-06-301-1/+1
| | | | | Error on unused structs/unions/resources/flags. Finds tons of bugs.
* sys: mark output resources as optDmitry Vyukov2018-06-181-2/+2
| | | | | Mark output resources as opt in preparation for more precise constructor calculation.
* sys/linux: a bunch of assorted improvementsDmitry Vyukov2018-04-271-0/+1
|
* sys/linux: add cgroup descriptionsDmitry Vyukov2018-03-251-3/+4
|
* sys/linux: fix perf_event_attr layoutDmitry Vyukov2018-03-061-1/+1
|
* sys/linux: describe some new 4.16 featuresDmitry Vyukov2018-02-011-1/+8
|
* sys/linux: improve perf descriptionsDmitry Vyukov2017-12-291-33/+72
|
* sys: move linux descriptions to sys/linuxDmitry Vyukov2017-09-151-0/+62