perf scripting python: Simplify perf-trace-context module functions

Simplify perf-trace-context module functions by factoring out some
common code.

Signed-off-by: Adrian Hunter <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 file changed