Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Perf collector indiscriminately kills processes #723

Open

Description

@douglas-raillard-arm

The PerfCollector class uses the following pattern:

    def reset(self):
        self.target.killall(self.perf_type, as_root=self.target.is_rooted)

This is not great as self.perf_type can be set to perf, so the class ends up indiscriminately killing all perf processes on the system, possibly as root. This is not a very good neighborly behavior. Instead, it should spawn a process (e.g. with Target.background()) and kill that process specifically, without interfering with resources it does not own.

Activity

  1. douglas-raillard-arm commented on May 20, 2025

    @douglas-raillard-arm
    CollaboratorAuthor

    As BackgroundCommand.send_signal() now supports all signals (rather than just SIGKILL), it should be suitable for use in PerfCollector. The FtraceCollector can be taken as an example of how to use devlib-signal-target and send_signal().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions