mem-phys-addr-record 464 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. #
  3. # Profiling physical memory by all retired load instructions/uops event
  4. # MEM_INST_RETIRED.ALL_LOADS or MEM_UOPS_RETIRED.ALL_LOADS
  5. #
  6. load=`perf list | grep mem_inst_retired.all_loads`
  7. if [ -z "$load" ]; then
  8. load=`perf list | grep mem_uops_retired.all_loads`
  9. fi
  10. if [ -z "$load" ]; then
  11. echo "There is no event to count all retired load instructions/uops."
  12. exit 1
  13. fi
  14. arg=$(echo $load | tr -d ' ')
  15. arg="$arg:P"
  16. perf record --phys-data -e $arg $@