mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
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>
This commit is contained in:
parent
88f50d602f
commit
6a70307ddc
3 changed files with 158 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# description: export perf data to a postgresql database
|
||||
# args: [database name] [columns]
|
||||
# args: [database name] [columns] [calls]
|
||||
n_args=0
|
||||
for i in "$@"
|
||||
do
|
||||
|
@ -9,11 +9,16 @@ do
|
|||
fi
|
||||
n_args=$(( $n_args + 1 ))
|
||||
done
|
||||
if [ "$n_args" -gt 2 ] ; then
|
||||
echo "usage: export-to-postgresql-report [database name] [columns]"
|
||||
if [ "$n_args" -gt 3 ] ; then
|
||||
echo "usage: export-to-postgresql-report [database name] [columns] [calls]"
|
||||
exit
|
||||
fi
|
||||
if [ "$n_args" -gt 1 ] ; then
|
||||
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
|
||||
|
@ -21,4 +26,4 @@ elif [ "$n_args" -gt 0 ] ; then
|
|||
dbname=$1
|
||||
shift
|
||||
fi
|
||||
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-postgresql.py $dbname $columns
|
||||
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-postgresql.py $dbname $columns $calls
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue