updates
This commit is contained in:
1 parent
80a96b56e4
commit
5d05671962
2 files changed
+11
-2
No files matched your search
@@ -2,6 +2,8 @@
|
|||||||
#
|
#
|
||||||
# pmcarch - measure and summarize architectural PMCs.
|
# pmcarch - measure and summarize architectural PMCs.
|
||||||
#
|
#
|
||||||
|
# FROM: https://github.com/brendangregg/pmc-cloud-tools
|
||||||
|
#
|
||||||
# USAGE: pmcarch {-C CPU | -p PID | -c CMD} [interval [duration]]
|
# USAGE: pmcarch {-C CPU | -p PID | -c CMD} [interval [duration]]
|
||||||
#
|
#
|
||||||
# PMCs are performance monitoring counters. This script uses the architectural
|
# PMCs are performance monitoring counters. This script uses the architectural
|
||||||
@@ -68,8 +70,9 @@ if (( opt_pid )); then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# order of PMCs attempts to workaround a 3.13 issue
|
|
||||||
# note that instructions is last on purpose, it triggers output
|
# note that instructions is last on purpose, it triggers output
|
||||||
|
# order of PMCs attempts to workaround a 3.13 issue
|
||||||
|
# cycles are twice as a workaround for an issue
|
||||||
perf stat -e cycles -e cycles \
|
perf stat -e cycles -e cycles \
|
||||||
-e r4f2e -e r412e \
|
-e r4f2e -e r412e \
|
||||||
-e r00c4 -e r00c5 -e instructions \
|
-e r00c4 -e r00c5 -e instructions \
|
||||||
@@ -81,6 +84,7 @@ perf stat -e cycles -e cycles \
|
|||||||
print htxt
|
print htxt
|
||||||
header = hlines
|
header = hlines
|
||||||
}
|
}
|
||||||
|
/invalid/ { print $0 } # unsupported event
|
||||||
{ gsub(/,/, ""); }
|
{ gsub(/,/, ""); }
|
||||||
$3 == "cycles" { cycles = $2; }
|
$3 == "cycles" { cycles = $2; }
|
||||||
$3 == "r4f2e" { llcref = $2; }
|
$3 == "r4f2e" { llcref = $2; }
|
||||||
|
|||||||
@@ -2,12 +2,15 @@
|
|||||||
#
|
#
|
||||||
# tlbstat - measure and summarize TLBs. Uses Linux perf and PMCs.
|
# tlbstat - measure and summarize TLBs. Uses Linux perf and PMCs.
|
||||||
#
|
#
|
||||||
|
# FROM: https://github.com/brendangregg/pmc-cloud-tools
|
||||||
|
#
|
||||||
# TLB: Translation Lookaside Buffer (the MMU page translation cache)
|
# TLB: Translation Lookaside Buffer (the MMU page translation cache)
|
||||||
# PMC: Performance Monitoring Counters
|
# PMC: Performance Monitoring Counters
|
||||||
#
|
#
|
||||||
# USAGE: tlbstat {-C CPU | -p PID | -c CMD} [interval [duration]]
|
# USAGE: tlbstat {-C CPU | -p PID | -c CMD} [interval [duration]]
|
||||||
#
|
#
|
||||||
# REQUIREMENTS: perf command, TLB PMCs (counters listed below)
|
# REQUIREMENTS: perf command, TLB PMCs (counters listed below) which may
|
||||||
|
# only be provided by Linux 4.14-ish and newer.
|
||||||
#
|
#
|
||||||
# Columns:
|
# Columns:
|
||||||
#
|
#
|
||||||
@@ -77,6 +80,7 @@ if (( opt_pid )); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# note that instructions is last on purpose, it triggers output
|
# note that instructions is last on purpose, it triggers output
|
||||||
|
# cycles are twice as a workaround for an issue
|
||||||
perf stat -e cycles -e cycles \
|
perf stat -e cycles -e cycles \
|
||||||
-e dtlb_load_misses.miss_causes_a_walk \
|
-e dtlb_load_misses.miss_causes_a_walk \
|
||||||
-e dtlb_store_misses.miss_causes_a_walk \
|
-e dtlb_store_misses.miss_causes_a_walk \
|
||||||
@@ -93,6 +97,7 @@ perf stat -e cycles -e cycles \
|
|||||||
print htxt
|
print htxt
|
||||||
header = hlines
|
header = hlines
|
||||||
}
|
}
|
||||||
|
/invalid/ { print $0 } # unsupported event
|
||||||
{ gsub(/,/, ""); }
|
{ gsub(/,/, ""); }
|
||||||
$3 == "cycles" { cycles = $2; }
|
$3 == "cycles" { cycles = $2; }
|
||||||
# counts:
|
# counts:
|
||||||
|
|||||||
Reference in new issue
Block a user