Centos-kernel-stream-9/tools/tracing
Jerome Marchand fd58ed9117 rtla: Remove procps-ng dependency
Bugzilla: https://bugzilla.redhat.com/2117497

commit dada03db9bb1984826e61cfcf1418ac73848324d
Author: Daniel Bristot de Oliveira <bristot@kernel.org>
Date:   Fri May 13 08:45:53 2022 +0200

    rtla: Remove procps-ng dependency

    Daniel Wagner reported to me that readproc.h got deprecated. Also,
    while the procps-ng library was available on Fedora, it was not available
    on RHEL, which is a piece of evidence that it was not that used.

    rtla uses procps-ng only to find the PID of the tracers' workload.

    I used the procps-ng library to avoid reinventing the wheel. But in this
    case, reinventing the wheel took me less time than the time we already
    took trying to work around problems.

    Implement a function that reads /proc/ entries, checking if:
            - the entry is a directory
            - the directory name is composed only of digits (PID)
            - the directory contains the comm file
            - the comm file contains a comm that matches the tracers'
              workload prefix.
            - then return true; otherwise, return false.

    And use it instead of procps-ng.

    Link: https://lkml.kernel.org/r/e8276e122ee9eb2c5a0ba8e673fb6488b924b825.1652423574.git.bristot@kernel.org

    Cc: John Kacur <jkacur@redhat.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Tao Zhou <tao.zhou@linux.dev>
    Fixes: b1696371d865 ("rtla: Helper functions for rtla")
    Reported-by: Daniel Wagner <dwagner@suse.de>
    Reviewed-by: Daniel Wagner <dwagner@suse.de>
    Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
2022-11-08 17:46:25 +01:00
..
latency tools/latency-collector: Remove unneeded semicolon 2021-03-18 12:58:26 -04:00
rtla rtla: Remove procps-ng dependency 2022-11-08 17:46:25 +01:00
Makefile