Skip to content

Commit d005efe

Browse files
ahunter6acmel
authored andcommitted
perf script python: Fix export-to-sqlite.py sample columns
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]>
1 parent 25e1170 commit d005efe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/perf/scripts/python/export-to-sqlite.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,11 @@ def branch_type_table(*x):
440440

441441
def sample_table(*x):
442442
if branches:
443-
bind_exec(sample_query, 18, x)
443+
for xx in x[0:15]:
444+
sample_query.addBindValue(str(xx))
445+
for xx in x[19:22]:
446+
sample_query.addBindValue(str(xx))
447+
do_query_(sample_query)
444448
else:
445449
bind_exec(sample_query, 22, x)
446450

0 commit comments

Comments
 (0)