From nobody Sun Feb 8 23:35:15 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 385F31A00F0 for ; Fri, 4 Apr 2025 08:46:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743756365; cv=none; b=QcHk+5rsr7gk6AUsO3wRHxUxQQwg7k42dvEUvN6uhQHb+vXnvxtD5K+sY7Tdiocl5uAcgr/C8Wl5yV97HvFw3g8g9U7Ov+ZTj+4hnInnwnNX0tNVqVrjVHr4r/aRj3taGKOnsmD/3YIJqYI3ctOZxGc8e+sg6lRqWuNJEgRv1UY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743756365; c=relaxed/simple; bh=55w/VlvPRY6e7SnqUOleIYymHuuR1CoCZShX5ta66N0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k68SFWK6uory07O7dSYjy9ISdsOUHz8JIxsC2ljlpJw1J1/lkwioZh/YTmq/MR+9bu3Bs0BEwJ+ECz0Ahx4BWDXiEN2iU80CfG4vNRQv+L1941RXfIkmtMx0uJlosV312SHKZjw3/Gliz110W7fB0WaKyAaZlAY4hyK/LX+4uWQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=MFJXiDd0; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MFJXiDd0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743756362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Uzpx/ks+8dU83bQ2k/Wg2tkl4O8ewZUp90aomwDKfgQ=; b=MFJXiDd0bxzIsgUXEV/XxTgw19oldUe9o5fxWSujJqLre+vQ5Ojae9lrXHE57AlF+JrdNH neIRSDxh4SdDlK6axCyFn/sglraukBnRsE/6IhBj927x+bHFlu0qM33Hk2d5eS07L4KLn0 qE23s6oxZcVviNzlyfFgKRUd5AAQ1eM= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-472-6ulgx4waO4Ct2kLNXvwf3A-1; Fri, 04 Apr 2025 04:45:59 -0400 X-MC-Unique: 6ulgx4waO4Ct2kLNXvwf3A-1 X-Mimecast-MFC-AGG-ID: 6ulgx4waO4Ct2kLNXvwf3A_1743756358 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3FDFD180AB19; Fri, 4 Apr 2025 08:45:58 +0000 (UTC) Received: from gmonaco-thinkpadt14gen3.rmtit.com (unknown [10.44.32.143]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C86E3180B487; Fri, 4 Apr 2025 08:45:55 +0000 (UTC) From: Gabriele Monaco To: linux-kernel@vger.kernel.org, Steven Rostedt , linux-trace-kernel@vger.kernel.org Cc: Gabriele Monaco , Tomas Glozar , Juri Lelli Subject: [RFC PATCH 1/9] tools/rv: Do not skip idle in trace Date: Fri, 4 Apr 2025 10:45:14 +0200 Message-ID: <20250404084512.98552-12-gmonaco@redhat.com> In-Reply-To: <20250404084512.98552-11-gmonaco@redhat.com> References: <20250404084512.98552-11-gmonaco@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Currently, the userspace RV tool skips trace events triggered by the RV tool itself, this can be changed by passing the parameter -s, which sets the variable config_my_pid to 0 (instead of the tool's PID). The current condition for per-task monitors (config_has_id) does not check that config_my_pid isn't 0 to skip. In case we pass -s, we show events triggered by RV but don't show those triggered by idle (PID 0). Fix the condition to account this scenario. Fixes: 6d60f89691fc ("tools/rv: Add in-kernel monitor interface") Signed-off-by: Gabriele Monaco --- tools/verification/rv/src/in_kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/verification/rv/src/in_kernel.c b/tools/verification/rv/= src/in_kernel.c index c0dcee795c0de..72b03bae021cd 100644 --- a/tools/verification/rv/src/in_kernel.c +++ b/tools/verification/rv/src/in_kernel.c @@ -429,7 +429,7 @@ ikm_event_handler(struct trace_seq *s, struct tep_recor= d *record, =20 tep_get_common_field_val(s, trace_event, "common_pid", record, &pid, 1); =20 - if (config_has_id && (config_my_pid =3D=3D id)) + if (config_my_pid && config_has_id && (config_my_pid =3D=3D id)) return 0; else if (config_my_pid && (config_my_pid =3D=3D pid)) return 0; --=20 2.49.0