diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-11-13 20:10:13 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-11-13 20:10:13 -0500 |
| commit | c25141062a82ae8bddced1b3ce2b57a1c0efabe0 (patch) | |
| tree | 105edf10059bc0c4f2f00338b0c861b813d1bb1a /tools/perf/scripts/python/bin | |
| parent | 26dd633e437dca218547ccbeacc71fe8a620b6f6 (diff) | |
| parent | c1b433e04ef9c0a1c4d65bfe918472ffa334dff4 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 4.15 merge window.
Diffstat (limited to 'tools/perf/scripts/python/bin')
4 files changed, 53 insertions, 0 deletions
diff --git a/tools/perf/scripts/python/bin/export-to-sqlite-record b/tools/perf/scripts/python/bin/export-to-sqlite-record new file mode 100644 index 000000000000..070204fd6d00 --- /dev/null +++ b/tools/perf/scripts/python/bin/export-to-sqlite-record | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # | ||
| 4 | # export perf data to a sqlite3 database. Can cover | ||
| 5 | # perf ip samples (excluding the tracepoints). No special | ||
| 6 | # record requirements, just record what you want to export. | ||
| 7 | # | ||
| 8 | perf record $@ | ||
diff --git a/tools/perf/scripts/python/bin/export-to-sqlite-report b/tools/perf/scripts/python/bin/export-to-sqlite-report new file mode 100644 index 000000000000..5ff6033e70ba --- /dev/null +++ b/tools/perf/scripts/python/bin/export-to-sqlite-report | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # description: export perf data to a sqlite3 database | ||
| 3 | # args: [database name] [columns] [calls] | ||
| 4 | n_args=0 | ||
| 5 | for i in "$@" | ||
| 6 | do | ||
| 7 | if expr match "$i" "-" > /dev/null ; then | ||
| 8 | break | ||
| 9 | fi | ||
| 10 | n_args=$(( $n_args + 1 )) | ||
| 11 | done | ||
| 12 | if [ "$n_args" -gt 3 ] ; then | ||
| 13 | echo "usage: export-to-sqlite-report [database name] [columns] [calls]" | ||
| 14 | exit | ||
| 15 | fi | ||
| 16 | if [ "$n_args" -gt 2 ] ; then | ||
| 17 | dbname=$1 | ||
| 18 | columns=$2 | ||
| 19 | calls=$3 | ||
| 20 | shift 3 | ||
| 21 | elif [ "$n_args" -gt 1 ] ; then | ||
| 22 | dbname=$1 | ||
| 23 | columns=$2 | ||
| 24 | shift 2 | ||
| 25 | elif [ "$n_args" -gt 0 ] ; then | ||
| 26 | dbname=$1 | ||
| 27 | shift | ||
| 28 | fi | ||
| 29 | perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-sqlite.py $dbname $columns $calls | ||
diff --git a/tools/perf/scripts/python/bin/intel-pt-events-record b/tools/perf/scripts/python/bin/intel-pt-events-record new file mode 100644 index 000000000000..10fe2b6977d4 --- /dev/null +++ b/tools/perf/scripts/python/bin/intel-pt-events-record | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # | ||
| 4 | # print Intel PT Power Events and PTWRITE. The intel_pt PMU event needs | ||
| 5 | # to be specified with appropriate config terms. | ||
| 6 | # | ||
| 7 | if ! echo "$@" | grep -q intel_pt ; then | ||
| 8 | echo "Options must include the Intel PT event e.g. -e intel_pt/pwr_evt,ptw/" | ||
| 9 | echo "and for power events it probably needs to be system wide i.e. -a option" | ||
| 10 | echo "For example: -a -e intel_pt/pwr_evt,branch=0/ sleep 1" | ||
| 11 | exit 1 | ||
| 12 | fi | ||
| 13 | perf record $@ | ||
diff --git a/tools/perf/scripts/python/bin/intel-pt-events-report b/tools/perf/scripts/python/bin/intel-pt-events-report new file mode 100644 index 000000000000..9a9c92fcd026 --- /dev/null +++ b/tools/perf/scripts/python/bin/intel-pt-events-report | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # description: print Intel PT Power Events and PTWRITE | ||
| 3 | perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/intel-pt-events.py \ No newline at end of file | ||
