diff options
author | James Morris <james.l.morris@oracle.com> | 2017-09-25 08:41:55 +0300 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-09-25 08:41:55 +0300 |
commit | 25eabb13c7d67ae32298015c5e28d00f604f412c (patch) | |
tree | 5bd75c2c1e385c79425bb099f0d19db7fb9c391f /tools/perf/scripts/python/bin/export-to-sqlite-report | |
parent | ab5348c9c23cd253f5902980d2d8fe067dc24c82 (diff) | |
parent | e19b205be43d11bff638cad4487008c48d21c103 (diff) | |
download | linux-25eabb13c7d67ae32298015c5e28d00f604f412c.tar.xz |
Merge tag 'v4.14-rc2' into next-general
Linux 4.14-rc2
Sync to v4.14-rc2 for security subsystem developers to track.
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 |