From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8EB7A1B87E9; Tue, 12 Aug 2025 18:12:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755022370; cv=none; b=qptqm3x9j1236G4GhZz39E/CVfmL+GBH51QlssHn9iJ7hFvAVhIb/UCSaPzmedZgVSp8KFummt6kqagtlCtxIrKmk0JqudDlR5uGAaFqKq6yy/9u8JyH+brWBcPVEtki7c1m+cHrVGhK9nq5h12GoapDUxKlhP6IS2suyA2Vn/Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755022370; c=relaxed/simple; bh=P/XRLPfL9xyvM+LPpBMKjT67Q5sENcMik64gyYIwZZY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pbpOEdoUsID5zRVIqa+F68mEUTdK3mQSxQzCA41vZxcSA/mjcUmwEEsW06GXE6q+sLRND1BWsGg9YMHcAq7aZeooHCU5HLn7Q4Zg/tLb8UZGaElOJtOc7QKq5MpzOyVWv788W1tqgsYJHuY691pEyL4LxsWMeib7b2RrPaUA9wU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=s3Xcs1Aj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="s3Xcs1Aj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E480EC4CEF0; Tue, 12 Aug 2025 18:12:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755022370; bh=P/XRLPfL9xyvM+LPpBMKjT67Q5sENcMik64gyYIwZZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s3Xcs1AjojIPoQD1hNgAXtXcuMAhfSJhkueCLACf6VAjxG5BCD+/hC8v2aTFEwFJo ZVX0RftP66svbX1jKM5e76Ba5gTYsjVa87b1OtuuO0JJ3TUPaxram64+BwuYYmdN/k N3D1zvMIbw+SCiMPM9n27WTZrIiJAqHfRmv6KCfM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nam Cao , Tomas Glozar , Juri Lelli , Clark Williams , John Kacur , Gabriele Monaco , "Steven Rostedt (Google)" , Sasha Levin Subject: [PATCH 6.12 134/369] tools/rv: Do not skip idle in trace Date: Tue, 12 Aug 2025 19:27:11 +0200 Message-ID: <20250812173019.810716731@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250812173014.736537091@linuxfoundation.org> References: <20250812173014.736537091@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gabriele Monaco [ Upstream commit f60227f3448911b682c45041c3fbd94f6d3b15a2 ] 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). This has the side effect of skipping events generated by idle (PID 0). Set config_my_pid to -1 (an invalid pid) to avoid skipping idle. Cc: Nam Cao Cc: Tomas Glozar Cc: Juri Lelli Cc: Clark Williams Cc: John Kacur Link: https://lore.kernel.org/20250723161240.194860-2-gmonaco@redhat.com Fixes: 6d60f89691fc ("tools/rv: Add in-kernel monitor interface") Signed-off-by: Gabriele Monaco Signed-off-by: Steven Rostedt (Google) Signed-off-by: Sasha Levin --- tools/verification/rv/src/in_kernel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/verification/rv/src/in_kernel.c b/tools/verification/rv/src/in_kernel.c index f04479ecc96c..ced72950cb1e 100644 --- a/tools/verification/rv/src/in_kernel.c +++ b/tools/verification/rv/src/in_kernel.c @@ -353,7 +353,7 @@ ikm_event_handler(struct trace_seq *s, struct tep_record *record, if (config_has_id && (config_my_pid == id)) return 0; - else if (config_my_pid && (config_my_pid == pid)) + else if (config_my_pid == pid) return 0; tep_print_event(trace_event->tep, s, record, "%16s-%-8d ", TEP_PRINT_COMM, TEP_PRINT_PID); @@ -595,7 +595,7 @@ static int parse_arguments(char *monitor_name, int argc, char **argv) config_reactor = optarg; break; case 's': - config_my_pid = 0; + config_my_pid = -1; break; case 't': config_trace = 1; -- 2.39.5