]> git.ipfire.org Git - thirdparty/linux.git/commit
tools/rtla: Deduplicate cgroup path opening code
authorCosta Shulyupin <costa.shul@redhat.com>
Wed, 24 Dec 2025 12:50:56 +0000 (14:50 +0200)
committerTomas Glozar <tglozar@redhat.com>
Wed, 7 Jan 2026 14:57:38 +0000 (15:57 +0100)
commit2a3a25336b1ba632a0a98249a7d4bbee454065aa
treeed81215e281676f70f2b35c3bd6de0f75fb7bc00
parent0576be469ef18a9f3460f6f207183033ae8b90c5
tools/rtla: Deduplicate cgroup path opening code

Both set_pid_cgroup() and set_comm_cgroup() functions contain
identical code for opening the cgroup.procs file.

Extract this common code into a new helper function open_cgroup_procs()
to reduce code duplication and improve maintainability.

Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Link: https://lore.kernel.org/r/20251224125058.1771519-1-costa.shul@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
tools/tracing/rtla/src/utils.c