diff options
author | John Johansen <[email protected]> | 2018-05-02 00:38:52 -0700 |
---|---|---|
committer | John Johansen <[email protected]> | 2018-05-02 00:38:52 -0700 |
commit | 552c69b36ebd966186573b9c7a286b390935cce1 (patch) | |
tree | 43ae55082805c8e7f900a63197d21de36937de16 /tools/perf/scripts/python/bin/mem-phys-addr-record | |
parent | 588558eb6d0e0b6edfa65a67e906c2ffeba63ff1 (diff) | |
parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) |
Merge tag 'v4.17-rc3' into apparmor-next
Linux v4.17-rc3
Merge in v4.17 for LSM updates
Signed-off-by: John Johansen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/mem-phys-addr-record')
-rw-r--r-- | tools/perf/scripts/python/bin/mem-phys-addr-record | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/scripts/python/bin/mem-phys-addr-record b/tools/perf/scripts/python/bin/mem-phys-addr-record new file mode 100644 index 000000000000..5a875122a904 --- /dev/null +++ b/tools/perf/scripts/python/bin/mem-phys-addr-record @@ -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 $@ |