diff options
author | Arun Kalyanasundaram <[email protected]> | 2017-07-21 15:04:18 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-07-25 22:43:18 -0300 |
commit | e9f9a9ca8588e58dc0800b44adc41d32f6fc813a (patch) | |
tree | a03cb69cd02eace0efc142d5c19e97e468ca47c1 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 2ec5cab604b2bbc5abe7138b537199762bea59ce (diff) |
perf script python: Allocate memory only if handler exists
Avoid allocating memory if hook handler is not available. This saves
unused memory allocation and simplifies error path.
Let handler in python_process_tracepoint point to either tracepoint
specific or trace_unhandled hook. Use dict to check if handler points to
trace_unhandled.
Remove the exit label in python_process_general_event and return when no
handler is available.
Signed-off-by: Arun Kalyanasundaram <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: David Carrillo-Cisneros <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Seongjae Park <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions