tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh

Source file repositories/reference/linux-study-clean/tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh

File Facts

System
Linux kernel
Corpus path
tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh
Extension
.sh
Size
294 bytes
Lines
12
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
get_workload_pids() {
    local shell_pid=$$
    local rtla_pid=$(ps -o ppid= $shell_pid)

    # kernel threads
    pgrep -P $(pgrep ^kthreadd$) -f '^(osnoise|timerlat)/[0-9]+$'
    # user threads
    pgrep -P $rtla_pid | grep -v "^$shell_pid$"
}

Annotation

Implementation Notes