History

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.

Adrian Hunter committed 8 years ago

Commit d005efe1 parent 25e11701 file · +5 −1Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/export-to-sqlite.py+5−1
@@ -440,7 +440,11 @@ def branch_type_table(*x): · 439 unmodified lines
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