aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-10-30 10:09:47 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-11-03 16:10:06 -0500
commit6a70307ddcd9999598c399d55dc44c07816a575f (patch)
tree210143ded656ebf0ebc3f828caa0ddf7c080a599 /tools/perf/scripts/python/bin
parent88f50d602f500d206f2f5a9a9751dd45f2d97739 (diff)
perf tools: Add call information to Python export
Add the ability to export detailed information about paired calls and returns to Python db export and the export-to-postgresql.py script. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1414678188-14946-7-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
-rw-r--r--tools/perf/scripts/python/bin/export-to-postgresql-report15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/perf/scripts/python/bin/export-to-postgresql-report b/tools/perf/scripts/python/bin/export-to-postgresql-report
index a8fdd15f85bf..cd335b6e2a01 100644
--- a/tools/perf/scripts/python/bin/export-to-postgresql-report
+++ b/tools/perf/scripts/python/bin/export-to-postgresql-report
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# description: export perf data to a postgresql database 2# description: export perf data to a postgresql database
3# args: [database name] [columns] 3# args: [database name] [columns] [calls]
4n_args=0 4n_args=0
5for i in "$@" 5for i in "$@"
6do 6do
@@ -9,11 +9,16 @@ do
9 fi 9 fi
10 n_args=$(( $n_args + 1 )) 10 n_args=$(( $n_args + 1 ))
11done 11done
12if [ "$n_args" -gt 2 ] ; then 12if [ "$n_args" -gt 3 ] ; then
13 echo "usage: export-to-postgresql-report [database name] [columns]" 13 echo "usage: export-to-postgresql-report [database name] [columns] [calls]"
14 exit 14 exit
15fi 15fi
16if [ "$n_args" -gt 1 ] ; then 16if [ "$n_args" -gt 2 ] ; then
17 dbname=$1
18 columns=$2
19 calls=$3
20 shift 3
21elif [ "$n_args" -gt 1 ] ; then
17 dbname=$1 22 dbname=$1
18 columns=$2 23 columns=$2
19 shift 2 24 shift 2
@@ -21,4 +26,4 @@ elif [ "$n_args" -gt 0 ] ; then
21 dbname=$1 26 dbname=$1
22 shift 27 shift
23fi 28fi
24perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-postgresql.py $dbname $columns 29perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-postgresql.py $dbname $columns $calls