Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3f725f5 authored by Adrian Hunter's avatar Adrian Hunter Committed by Greg Kroah-Hartman
Browse files

perf script python: Fix export-to-sqlite.py sample columns



commit d005efe1 upstream.

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: default avatarAdrian 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 82ac2740
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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)