Skip to content

Commit

Permalink
perf script python: Fix export-to-sqlite.py sample columns
Browse files Browse the repository at this point in the history
With the "branches" export option, not all sample columns are exported.
However the unwanted columns are not at the end of the tuple, as assumed
by the code. Fix by taking the first 15 and last 3 values, instead of
the first 18.

Signed-off-by: Adrian Hunter <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
ahunter6 authored and acmel committed Sep 25, 2018
1 parent 25e1170 commit d005efe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/perf/scripts/python/export-to-sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,11 @@ def branch_type_table(*x):

def sample_table(*x):
if branches:
bind_exec(sample_query, 18, x)
for xx in x[0:15]:
sample_query.addBindValue(str(xx))
for xx in x[19:22]:
sample_query.addBindValue(str(xx))
do_query_(sample_query)
else:
bind_exec(sample_query, 22, x)

Expand Down

0 comments on commit d005efe

Please sign in to comment.