summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2023-09-05 17:46:49 +0200
committerAlexei Starovoitov <ast@kernel.org>2023-09-08 08:42:19 -0700
commit4981921350452a7639fac9ac8f19be4d25febdca (patch)
tree50019e301467b3abe0c35e9786db320fc545ce36 /tools/perf/scripts/python/export-to-postgresql.py
parent1a00ef57d9f120b711b6b1193d12ba3789d47ec2 (diff)
bpf: task_group_seq_get_next: cleanup the usage of get/put_task_struct
get_pid_task() makes no sense, the code does put_task_struct() soon after. Use find_task_by_pid_ns() instead of find_pid_ns + get_pid_task and kill put_task_struct(), this allows to do get_task_struct() only once before return. While at it, kill the unnecessary "if (!pid)" check in the "if (!*tid)" block, this matches the next usage of find_pid_ns() + get_pid_task() in this function. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230905154649.GA24935@redhat.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions