aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2018-09-11 07:45:04 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-09-25 10:37:05 -0400
commitd005efe18db0b4a123dd92ea8e77e27aee8f99fd (patch)
tree2152535edaa80ecbba0be95d1ecf7ed903f04cb6 /tools/perf/scripts/python
parent25e11700b54c7b6b5ebfc4361981dae12299557b (diff)
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 <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20180911114504.28516-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
-rw-r--r--tools/perf/scripts/python/export-to-sqlite.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/export-to-sqlite.py b/tools/perf/scripts/python/export-to-sqlite.py
index f827bf77e9d2..e4bb82c8aba9 100644
--- a/tools/perf/scripts/python/export-to-sqlite.py
+++ b/tools/perf/scripts/python/export-to-sqlite.py
@@ -440,7 +440,11 @@ def branch_type_table(*x):
440 440
441def sample_table(*x): 441def sample_table(*x):
442 if branches: 442 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)
444 else: 448 else:
445 bind_exec(sample_query, 22, x) 449 bind_exec(sample_query, 22, x)
446 450