diff options
| author | Juergen Gross <jgross@suse.com> | 2017-11-13 10:24:50 +0100 |
|---|---|---|
| committer | Juergen Gross <jgross@suse.com> | 2017-11-13 10:24:50 +0100 |
| commit | 3a485c2be49dde899e506684bb5f06d5b3f73e82 (patch) | |
| tree | e013f4d121199d60b70043f525aef4a7e641b5f6 /tools/perf/scripts/python/bin | |
| parent | Linux 4.13 (diff) | |
| parent | Linux 4.14 (diff) | |
| download | linux-3a485c2be49dde899e506684bb5f06d5b3f73e82.tar.gz linux-3a485c2be49dde899e506684bb5f06d5b3f73e82.zip | |
Merge tag 'v4.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Linux 4.14
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 |
