diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-08-17 09:41:56 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-17 09:41:56 +0200 |
commit | 9881223c6cc0644cc3aeea41e1f19ea7e3041f33 (patch) | |
tree | 9cbf5e56de05d64fbb39aec49b00a616568ecb92 /tools/perf/scripts/python/bin/export-to-sqlite-report | |
parent | 927d2c21f2e82b93c791799c8da932a9bdffb436 (diff) | |
parent | 35435cd06081d7db96bc617b65ba556f8e24340e (diff) | |
download | linux-9881223c6cc0644cc3aeea41e1f19ea7e3041f33.tar.bz2 |
Merge tag 'perf-core-for-mingo-4.14-20170816' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf core improvements and fixes:
New features:
- Support exporting Intel PT data to sqlite3 with python perf scripts,
this is in addition to the postgresql support that was already there (Adrian Hunter)
Infrastructure changes:
- Handle perf tool builds with less features in perf shell tests, such
as those with NO_LIBDWARF=1 or even without 'perf probe' (Arnaldo Carvalho de Melo)
- Replace '|&' with '2>&1 |' to work with more shells in the just
introduced perf test shell harness (Kim Phillips)
Architecture related fixes:
- Fix endianness problem when loading parameters in the BPF prologue
generated by perf, noticed using 'perf test BPF' in s390x systems (Wang Nan, Thomas Richter)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 |