Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,2 @@
#!/bin/bash
perf record -e compaction:mm_compaction_begin -e compaction:mm_compaction_end -e compaction:mm_compaction_migratepages -e compaction:mm_compaction_isolate_migratepages -e compaction:mm_compaction_isolate_freepages $@
@@ -0,0 +1,4 @@
#!/bin/bash
#description: display time taken by mm compaction
#args: [-h] [-u] [-p|-pv] [-t | [-m] [-fs] [-ms]] [pid|pid-range|comm-regex]
perf script -s "$PERF_EXEC_PATH"/scripts/python/compaction-times.py $@
@@ -0,0 +1,8 @@
#!/bin/bash
#
# event_analyzing_sample.py can cover all type of perf samples including
# the tracepoints, so no special record requirements, just record what
# you want to analyze.
#
perf record $@
@@ -0,0 +1,3 @@
#!/bin/bash
# description: analyze all perf samples
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/event_analyzing_sample.py
@@ -0,0 +1,8 @@
#!/bin/bash
#
# export perf data to a postgresql database. Can cover
# perf ip samples (excluding the tracepoints). No special
# record requirements, just record what you want to export.
#
perf record $@
@@ -0,0 +1,29 @@
#!/bin/bash
# description: export perf data to a postgresql database
# args: [database name] [columns] [calls]
n_args=0
for i in "$@"
do
if expr match "$i" "-" > /dev/null ; then
break
fi
n_args=$(( $n_args + 1 ))
done
if [ "$n_args" -gt 3 ] ; then
echo "usage: export-to-postgresql-report [database name] [columns] [calls]"
exit
fi
if [ "$n_args" -gt 2 ] ; then
dbname=$1
columns=$2
calls=$3
shift 3
elif [ "$n_args" -gt 1 ] ; then
dbname=$1
columns=$2
shift 2
elif [ "$n_args" -gt 0 ] ; then
dbname=$1
shift
fi
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-postgresql.py $dbname $columns $calls
@@ -0,0 +1,8 @@
#!/bin/bash
#
# export perf data to a sqlite3 database. Can cover
# perf ip samples (excluding the tracepoints). No special
# record requirements, just record what you want to export.
#
perf record $@
@@ -0,0 +1,29 @@
#!/bin/bash
# description: export perf data to a sqlite3 database
# args: [database name] [columns] [calls]
n_args=0
for i in "$@"
do
if expr match "$i" "-" > /dev/null ; then
break
fi
n_args=$(( $n_args + 1 ))
done
if [ "$n_args" -gt 3 ] ; then
echo "usage: export-to-sqlite-report [database name] [columns] [calls]"
exit
fi
if [ "$n_args" -gt 2 ] ; then
dbname=$1
columns=$2
calls=$3
shift 3
elif [ "$n_args" -gt 1 ] ; then
dbname=$1
columns=$2
shift 2
elif [ "$n_args" -gt 0 ] ; then
dbname=$1
shift
fi
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-sqlite.py $dbname $columns $calls
@@ -0,0 +1,3 @@
#!/bin/bash
(perf record -e raw_syscalls:sys_exit $@ || \
perf record -e syscalls:sys_exit $@) 2> /dev/null
@@ -0,0 +1,10 @@
#!/bin/bash
# description: system-wide failed syscalls, by pid
# args: [comm]
if [ $# -gt 0 ] ; then
if ! expr match "$1" "-" > /dev/null ; then
comm=$1
shift
fi
fi
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/failed-syscalls-by-pid.py $comm
@@ -0,0 +1,2 @@
#!/bin/bash
perf record -g "$@"
@@ -0,0 +1,3 @@
#!/bin/bash
# description: create flame graphs
perf script -s "$PERF_EXEC_PATH"/scripts/python/flamegraph.py "$@"
@@ -0,0 +1,2 @@
#!/bin/bash
perf record -e syscalls:sys_enter_futex -e syscalls:sys_exit_futex $@
@@ -0,0 +1,4 @@
#!/bin/bash
# description: futext contention measurement
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/futex-contention.py
@@ -0,0 +1,2 @@
#!/bin/bash
perf record -F 99 -g "$@"
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# description: create firefox gecko profile json format from perf.data
if [ "$*" = "-i -" ]; then
perf script -s "$PERF_EXEC_PATH"/scripts/python/gecko.py
else
perf script -s "$PERF_EXEC_PATH"/scripts/python/gecko.py -- "$@"
fi
@@ -0,0 +1,13 @@
#!/bin/bash
#
# print Intel PT Events including Power Events and PTWRITE. The intel_pt PMU
# event needs to be specified with appropriate config terms.
#
if ! echo "$@" | grep -q intel_pt ; then
echo "Options must include the Intel PT event e.g. -e intel_pt/pwr_evt,ptw/"
echo "and for power events it probably needs to be system wide i.e. -a option"
echo "For example: -a -e intel_pt/pwr_evt,branch=0/ sleep 1"
exit 1
fi
perf record $@
@@ -0,0 +1,3 @@
#!/bin/bash
# description: print Intel PT Events including Power Events and PTWRITE
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/intel-pt-events.py
@@ -0,0 +1,19 @@
#!/bin/bash
#
# Profiling physical memory by all retired load instructions/uops event
# MEM_INST_RETIRED.ALL_LOADS or MEM_UOPS_RETIRED.ALL_LOADS
#
load=`perf list | grep mem_inst_retired.all_loads`
if [ -z "$load" ]; then
load=`perf list | grep mem_uops_retired.all_loads`
fi
if [ -z "$load" ]; then
echo "There is no event to count all retired load instructions/uops."
exit 1
fi
arg=$(echo $load | tr -d ' ')
arg="$arg:P"
perf record --phys-data -e $arg $@
@@ -0,0 +1,3 @@
#!/bin/bash
# description: resolve physical address samples
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/mem-phys-addr.py
@@ -0,0 +1,2 @@
#!/bin/bash
perf record -e skb:kfree_skb $@
@@ -0,0 +1,4 @@
#!/bin/bash
# description: display a table of dropped frames
perf script -s "$PERF_EXEC_PATH"/scripts/python/net_dropmonitor.py $@
@@ -0,0 +1,8 @@
#!/bin/bash
perf record -e net:net_dev_xmit -e net:net_dev_queue \
-e net:netif_receive_skb -e net:netif_rx \
-e skb:consume_skb -e skb:kfree_skb \
-e skb:skb_copy_datagram_iovec -e napi:napi_poll \
-e irq:irq_handler_entry -e irq:irq_handler_exit \
-e irq:softirq_entry -e irq:softirq_exit \
-e irq:softirq_raise $@
@@ -0,0 +1,5 @@
#!/bin/bash
# description: display a process of packet and processing time
# args: [tx] [rx] [dev=] [debug]
perf script -s "$PERF_EXEC_PATH"/scripts/python/netdev-times.py $@
@@ -0,0 +1,2 @@
#!/bin/bash
perf record -e "{powerpc:hcall_entry,powerpc:hcall_exit}" $@
@@ -0,0 +1,2 @@
#!/bin/bash
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/powerpc-hcalls.py
@@ -0,0 +1,2 @@
#!/bin/bash
perf record -m 16384 -e sched:sched_wakeup -e sched:sched_wakeup_new -e sched:sched_switch -e sched:sched_migrate_task $@
@@ -0,0 +1,3 @@
#!/bin/bash
# description: sched migration overview
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/sched-migration.py
@@ -0,0 +1,3 @@
#!/bin/bash
(perf record -e raw_syscalls:sys_enter $@ || \
perf record -e syscalls:sys_enter $@) 2> /dev/null
@@ -0,0 +1,24 @@
#!/bin/bash
# description: syscall top
# args: [comm] [interval]
n_args=0
for i in "$@"
do
if expr match "$i" "-" > /dev/null ; then
break
fi
n_args=$(( $n_args + 1 ))
done
if [ "$n_args" -gt 2 ] ; then
echo "usage: sctop-report [comm] [interval]"
exit
fi
if [ "$n_args" -gt 1 ] ; then
comm=$1
interval=$2
shift 2
elif [ "$n_args" -gt 0 ] ; then
interval=$1
shift
fi
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/sctop.py $comm $interval
@@ -0,0 +1,8 @@
#!/bin/sh
#
# stackcollapse.py can cover all type of perf samples including
# the tracepoints, so no special record requirements, just record what
# you want to analyze.
#
perf record "$@"
@@ -0,0 +1,3 @@
#!/bin/sh
# description: produce callgraphs in short form for scripting use
perf script -s "$PERF_EXEC_PATH"/scripts/python/stackcollapse.py "$@"
@@ -0,0 +1,3 @@
#!/bin/bash
(perf record -e raw_syscalls:sys_enter $@ || \
perf record -e syscalls:sys_enter $@) 2> /dev/null
@@ -0,0 +1,10 @@
#!/bin/bash
# description: system-wide syscall counts, by pid
# args: [comm]
if [ $# -gt 0 ] ; then
if ! expr match "$1" "-" > /dev/null ; then
comm=$1
shift
fi
fi
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/syscall-counts-by-pid.py $comm
@@ -0,0 +1,3 @@
#!/bin/bash
(perf record -e raw_syscalls:sys_enter $@ || \
perf record -e syscalls:sys_enter $@) 2> /dev/null
@@ -0,0 +1,10 @@
#!/bin/bash
# description: system-wide syscall counts
# args: [comm]
if [ $# -gt 0 ] ; then
if ! expr match "$1" "-" > /dev/null ; then
comm=$1
shift
fi
fi
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/syscall-counts.py $comm
@@ -0,0 +1,2 @@
#!/bin/bash
perf record -e sched:sched_switch -e sched:sched_migrate_task "$@"
@@ -0,0 +1,3 @@
#!/bin/bash
# description: analyze timings of tasks
perf script -s "$PERF_EXEC_PATH"/scripts/python/task-analyzer.py -- "$@"