fix: 把内核恢复成 GitHub 原版
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
perf-util-y += Context.o
|
||||
|
||||
CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-bad-function-cast -Wno-declaration-after-statement -Wno-switch-enum
|
||||
CFLAGS_Context.o += -Wno-unused-parameter -Wno-nested-externs -Wno-undef
|
||||
CFLAGS_Context.o += -Wno-switch-default -Wno-shadow
|
||||
|
||||
ifeq ($(CC_NO_CLANG), 1)
|
||||
CFLAGS_Context.o += -Wno-unused-command-line-argument
|
||||
endif
|
||||
perf-util-y += Context.o
|
||||
|
||||
CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-bad-function-cast -Wno-declaration-after-statement -Wno-switch-enum
|
||||
CFLAGS_Context.o += -Wno-unused-parameter -Wno-nested-externs -Wno-undef
|
||||
CFLAGS_Context.o += -Wno-switch-default -Wno-shadow
|
||||
|
||||
ifeq ($(CC_NO_CLANG), 1)
|
||||
CFLAGS_Context.o += -Wno-unused-command-line-argument
|
||||
endif
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#!/bin/bash
|
||||
# description: system-wide r/w top
|
||||
# args: [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 1 ] ; then
|
||||
echo "usage: rwtop-report [interval]"
|
||||
exit
|
||||
fi
|
||||
if [ "$n_args" -gt 0 ] ; then
|
||||
interval=$1
|
||||
shift
|
||||
fi
|
||||
perf script $@ -s "$PERF_EXEC_PATH"/scripts/perl/rwtop.pl $interval
|
||||
#!/bin/bash
|
||||
# description: system-wide r/w top
|
||||
# args: [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 1 ] ; then
|
||||
echo "usage: rwtop-report [interval]"
|
||||
exit
|
||||
fi
|
||||
if [ "$n_args" -gt 0 ] ; then
|
||||
interval=$1
|
||||
shift
|
||||
fi
|
||||
perf script $@ -s "$PERF_EXEC_PATH"/scripts/perl/rwtop.pl $interval
|
||||
|
||||
+13
-13
@@ -1,13 +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 $@
|
||||
#!/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 $@
|
||||
|
||||
+19
-19
@@ -1,19 +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 $@
|
||||
#!/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 $@
|
||||
|
||||
@@ -1,24 +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
|
||||
#!/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
|
||||
|
||||
Reference in New Issue
Block a user