diff options
| author | Dmitry Torokhov <[email protected]> | 2017-10-23 11:43:40 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2017-10-23 11:43:40 -0700 |
| commit | 91de76e661a266731fc2889a398ad1694df9d523 (patch) | |
| tree | ecc278f000f18e5b2b880f61ee4b0e68ebd1d6d4 /tools/perf/scripts/python/bin/export-to-sqlite-report | |
| parent | aed5d0ee77c007dcdcaf48ea75be008f05a241be (diff) | |
| parent | bb176f67090ca54869fc1262c913aa69d2ede070 (diff) | |
Merge tag 'v4.14-rc6' into next
Merge with mainline to bring in the timer API changes.
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-sqlite-report')
| -rw-r--r-- | tools/perf/scripts/python/bin/export-to-sqlite-report | 29 |
1 files changed, 29 insertions, 0 deletions
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 |