diff options
| author | Sean Paul <seanpaul@chromium.org> | 2017-09-22 00:18:46 +0300 |
|---|---|---|
| committer | Sean Paul <seanpaul@chromium.org> | 2017-09-22 00:18:46 +0300 |
| commit | 1ebfc603d046f1dda6507d11803f9b4046cee712 (patch) | |
| tree | 3be6790f2ce819929b1ccff7993c636e0944705a /tools/perf/scripts/python/bin | |
| parent | b0e07da3f5c8d069d186a7983ff64eaebf2ea230 (diff) | |
| parent | 4a704d6db0ee4a349d5d523813a718e429b4914d (diff) | |
| download | linux-1ebfc603d046f1dda6507d11803f9b4046cee712.tar.xz | |
Merge remote-tracking branch 'origin/master' into drm-misc-fixes
Pick up 4.14-rc1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
| -rw-r--r-- | tools/perf/scripts/python/bin/export-to-sqlite-record | 8 | ||||
| -rw-r--r-- | tools/perf/scripts/python/bin/export-to-sqlite-report | 29 |
2 files changed, 37 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 @@ +#!/bin/bash + +# +# export perf data to a sqlite3 database. Can cover +# perf ip samples (excluding the tracepoints). No special +# record requirements, just record what you want to export. +# +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 @@ +#!/bin/bash +# description: export perf data to a sqlite3 database +# args: [database name] [columns] [calls] +n_args=0 +for i in "$@" +do + if expr match "$i" "-" > /dev/null ; then + break + fi + n_args=$(( $n_args + 1 )) +done +if [ "$n_args" -gt 3 ] ; then + echo "usage: export-to-sqlite-report [database name] [columns] [calls]" + exit +fi +if [ "$n_args" -gt 2 ] ; then + dbname=$1 + columns=$2 + calls=$3 + shift 3 +elif [ "$n_args" -gt 1 ] ; then + dbname=$1 + columns=$2 + shift 2 +elif [ "$n_args" -gt 0 ] ; then + dbname=$1 + shift +fi +perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-sqlite.py $dbname $columns $calls |
