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